Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index ce99df2e08cf243716496b06263b07d5d640af04..0010845a3937e3c34992859db347ee83eff4efa2 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -2237,6 +2237,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<Map> Factory::ObjectLiteralMapFromCache(Handle<Context> context, |
int number_of_properties, |
bool* is_result_from_cache) { |