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

Unified Diff: src/factory.cc

Issue 886473005: Add WeakMap to v8.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Moved constructor&destructor to api.cc Created 5 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 | « src/factory.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 8226a0e5d7f0e92dfe4775a327fee2776b16a55e..c1c818cfeea189c568090e690adf743033bfa355 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -2236,6 +2236,15 @@ Handle<JSObject> Factory::NewArgumentsObject(Handle<JSFunction> callee,
}
+Handle<JSWeakMap> Factory::NewJSWeakMap() {
+ // TODO(adamk): Currently the map is only created three times per
+ // isolate. If it's created more often, the map should be moved into the
+ // strong root list.
+ Handle<Map> map = NewMap(JS_WEAK_MAP_TYPE, JSWeakMap::kSize);
+ return Handle<JSWeakMap>::cast(NewJSObjectFromMap(map));
+}
+
+
Handle<JSFunction> Factory::CreateApiFunction(
Handle<FunctionTemplateInfo> obj,
Handle<Object> prototype,
« no previous file with comments | « src/factory.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698