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

Side by Side Diff: src/objects.cc

Issue 1230793002: [es6] silence access-check failure for well-known symbol properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ensure @@isConcatSpreadable is actually installed now that its in a separate list Created 5 years, 2 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 | « src/objects.h ('k') | src/objects-inl.h » ('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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after
988 if (it->state() == LookupIterator::ACCESSOR) { 988 if (it->state() == LookupIterator::ACCESSOR) {
989 return GetPropertyWithAccessor(it, SLOPPY); 989 return GetPropertyWithAccessor(it, SLOPPY);
990 } 990 }
991 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state()); 991 DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state());
992 bool done; 992 bool done;
993 Handle<Object> result; 993 Handle<Object> result;
994 ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), result, 994 ASSIGN_RETURN_ON_EXCEPTION(it->isolate(), result,
995 GetPropertyWithInterceptor(it, &done), Object); 995 GetPropertyWithInterceptor(it, &done), Object);
996 if (done) return result; 996 if (done) return result;
997 } 997 }
998
999 // Cross-Origin [[Get]] of Well-Known Symbols does not throw, and returns
1000 // undefined.
1001 Handle<Name> name = it->GetName();
1002 if (name->IsSymbol() && Symbol::cast(*name)->is_well_known_symbol()) {
1003 return it->factory()->undefined_value();
1004 }
1005
998 it->isolate()->ReportFailedAccessCheck(checked); 1006 it->isolate()->ReportFailedAccessCheck(checked);
999 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); 1007 RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object);
1000 return it->factory()->undefined_value(); 1008 return it->factory()->undefined_value();
1001 } 1009 }
1002 1010
1003 1011
1004 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithFailedAccessCheck( 1012 Maybe<PropertyAttributes> JSObject::GetPropertyAttributesWithFailedAccessCheck(
1005 LookupIterator* it) { 1013 LookupIterator* it) {
1006 Handle<JSObject> checked = it->GetHolder<JSObject>(); 1014 Handle<JSObject> checked = it->GetHolder<JSObject>();
1007 while (AllCanRead(it)) { 1015 while (AllCanRead(it)) {
(...skipping 15882 matching lines...) Expand 10 before | Expand all | Expand 10 after
16890 if (cell->value() != *new_value) { 16898 if (cell->value() != *new_value) {
16891 cell->set_value(*new_value); 16899 cell->set_value(*new_value);
16892 Isolate* isolate = cell->GetIsolate(); 16900 Isolate* isolate = cell->GetIsolate();
16893 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16901 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16894 isolate, DependentCode::kPropertyCellChangedGroup); 16902 isolate, DependentCode::kPropertyCellChangedGroup);
16895 } 16903 }
16896 } 16904 }
16897 16905
16898 } // namespace internal 16906 } // namespace internal
16899 } // namespace v8 16907 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698