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

Side by Side Diff: src/objects.cc

Issue 1424233005: Fix another corner-case behavior of Object::SetSuperProperty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment. Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/es6/super.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <iomanip> 8 #include <iomanip>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 3748 matching lines...) Expand 10 before | Expand all | Expand 10 after
3759 should_throw); 3759 should_throw);
3760 } 3760 }
3761 break; 3761 break;
3762 3762
3763 case LookupIterator::INTEGER_INDEXED_EXOTIC: 3763 case LookupIterator::INTEGER_INDEXED_EXOTIC:
3764 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value, 3764 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value,
3765 should_throw); 3765 should_throw);
3766 3766
3767 case LookupIterator::DATA: { 3767 case LookupIterator::DATA: {
3768 PropertyDetails details = own_lookup.property_details(); 3768 PropertyDetails details = own_lookup.property_details();
3769 if (details.IsConfigurable() || !details.IsReadOnly()) { 3769 if (details.IsReadOnly()) {
3770 return JSObject::DefineOwnPropertyIgnoreAttributes( 3770 return WriteToReadOnlyProperty(&own_lookup, value, should_throw);
3771 &own_lookup, value, details.attributes(), should_throw);
3772 } 3771 }
3773 return WriteToReadOnlyProperty(&own_lookup, value, should_throw); 3772 return SetDataProperty(&own_lookup, value, should_throw);
Toon Verwaest 2015/11/03 13:18:25 DefineOwnPropertyIgnoreAttributes used to pass in
3774 } 3773 }
3775 3774
3776 case LookupIterator::ACCESSOR: { 3775 case LookupIterator::ACCESSOR: {
3777 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value, 3776 return RedefineIncompatibleProperty(it->isolate(), it->GetName(), value,
3778 should_throw); 3777 should_throw);
3779 } 3778 }
3780 3779
3781 case LookupIterator::INTERCEPTOR: 3780 case LookupIterator::INTERCEPTOR:
3782 case LookupIterator::JSPROXY: { 3781 case LookupIterator::JSPROXY: {
3783 bool found = false; 3782 bool found = false;
(...skipping 14225 matching lines...) Expand 10 before | Expand all | Expand 10 after
18009 if (cell->value() != *new_value) { 18008 if (cell->value() != *new_value) {
18010 cell->set_value(*new_value); 18009 cell->set_value(*new_value);
18011 Isolate* isolate = cell->GetIsolate(); 18010 Isolate* isolate = cell->GetIsolate();
18012 cell->dependent_code()->DeoptimizeDependentCodeGroup( 18011 cell->dependent_code()->DeoptimizeDependentCodeGroup(
18013 isolate, DependentCode::kPropertyCellChangedGroup); 18012 isolate, DependentCode::kPropertyCellChangedGroup);
18014 } 18013 }
18015 } 18014 }
18016 18015
18017 } // namespace internal 18016 } // namespace internal
18018 } // namespace v8 18017 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698