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

Unified 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: 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/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 2e60cf0982ed3ce6947af92d8c973a289f0e80e4..3412197f1d16da570a90e84c262b9b71717022d2 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -656,6 +656,43 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
}
+MaybeHandle<Object> Object::GetPropertyEx(LookupIterator* it,
+ bool& access_check_failed,
+ LanguageMode language_mode) {
+ access_check_failed = false;
caitp (gmail) 2015/10/01 15:16:47 This alternative implementation doesn't change the
+ for (; it->IsFound(); it->Next()) {
+ switch (it->state()) {
+ case LookupIterator::NOT_FOUND:
+ case LookupIterator::TRANSITION:
+ UNREACHABLE();
+ case LookupIterator::JSPROXY:
+ return JSProxy::GetPropertyWithHandler(
+ it->GetHolder<JSProxy>(), it->GetReceiver(), it->GetName());
+ case LookupIterator::INTERCEPTOR: {
+ bool done;
+ Handle<Object> result;
+ ASSIGN_RETURN_ON_EXCEPTION(
+ it->isolate(), result,
+ JSObject::GetPropertyWithInterceptor(it, &done), Object);
+ if (done) return result;
+ break;
+ }
+ case LookupIterator::ACCESS_CHECK:
+ if (it->HasAccess()) break;
+ access_check_failed = true;
+ return it->isolate()->factory()->undefined_value();
+ case LookupIterator::ACCESSOR:
+ return GetPropertyWithAccessor(it, language_mode);
+ case LookupIterator::INTEGER_INDEXED_EXOTIC:
+ return ReadAbsentProperty(it, language_mode);
+ case LookupIterator::DATA:
+ return it->GetDataValue();
+ }
+ }
+ return ReadAbsentProperty(it, language_mode);
+}
+
+
Handle<Object> JSReceiver::GetDataProperty(Handle<JSReceiver> object,
Handle<Name> name) {
LookupIterator it(object, name,
« no previous file with comments | « src/objects.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698