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

Unified Diff: src/builtins.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: Refactor (Alternative Impl.) Created 5 years, 3 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 | « src/api.cc ('k') | src/objects.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 444f9a308b4297012940a1aa1829593a00695146..8395b31fc9787566b87100d7b0f924b9e74cff3a 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -1186,11 +1186,17 @@ bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) {
HandleScope handle_scope(isolate);
if (!obj->IsSpecObject()) return false;
if (FLAG_harmony_concat_spreadable) {
+ // [[Get]] @@isConcatSpreadable from object. If an access check failed,
+ // ignore the resulting value and use the default behaviour. Otherwise,
+ // use the boolean value of the result.
Handle<Symbol> key(isolate->factory()->is_concat_spreadable_symbol());
Handle<Object> value;
+ bool access_check_failed;
+ LookupIterator it(obj, key, LookupIterator::DEFAULT);
MaybeHandle<Object> maybeValue =
- i::Runtime::GetObjectProperty(isolate, obj, key);
- if (maybeValue.ToHandle(&value) && !value->IsUndefined()) {
+ Object::GetPropertyEx(&it, access_check_failed);
+ if (!access_check_failed && maybeValue.ToHandle(&value) &&
+ !value->IsUndefined()) {
return value->BooleanValue();
}
}
« no previous file with comments | « src/api.cc ('k') | src/objects.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698