summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorFedor Indutny <fedor@indutny.com>2014-07-24 09:31:45 +0000
committerTrevor Norris <trev.norris@gmail.com>2014-09-09 16:52:46 -0700
commit630f0c4660f9c9fb7c6b1f032e92fc1ca238f0e9 (patch)
tree2f763e8ca858e31c81c7a4832e7f793e9234366c /deps
parentf3836af2f8029274fc793bd55e53ef23ba8b4ec2 (diff)
downloadandroid-node-v8-630f0c4660f9c9fb7c6b1f032e92fc1ca238f0e9.tar.gz
android-node-v8-630f0c4660f9c9fb7c6b1f032e92fc1ca238f0e9.tar.bz2
android-node-v8-630f0c4660f9c9fb7c6b1f032e92fc1ca238f0e9.zip
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 <fedor@indutny.com> fix #7969
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/src/stub-cache.cc13
1 files changed, 12 insertions, 1 deletions
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<JSObject> receiver = args.at<JSObject>(0);
Handle<Name> name = args.at<Name>(1);
Handle<Object> value = args.at<Object>(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>(JSObject::cast(proto));
+ } else {
+#ifdef DEBUG
+ ASSERT(receiver->HasNamedInterceptor());
+#endif
+ }
PropertyAttributes attr = NONE;
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(