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

Unified Diff: src/objects.cc

Issue 593073002: Stores and compound assignments for named super properties. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased for landing Created 6 years, 3 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
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index bea27922c73d72b37b57e46e0f242c623e903f63..0ff59732be3b2de19613dd9dd43daf802b86bdcb 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -2807,7 +2807,8 @@ MaybeHandle<Object> Object::SetProperty(Handle<Object> object,
MaybeHandle<Object> Object::SetProperty(LookupIterator* it,
Handle<Object> value,
StrictMode strict_mode,
- StoreFromKeyed store_mode) {
+ StoreFromKeyed store_mode,
+ StorePropertyMode data_store_mode) {
// Make sure that the top context does not change when doing callbacks or
// interceptor calls.
AssertNoContextChange ncc(it->isolate());
@@ -2902,6 +2903,16 @@ MaybeHandle<Object> Object::SetProperty(LookupIterator* it,
Object);
}
+ if (data_store_mode == SUPER_PROPERTY) {
+ if (strict_mode == STRICT) {
+ Handle<Object> args[1] = {it->name()};
+ THROW_NEW_ERROR(it->isolate(),
+ NewReferenceError("not_defined", HandleVector(args, 1)),
+ Object);
+ }
+ return value;
+ }
+
return AddDataProperty(it, value, NONE, strict_mode, store_mode);
}

Powered by Google App Engine
This is Rietveld 408576698