Chromium Code Reviews| Index: src/runtime/runtime-proxy.cc |
| diff --git a/src/runtime/runtime-proxy.cc b/src/runtime/runtime-proxy.cc |
| index 7764d25c5823d24ff880b32ad47a29d90877ee33..b7e13f180bcd21165b6ca17bfa03aabec6049155 100644 |
| --- a/src/runtime/runtime-proxy.cc |
| +++ b/src/runtime/runtime-proxy.cc |
| @@ -21,6 +21,14 @@ RUNTIME_FUNCTION(Runtime_JSProxyCall) { |
| // thisArgument == receiver |
| CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
| CONVERT_ARG_HANDLE_CHECKED(JSProxy, proxy, args.length() - 1); |
| + |
| + if (V8_UNLIKELY(!proxy->target()->IsCallable())) { |
| + // TODO(caitp): Remove when handled in compiler/backends/builtins |
| + Handle<String> callsite = Runtime::RenderCallSite(isolate, proxy); |
| + THROW_NEW_ERROR_RETURN_FAILURE( |
| + isolate, NewTypeError(MessageTemplate::kCalledNonCallable, callsite)); |
|
Camillo Bruni
2016/03/02 17:41:03
Would you mind fixing it directly in PLATFORM/buil
caitp (gmail)
2016/03/02 18:26:57
Done, with ports for ia32, x64, arm and arm64
|
| + } |
| + |
| Handle<String> trap_name = isolate->factory()->apply_string(); |
| // 1. Let handler be the value of the [[ProxyHandler]] internal slot of O. |
| Handle<Object> handler(proxy->handler(), isolate); |