| Index: src/objects.cc
|
| diff --git a/src/objects.cc b/src/objects.cc
|
| index 927194f70daf2a14fb3d7617514f6326a293aacb..c46da4a0df8fc8cf0c1c8cd98064cfe8f5bb018b 100644
|
| --- a/src/objects.cc
|
| +++ b/src/objects.cc
|
| @@ -1823,8 +1823,9 @@ void JSObject::LookupRealNamedPropertyInPrototypes(String* name,
|
| // We only need to deal with CALLBACKS and INTERCEPTORS
|
| MaybeObject* JSObject::SetPropertyWithFailedAccessCheck(LookupResult* result,
|
| String* name,
|
| - Object* value) {
|
| - if (!result->IsProperty()) {
|
| + Object* value,
|
| + bool check_prototype) {
|
| + if (check_prototype && !result->IsProperty()) {
|
| LookupCallbackSetterInPrototypes(name, result);
|
| }
|
|
|
| @@ -1850,7 +1851,8 @@ MaybeObject* JSObject::SetPropertyWithFailedAccessCheck(LookupResult* result,
|
| LookupResult r;
|
| LookupRealNamedProperty(name, &r);
|
| if (r.IsProperty()) {
|
| - return SetPropertyWithFailedAccessCheck(&r, name, value);
|
| + return SetPropertyWithFailedAccessCheck(&r, name, value,
|
| + check_prototype);
|
| }
|
| break;
|
| }
|
| @@ -1891,7 +1893,7 @@ MaybeObject* JSObject::SetProperty(LookupResult* result,
|
| // Check access rights if needed.
|
| if (IsAccessCheckNeeded()
|
| && !Top::MayNamedAccess(this, name, v8::ACCESS_SET)) {
|
| - return SetPropertyWithFailedAccessCheck(result, name, value);
|
| + return SetPropertyWithFailedAccessCheck(result, name, value, true);
|
| }
|
|
|
| if (IsJSGlobalProxy()) {
|
| @@ -1993,7 +1995,7 @@ MaybeObject* JSObject::IgnoreAttributesAndSetLocalProperty(
|
| // Check access rights if needed.
|
| if (IsAccessCheckNeeded()
|
| && !Top::MayNamedAccess(this, name, v8::ACCESS_SET)) {
|
| - return SetPropertyWithFailedAccessCheck(&result, name, value);
|
| + return SetPropertyWithFailedAccessCheck(&result, name, value, false);
|
| }
|
|
|
| if (IsJSGlobalProxy()) {
|
|
|