Reviewers: dcarney,

Message:
PTAL

Description:
Extend the interceptor setter ASSERT to support the JSGlobalProxy case.

BUG=v8:3463
LOG=n

Please review this at https://codereview.chromium.org/415973004/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+10, -1 lines):
  M src/stub-cache.cc


Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index 845d4d40476a0d2f0be79068771ab555ad1fe875..c88ba26fa2961a323c987448df2590347a5be22a 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -606,7 +606,16 @@ 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());
+#ifdef DEBUG
+  if (receiver->IsJSGlobalProxy()) {
+    PrototypeIterator iter(isolate, receiver);
+    ASSERT(iter.IsAtEnd() ||
+ Handle<JSGlobalObject>::cast(PrototypeIterator::GetCurrent(iter))
+               ->HasNamedInterceptor());
+  } else {
+    ASSERT(receiver->HasNamedInterceptor());
+  }
+#endif
   Handle<Object> result;
   ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
       isolate, result,


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to