Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: src/bootstrapper.cc

Issue 1140333003: Introduce extras export object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixed comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/api.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/api.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698