Index: compiled/bindings/generator.cpp |
=================================================================== |
--- a/compiled/bindings/generator.cpp |
+++ b/compiled/bindings/generator.cpp |
@@ -379,16 +379,21 @@ |
{ |
this._pointer = pointer; |
}; |
var proto = (superclass ? superclass.prototype : null); |
result.prototype = Object.create(proto, Object.getOwnPropertyDescriptors(props)); |
result.prototype.delete = function() |
{ |
Module._ReleaseRef(this._pointer + ref_counted_offset); |
+ Object.defineProperty(this, "_pointer", { |
+ get: function() { |
+ throw new Error("Attempt to use deleted object"); |
+ }, |
+ }); |
}; |
return result; |
} |
)"); |
} |
void printClass(const ClassInfo& cls) |
{ |