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

Unified Diff: src/factory.cc

Issue 1448933002: Introduce a BuiltinsConstructStub that sets up new.target and does a [[call]] per ES6 9.3.2 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/execution.cc ('k') | src/heap/heap.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 266ecff1d3f16ce00ebcc500f23f8cb5d72b6f29..a68df4466c4151f8412e12ab78bd6a8864789721 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1938,13 +1938,9 @@ Handle<JSDataView> Factory::NewJSDataView(Handle<JSArrayBuffer> buffer,
Handle<JSProxy> Factory::NewJSProxy(Handle<JSReceiver> target,
Handle<JSReceiver> handler) {
- // Allocate map.
- // TODO(rossberg): Once we optimize proxies, think about a scheme to share
- // maps. Will probably depend on the identity of the handler object, too.
- Handle<Map> map = NewMap(JS_PROXY_TYPE, JSProxy::kSize);
- Map::SetPrototype(map, null_value());
-
// Allocate the proxy object.
+ Handle<Map> map(isolate()->proxy_function()->initial_map());
+ DCHECK(map->prototype()->IsNull());
Handle<JSProxy> result = New<JSProxy>(map, NEW_SPACE);
result->set_target(*target);
result->set_handler(*handler);
« no previous file with comments | « src/execution.cc ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698