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

Side by Side Diff: src/objects.cc

Issue 1580723003: Gracefully handle proxies in AllCanWrite(). (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add regression test. Created 4 years, 11 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/harmony/regress/regress-576662.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 } 1359 }
1360 it->isolate()->ReportFailedAccessCheck(checked); 1360 it->isolate()->ReportFailedAccessCheck(checked);
1361 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), 1361 RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(),
1362 Nothing<PropertyAttributes>()); 1362 Nothing<PropertyAttributes>());
1363 return Just(ABSENT); 1363 return Just(ABSENT);
1364 } 1364 }
1365 1365
1366 1366
1367 // static 1367 // static
1368 bool JSObject::AllCanWrite(LookupIterator* it) { 1368 bool JSObject::AllCanWrite(LookupIterator* it) {
1369 for (; it->IsFound(); it->Next()) { 1369 for (; it->IsFound() && it->state() != LookupIterator::JSPROXY; it->Next()) {
1370 if (it->state() == LookupIterator::ACCESSOR) { 1370 if (it->state() == LookupIterator::ACCESSOR) {
1371 Handle<Object> accessors = it->GetAccessors(); 1371 Handle<Object> accessors = it->GetAccessors();
1372 if (accessors->IsAccessorInfo()) { 1372 if (accessors->IsAccessorInfo()) {
1373 if (AccessorInfo::cast(*accessors)->all_can_write()) return true; 1373 if (AccessorInfo::cast(*accessors)->all_can_write()) return true;
1374 } 1374 }
1375 } 1375 }
1376 } 1376 }
1377 return false; 1377 return false;
1378 } 1378 }
1379 1379
(...skipping 18270 matching lines...) Expand 10 before | Expand all | Expand 10 after
19650 if (cell->value() != *new_value) { 19650 if (cell->value() != *new_value) {
19651 cell->set_value(*new_value); 19651 cell->set_value(*new_value);
19652 Isolate* isolate = cell->GetIsolate(); 19652 Isolate* isolate = cell->GetIsolate();
19653 cell->dependent_code()->DeoptimizeDependentCodeGroup( 19653 cell->dependent_code()->DeoptimizeDependentCodeGroup(
19654 isolate, DependentCode::kPropertyCellChangedGroup); 19654 isolate, DependentCode::kPropertyCellChangedGroup);
19655 } 19655 }
19656 } 19656 }
19657 19657
19658 } // namespace internal 19658 } // namespace internal
19659 } // namespace v8 19659 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-576662.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698