From 9a63a1d89b5a2a015eadd5ef5d7e42039858c5ae Mon Sep 17 00:00:00 2001 From: Fedor Indutny Date: Thu, 24 Jul 2014 09:31:45 +0000 Subject: [PATCH] deps: backport 60c316 from v8 trunk Original commit message: Extend the interceptor setter ASSERT to support the JSGlobalProxy case. BUG=v8:3463 LOG=n R=dcarney@chromium.org Review URL: https://codereview.chromium.org/415973004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22589 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 Signed-off-by: Fedor Indutny fix #7969 --- deps/v8/src/stub-cache.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/deps/v8/src/stub-cache.cc b/deps/v8/src/stub-cache.cc index 6bf209bc0a..ef9faefc83 100644 --- a/deps/v8/src/stub-cache.cc +++ b/deps/v8/src/stub-cache.cc @@ -633,7 +633,18 @@ RUNTIME_FUNCTION(StoreInterceptorProperty) { Handle receiver = args.at(0); Handle name = args.at(1); Handle value = args.at(2); - ASSERT(receiver->HasNamedInterceptor()); + if (receiver->IsJSGlobalProxy()) { + Object* proto = Object::cast(*receiver)->GetPrototype(isolate); +#ifdef DEBUG + ASSERT(proto == NULL || + JSGlobalObject::cast(proto)->HasNamedInterceptor()); +#endif + receiver = Handle(JSObject::cast(proto)); + } else { +#ifdef DEBUG + ASSERT(receiver->HasNamedInterceptor()); +#endif + } PropertyAttributes attr = NONE; Handle result; ASSIGN_RETURN_FAILURE_ON_EXCEPTION(