diff options
author | Chad Austin <chad@imvu.com> | 2013-02-28 17:07:48 -0800 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-04-12 14:24:41 +0300 |
commit | 9008c4da5344b55d524a811567e611c901c5c16f (patch) | |
tree | 66c575571c872cdf372806781d05db0bbab5d170 | |
parent | 067dbfd94662027d220cd93085d67ca0bb3cf800 (diff) |
smart ptr 5472 object is non-enumerable
-rwxr-xr-x | src/embind/embind.js | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/embind/embind.js b/src/embind/embind.js index d4d428ad..7000ddc4 100755 --- a/src/embind/embind.js +++ b/src/embind/embind.js @@ -698,11 +698,14 @@ function __embind_register_smart_ptr( rawGetPointee = FUNCTION_TABLE[rawGetPointee]; var Handle = createNamedFunction(name, function(ptr) { - this.$$ = {}; - this.$$.count = {value: 1}; - this.$$.smartPtr = ptr; // std::shared_ptr<T>* - this.$$.ptr = rawGetPointee(ptr); // T* - this.$$.pointeeType = pointeeType; + Object.defineProperty(this, '$$', { + value: { + count: {value: 1}, + smartPtr: ptr, + ptr: rawGetPointee(ptr), + pointeeType: pointeeType, + }, + }); }); // TODO: test for SmartPtr.prototype.constructor property? |