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

Side by Side Diff: src/objects.cc

Issue 1161073002: [es6] Make sure we call add property when adding a new property (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/es6/regress/regress-cr493566.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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 3315 matching lines...) Expand 10 before | Expand all | Expand 10 after
3326 UNREACHABLE(); 3326 UNREACHABLE();
3327 break; 3327 break;
3328 3328
3329 case LookupIterator::INTERCEPTOR: 3329 case LookupIterator::INTERCEPTOR:
3330 case LookupIterator::JSPROXY: 3330 case LookupIterator::JSPROXY:
3331 case LookupIterator::ACCESS_CHECK: { 3331 case LookupIterator::ACCESS_CHECK: {
3332 bool found = false; 3332 bool found = false;
3333 MaybeHandle<Object> result = SetPropertyInternal( 3333 MaybeHandle<Object> result = SetPropertyInternal(
3334 &own_lookup, value, language_mode, store_mode, &found); 3334 &own_lookup, value, language_mode, store_mode, &found);
3335 if (found) return result; 3335 if (found) return result;
3336 return SetDataProperty(&own_lookup, value); 3336 return AddDataProperty(&own_lookup, value, NONE, language_mode,
arv (Not doing code reviews) 2015/06/01 14:17:58 AddDataProperty has a DCHECK that the receiver is
caitp (gmail) 2015/06/01 14:36:38 In the current implementation, found can be false
Toon Verwaest 2015/06/01 14:37:03 Not if the receiver is the proxy, as is the case h
Toon Verwaest 2015/06/01 14:41:29 I think you'd want to make this switch nested in a
3337 store_mode);
3337 } 3338 }
3338 } 3339 }
3339 3340
3340 UNREACHABLE(); 3341 UNREACHABLE();
3341 return MaybeHandle<Object>(); 3342 return MaybeHandle<Object>();
3342 } 3343 }
3343 3344
3344 3345
3345 MaybeHandle<Object> Object::WriteToReadOnlyProperty( 3346 MaybeHandle<Object> Object::WriteToReadOnlyProperty(
3346 LookupIterator* it, Handle<Object> value, LanguageMode language_mode) { 3347 LookupIterator* it, Handle<Object> value, LanguageMode language_mode) {
(...skipping 14017 matching lines...) Expand 10 before | Expand all | Expand 10 after
17364 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17365 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17365 Handle<Object> new_value) { 17366 Handle<Object> new_value) {
17366 if (cell->value() != *new_value) { 17367 if (cell->value() != *new_value) {
17367 cell->set_value(*new_value); 17368 cell->set_value(*new_value);
17368 Isolate* isolate = cell->GetIsolate(); 17369 Isolate* isolate = cell->GetIsolate();
17369 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17370 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17370 isolate, DependentCode::kPropertyCellChangedGroup); 17371 isolate, DependentCode::kPropertyCellChangedGroup);
17371 } 17372 }
17372 } 17373 }
17373 } } // namespace v8::internal 17374 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/es6/regress/regress-cr493566.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698