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); |