diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2014-05-06 12:53:37 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2014-05-06 12:53:37 +0300 |
commit | fd3d9cc489400b90bb578cab7a6fece69e161fe0 (patch) | |
tree | b3b399a84a35fdb96690067057119673dc6d652a | |
parent | 0794b09cd748a3ca6eb111d57f8cfcfce852b2a0 (diff) |
Apply Chad's fix from issue #2335 to fix other.test_embind.
-rw-r--r-- | src/embind/embind.js | 9 | ||||
-rw-r--r-- | tests/embind/imvu_test_adapter.js | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index 3eadb85f..4821c77b 100644 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -1525,9 +1525,12 @@ function downcastPointer(ptr, ptrClass, desiredClass) { if (undefined === desiredClass.baseClass) { return null; // no conversion } - // O(depth) stack space used - return desiredClass.downcast( - downcastPointer(ptr, ptrClass, desiredClass.baseClass)); + + var rv = downcastPointer(ptr, ptrClass, desiredClass.baseClass); + if (rv === null) { + return null; + } + return desiredClass.downcast(rv); } function upcastPointer(ptr, ptrClass, desiredClass) { diff --git a/tests/embind/imvu_test_adapter.js b/tests/embind/imvu_test_adapter.js index 421e86c8..93eeab37 100644 --- a/tests/embind/imvu_test_adapter.js +++ b/tests/embind/imvu_test_adapter.js @@ -586,12 +586,6 @@ function module(ignore, func) { throw new AssertionError("Don't call setInterval in tests. Use fakes.");
};
- if (typeof process !== 'undefined') {
- process.nextTick = function() {
- throw new AssertionError("Don't call process.nextTick in tests. Use fakes.");
- };
- }
-
Math.random = function() {
throw new AssertionError("Don't call Math.random in tests. Use fakes.");
};
|