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

Unified Diff: src/bootstrapper.cc

Issue 650127: Implement BlindReference object and provide couple of liveedit-specific structures (Closed)
Patch Set: follow codereview Created 10 years, 10 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 | « no previous file | 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 a7cf421b5ba96df5accb00b8083b809af4d21bdf..12efbc17ab1dce65edb519496bda9dcbc953a9e6 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -1050,6 +1050,19 @@ bool Genesis::InstallNatives() {
script->set_type(Smi::FromInt(Script::TYPE_NATIVE));
global_context()->set_empty_script(*script);
}
+ {
+ // Builtin function for OpaqueReference -- a JSValue-based object,
+ // that keeps its field isolated from JavaScript code. It may store
+ // objects, that JavaScript code may not access.
+ Handle<JSFunction> opaque_reference_fun =
+ InstallFunction(builtins, "OpaqueReference", JS_VALUE_TYPE,
+ JSValue::kSize, Top::initial_object_prototype(),
+ Builtins::Illegal, false);
+ Handle<JSObject> prototype =
+ Factory::NewJSObject(Top::object_function(), TENURED);
+ SetPrototype(opaque_reference_fun, prototype);
+ global_context()->set_opaque_reference_function(*opaque_reference_fun);
+ }
if (FLAG_natives_file == NULL) {
// Without natives file, install default natives.
« no previous file with comments | « no previous file | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698