aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjinsuck <jkim@imvu.com>2013-03-27 14:35:59 -0700
committerJukka Jylänki <jujjyl@gmail.com>2013-04-12 14:26:46 +0300
commit08881f98fdf4688afab03f4b0632f4d1385de969 (patch)
treeda30edcf6fa3618c83f8070bfe0ca68a0f70887b
parent638478a9a9234e7adb14259735432babd31bddba (diff)
add a helper method for Northstar unit testing (when emval leaks, we want to see what is left there)
-rwxr-xr-xsrc/embind/emval.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js
index 7cdac6d9..45030b99 100755
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -19,6 +19,16 @@ Module.count_emval_handles = function() {
return count;
};
+/** @expose */
+Module.get_first_emval = function() {
+ for (var i = 0; i < _emval_handle_array.length; ++i) {
+ if (_emval_handle_array[i] !== undefined) {
+ return _emval_handle_array[i];
+ }
+ }
+ return null;
+};
+
// Private C++ API
function __emval_register(value) {