Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index 55b5b3141e1b723f72ce1c5fad5c7ebfd1b38b62..28d007bce57a76e2af104022afa1279f057e5d75 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -1467,7 +1467,7 @@ bool Genesis::CompileExtraBuiltin(Isolate* isolate, int index) { |
Handle<String> source_code = |
isolate->bootstrapper()->SourceLookup<ExtraNatives>(index); |
Handle<Object> global = isolate->global_object(); |
- Handle<Object> exports = isolate->builtin_exports_object(); |
+ Handle<Object> exports = isolate->extras_exports_object(); |
Handle<Object> args[] = {global, exports}; |
return CompileNative(isolate, name, source_code, arraysize(args), args); |
} |
@@ -1918,12 +1918,19 @@ bool Genesis::InstallNatives() { |
factory()->NewJSObject(isolate()->object_function()); |
JSObject::NormalizeProperties(shared, CLEAR_INOBJECT_PROPERTIES, 16, |
"container to share between native scripts"); |
+ |
Handle<JSObject> builtin_exports = |
factory()->NewJSObject(isolate()->object_function()); |
JSObject::NormalizeProperties(builtin_exports, CLEAR_INOBJECT_PROPERTIES, 16, |
"container to export to experimental natives"); |
native_context()->set_builtin_exports_object(*builtin_exports); |
+ Handle<JSObject> extras_exports = |
+ factory()->NewJSObject(isolate()->object_function()); |
+ JSObject::NormalizeProperties(extras_exports, CLEAR_INOBJECT_PROPERTIES, 2, |
+ "container to export to extra natives"); |
+ native_context()->set_extras_exports_object(*extras_exports); |
+ |
if (FLAG_expose_natives_as != NULL) { |
Handle<String> shared_key = factory()->NewStringFromAsciiChecked("shared"); |
JSObject::AddProperty(builtins, shared_key, shared, NONE); |