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

Unified Diff: src/bootstrapper.cc

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 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/ast/ast-types.cc ('k') | src/compiler/types.cc » ('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 8653ce9b97997701d9dc959339d74018bebd2bc2..892007f853bcf924762e542bbc87bc9ff1a4f738 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -4025,6 +4025,16 @@ void Genesis::InitializeGlobal_harmony_promise_finally() {
}
}
+void Genesis::InitializeGlobal_harmony_weakref() {
+ if (!FLAG_harmony_weakref) return;
+
+ Handle<JSFunction> js_weak_ref_fun = InstallFunction(
+ global, "WeakRef", JS_WEAK_REF_TYPE, JSWeakRef::kSize,
+ isolate->initial_object_prototype(), Builtins::kIllegal);
+ InstallWithIntrinsicDefaultProto(isolate, js_weak_ref_fun,
+ Context::JS_WEAK_REF_FUN_INDEX);
+}
+
void Genesis::InitializeGlobal_harmony_regexp_dotall() {
if (!FLAG_harmony_regexp_dotall) return;
« no previous file with comments | « src/ast/ast-types.cc ('k') | src/compiler/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698