aboutsummaryrefslogtreecommitdiff
path: root/src/embind/emval.js
diff options
context:
space:
mode:
authorChad Austin <caustin@gmail.com>2014-03-22 21:10:46 -0700
committerChad Austin <chad@chadaustin.me>2014-03-28 23:56:40 -0700
commit464f4a3cace3eba27c145d347d031930b9630a51 (patch)
treee4ebd41b75ee637d5a774e62e78830dd71d6d212 /src/embind/emval.js
parent555cb8207b9b06f86284a88d97a74c43e20469fb (diff)
make val::as<> compatible with asm.js
Diffstat (limited to 'src/embind/emval.js')
-rw-r--r--src/embind/emval.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js
index 039f1d61..6236a32d 100644
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -205,13 +205,16 @@ function __emval_set_property(handle, key, value) {
_emval_handle_array[handle].value[_emval_handle_array[key].value] = _emval_handle_array[value].value;
}
-function __emval_as(handle, returnType, destructorsRef) {
+function __emval_as(handle, returnType, result, destructorsRef) {
requireHandle(handle);
returnType = requireRegisteredType(returnType, 'emval::as');
var destructors = [];
var rd = __emval_register(destructors);
HEAP32[destructorsRef >> 2] = rd;
- return returnType['toWireType'](destructors, _emval_handle_array[handle].value);
+ returnType.writeValueToPointer(
+ _emval_handle_array[handle].value,
+ result,
+ destructors);
}
function parseParameters(argCount, argTypes, argWireTypes) {