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

Unified Diff: src/objects.cc

Issue 1199493002: Revert relanded strong property access CL (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('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 44b3721b1a67738546aaf2416a6331113d2f8cd5..596806d58c7c6500b5eca86d1afb0e596d50e134 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -127,8 +127,7 @@ bool Object::IsPromise(Handle<Object> object) {
}
-MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
- LanguageMode language_mode) {
+MaybeHandle<Object> Object::GetProperty(LookupIterator* it) {
for (; it->IsFound(); it->Next()) {
switch (it->state()) {
case LookupIterator::NOT_FOUND:
@@ -148,16 +147,16 @@ MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
}
case LookupIterator::ACCESS_CHECK:
if (it->HasAccess()) break;
- return JSObject::GetPropertyWithFailedAccessCheck(it, language_mode);
+ return JSObject::GetPropertyWithFailedAccessCheck(it);
case LookupIterator::ACCESSOR:
- return GetPropertyWithAccessor(it, language_mode);
+ return GetPropertyWithAccessor(it);
case LookupIterator::INTEGER_INDEXED_EXOTIC:
- return ReadAbsentProperty(it, language_mode);
+ return it->factory()->undefined_value();
case LookupIterator::DATA:
return it->GetDataValue();
}
}
- return ReadAbsentProperty(it, language_mode);
+ return it->factory()->undefined_value();
}
@@ -305,8 +304,7 @@ MaybeHandle<Object> JSProxy::GetPropertyWithHandler(Handle<JSProxy> proxy,
}
-MaybeHandle<Object> Object::GetPropertyWithAccessor(
- LookupIterator* it, LanguageMode language_mode) {
+MaybeHandle<Object> Object::GetPropertyWithAccessor(LookupIterator* it) {
Isolate* isolate = it->isolate();
Handle<Object> structure = it->GetAccessors();
Handle<Object> receiver = it->GetReceiver();
@@ -338,7 +336,7 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(
args.Call(call_fun, v8::Utils::ToLocal(name));
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object);
if (result.IsEmpty()) {
- return ReadAbsentProperty(isolate, receiver, name, language_mode);
+ return isolate->factory()->undefined_value();
}
Handle<Object> return_value = v8::Utils::OpenHandle(*result);
return_value->VerifyApiCallResultType();
@@ -354,7 +352,7 @@ MaybeHandle<Object> Object::GetPropertyWithAccessor(
receiver, Handle<JSReceiver>::cast(getter));
}
// Getter is not a function.
- return ReadAbsentProperty(isolate, receiver, it->GetName(), language_mode);
+ return isolate->factory()->undefined_value();
}
@@ -490,11 +488,11 @@ static bool FindAllCanReadHolder(LookupIterator* it) {
MaybeHandle<Object> JSObject::GetPropertyWithFailedAccessCheck(
- LookupIterator* it, LanguageMode language_mode) {
+ LookupIterator* it) {
Handle<JSObject> checked = it->GetHolder<JSObject>();
while (FindAllCanReadHolder(it)) {
if (it->state() == LookupIterator::ACCESSOR) {
- return GetPropertyWithAccessor(it, language_mode);
+ return GetPropertyWithAccessor(it);
}
DCHECK_EQ(LookupIterator::INTERCEPTOR, it->state());
bool done;
@@ -3225,26 +3223,6 @@ MaybeHandle<Object> Object::SetSuperProperty(LookupIterator* it,
}
-MaybeHandle<Object> Object::ReadAbsentProperty(LookupIterator* it,
- LanguageMode language_mode) {
- return ReadAbsentProperty(it->isolate(), it->GetReceiver(), it->GetName(),
- language_mode);
-}
-
-MaybeHandle<Object> Object::ReadAbsentProperty(Isolate* isolate,
- Handle<Object> receiver,
- Handle<Object> name,
- LanguageMode language_mode) {
- if (is_strong(language_mode)) {
- THROW_NEW_ERROR(
- isolate,
- NewTypeError(MessageTemplate::kStrongPropertyAccess, name, receiver),
- Object);
- }
- return isolate->factory()->undefined_value();
-}
-
-
MaybeHandle<Object> Object::WriteToReadOnlyProperty(
LookupIterator* it, Handle<Object> value, LanguageMode language_mode) {
return WriteToReadOnlyProperty(it->isolate(), it->GetReceiver(),
« 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