Index: src/bootstrapper.cc |
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc |
index dc1e3ed9495b78b1fe31a00f54067e1fb61d335e..5c4c5a93e79e5bd5cb8438dd6832e3843fa6e5c2 100644 |
--- a/src/bootstrapper.cc |
+++ b/src/bootstrapper.cc |
@@ -2149,13 +2149,15 @@ void Genesis::InitializeGlobal_harmony_proxies() { |
Handle<JSGlobalObject> global( |
JSGlobalObject::cast(native_context()->global_object())); |
Isolate* isolate = global->GetIsolate(); |
- Handle<JSFunction> proxy_fun = |
- InstallFunction(global, "Proxy", JS_PROXY_TYPE, JSProxy::kSize, |
- isolate->initial_object_prototype(), Builtins::kIllegal); |
+ Handle<JSFunction> proxy_fun = InstallFunction( |
+ global, "Proxy", JS_PROXY_TYPE, JSProxy::kSize, |
+ isolate->initial_object_prototype(), Builtins::kProxyConstructor); |
// TODO(verwaest): Set to null in InstallFunction. |
proxy_fun->initial_map()->set_prototype(isolate->heap()->null_value()); |
proxy_fun->shared()->set_construct_stub( |
- *isolate->builtins()->JSBuiltinsConstructStub()); |
+ *isolate->builtins()->ProxyConstructor_ConstructStub()); |
+ proxy_fun->shared()->set_internal_formal_parameter_count(2); |
+ proxy_fun->shared()->set_length(2); |
native_context()->set_proxy_function(*proxy_fun); |
} |