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

Unified Diff: src/objects.cc

Issue 1259853002: Cross-script variables handling fixed. It was possible to write to read-only global variable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/mips64/code-stubs-mips64.cc ('k') | src/runtime/runtime-object.cc » ('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 5e218e80bde24d323e57cd372099f9147a52d2e9..4227b7f190bc04bb96874e5197dab45e8210d68a 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -15887,7 +15887,9 @@ void PropertyCell::UpdateCell(Handle<GlobalDictionary> dictionary, int entry,
const PropertyDetails original_details = cell->property_details();
// Data accesses could be cached in ics or optimized code.
bool invalidate =
- original_details.kind() == kData && details.kind() == kAccessor;
+ (original_details.kind() == kData && details.kind() == kAccessor) ||
+ ((original_details.attributes() & READ_ONLY) !=
+ (details.attributes() & READ_ONLY));
int index = original_details.dictionary_index();
PropertyCellType old_type = original_details.cell_type();
// Preserve the enumeration index unless the property was deleted or never
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698