Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index 4e2b668ea37dcd892e931ec7001748c643f4d552..267d3708e83c2f3e3121418c3849f7bb2a2310b8 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -1901,31 +1901,6 @@ BUILTIN(ObjectProtoToString) { |
namespace { |
-// ES6 section 9.5.15 ProxyCreate (target, handler) |
-MaybeHandle<JSProxy> ProxyCreate(Isolate* isolate, Handle<Object> target, |
- Handle<Object> handler) { |
- if (!target->IsJSReceiver()) { |
- THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kProxyNonObject), |
- JSProxy); |
- } |
- if (target->IsJSProxy() && JSProxy::cast(*target)->IsRevoked()) { |
- THROW_NEW_ERROR(isolate, |
- NewTypeError(MessageTemplate::kProxyHandlerOrTargetRevoked), |
- JSProxy); |
- } |
- if (!handler->IsJSReceiver()) { |
- THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kProxyNonObject), |
- JSProxy); |
- } |
- if (handler->IsJSProxy() && JSProxy::cast(*handler)->IsRevoked()) { |
- THROW_NEW_ERROR(isolate, |
- NewTypeError(MessageTemplate::kProxyHandlerOrTargetRevoked), |
- JSProxy); |
- } |
- return isolate->factory()->NewJSProxy(Handle<JSReceiver>::cast(target), |
- Handle<JSReceiver>::cast(handler)); |
-} |
- |
} // namespace |
@@ -1960,7 +1935,7 @@ BUILTIN(ProxyConstructor_ConstructStub) { |
isolate->set_context(args.target()->context()); |
Handle<JSProxy> result; |
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, result, |
- ProxyCreate(isolate, target, handler)); |
+ JSProxy::New(isolate, target, handler)); |
return *result; |
} |