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

Unified Diff: src/objects.cc

Issue 271433002: Do not call setters of read-only accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | test/mjsunit/readonly-accessor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index a30d6ab0d1ceccea5a973752c3963faac83d651e..01de39f0250f3fb559f09170fbb883f07235e777 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -3147,9 +3147,12 @@ MaybeHandle<Object> JSObject::SetPropertyViaPrototypes(
}
case CALLBACKS: {
*done = true;
- Handle<Object> callback_object(result.GetCallbackObject(), isolate);
- return SetPropertyWithCallback(object, callback_object, name, value,
- handle(result.holder()), strict_mode);
+ if (!result.IsReadOnly()) {
+ Handle<Object> callback_object(result.GetCallbackObject(), isolate);
+ return SetPropertyWithCallback(object, callback_object, name, value,
+ handle(result.holder()), strict_mode);
+ }
+ break;
}
case HANDLER: {
Handle<JSProxy> proxy(result.proxy());
« no previous file with comments | « no previous file | test/mjsunit/readonly-accessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698