Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Unified Diff: src/stub-cache.cc

Issue 415973004: Extend the interceptor setter ASSERT to support the JSGlobalProxy case. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698