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

Unified Diff: src/objects.cc

Issue 1821723004: Ensure CreateDataProperty works correctly on TypedArrays (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: reverse polarity of test Created 4 years, 8 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/regress/regress-crbug-596394.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 026f01d826542960581dc4c58a39e76b57a07184..010d8da501e1ae81ec23176663ff136932bd8f58 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6685,7 +6685,9 @@ Maybe<bool> JSObject::CreateDataProperty(LookupIterator* it,
Isolate* isolate = receiver->GetIsolate();
if (it->IsFound()) {
- if (!it->IsConfigurable()) {
+ Maybe<PropertyAttributes> attributes = GetPropertyAttributes(it);
+ MAYBE_RETURN(attributes, Nothing<bool>());
+ if ((attributes.FromJust() & DONT_DELETE) != 0) {
RETURN_FAILURE(
isolate, should_throw,
NewTypeError(MessageTemplate::kRedefineDisallowed, it->GetName()));
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-596394.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698