Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 2bc2299ed79ef09c531ebc7d86a79188e0cb504c..433dda7d6f98daa1aac991c04413c4d3d4501bc8 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -1011,8 +1011,7 @@ |
it->isolate()->ReportFailedAccessCheck(checked); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); |
- UNREACHABLE(); |
- return MaybeHandle<Object>(); |
+ return it->factory()->undefined_value(); |
} |
@@ -1031,8 +1030,7 @@ |
it->isolate()->ReportFailedAccessCheck(checked); |
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), |
Nothing<PropertyAttributes>()); |
- UNREACHABLE(); |
- return Nothing<PropertyAttributes>(); |
+ return Just(ABSENT); |
} |
@@ -1061,6 +1059,8 @@ |
it->isolate()->ReportFailedAccessCheck(checked); |
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(it->isolate(), Nothing<bool>()); |
UNREACHABLE(); |
+ it->isolate()->Throw( |
+ *it->isolate()->factory()->NewTypeError(MessageTemplate::kNoAccess)); |
return Nothing<bool>(); |
} |
@@ -4792,7 +4792,7 @@ |
if (!it->HasAccess()) { |
it->isolate()->ReportFailedAccessCheck(it->GetHolder<JSObject>()); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(it->isolate(), Object); |
- UNREACHABLE(); |
+ return value; |
} |
break; |
@@ -5821,7 +5821,7 @@ |
if (it->HasAccess()) break; |
isolate->ReportFailedAccessCheck(it->GetHolder<JSObject>()); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
- UNREACHABLE(); |
+ return it->factory()->false_value(); |
case LookupIterator::INTERCEPTOR: { |
MaybeHandle<Object> maybe_result = |
JSObject::DeletePropertyWithInterceptor(it); |
@@ -6782,6 +6782,8 @@ |
isolate->ReportFailedAccessCheck(object); |
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); |
UNREACHABLE(); |
+ RETURN_FAILURE(isolate, should_throw, |
+ NewTypeError(MessageTemplate::kNoAccess)); |
} |
if (object->IsJSGlobalProxy()) { |
@@ -6881,6 +6883,8 @@ |
isolate->ReportFailedAccessCheck(object); |
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>()); |
UNREACHABLE(); |
+ RETURN_FAILURE(isolate, should_throw, |
+ NewTypeError(MessageTemplate::kNoAccess)); |
} |
if (object->IsJSGlobalProxy()) { |
@@ -7774,7 +7778,6 @@ |
if (iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) { |
isolate->ReportFailedAccessCheck(current); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray); |
- UNREACHABLE(); |
} |
break; |
} |
@@ -7887,7 +7890,7 @@ |
if (!it->HasAccess()) { |
isolate->ReportFailedAccessCheck(it->GetHolder<JSObject>()); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
- UNREACHABLE(); |
+ return isolate->factory()->undefined_value(); |
} |
it->Next(); |
} |
@@ -7952,7 +7955,7 @@ |
if (!it.HasAccess()) { |
isolate->ReportFailedAccessCheck(object); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
- UNREACHABLE(); |
+ return it.factory()->undefined_value(); |
} |
it.Next(); |
} |
@@ -7999,7 +8002,7 @@ |
if (it.HasAccess()) continue; |
isolate->ReportFailedAccessCheck(it.GetHolder<JSObject>()); |
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, Object); |
- UNREACHABLE(); |
+ return isolate->factory()->undefined_value(); |
case LookupIterator::JSPROXY: |
return isolate->factory()->undefined_value(); |