Index: src/apinatives.js |
=================================================================== |
--- src/apinatives.js (revision 654) |
+++ src/apinatives.js (working copy) |
@@ -82,6 +82,8 @@ |
function ConfigureTemplateInstance(obj, data) { |
var properties = %GetTemplateField(data, kApiPropertyListOffset); |
if (properties) { |
+ // Disable access checks while instantiating the object. |
+ var requires_access_checks = %DisableAccessChecks(obj); |
for (var i = 0; i < properties[0]; i += 3) { |
var name = properties[i + 1]; |
var prop_data = properties[i + 2]; |
@@ -89,5 +91,6 @@ |
var value = Instantiate(prop_data, name); |
%SetProperty(obj, name, value, attributes); |
} |
+ if (requires_access_checks) %EnableAccessChecks(obj); |
Kasper Lund
2008/10/30 12:32:27
Should this be in some sort of try-finally to play
|
} |
} |