Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index a90f9c9e46849c56ae8efcd1102c20c1e333d61a..3ce581a32b90817d6b4d79b7a9fa601de84d7c41 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -744,16 +744,9 @@ static inline AccessCheckInfo* GetAccessCheckInfo(Isolate* isolate, |
} |
-static void ThrowAccessCheckError(Isolate* isolate) { |
- Handle<String> message = |
- isolate->factory()->InternalizeUtf8String("no access"); |
- isolate->ScheduleThrow(*isolate->factory()->NewTypeError(message)); |
-} |
- |
- |
void Isolate::ReportFailedAccessCheck(Handle<JSObject> receiver) { |
if (!thread_local_top()->failed_access_check_callback_) { |
- return ThrowAccessCheckError(this); |
+ return ScheduleThrow(*factory()->NewTypeError(MessageTemplate::kNoAccess)); |
} |
DCHECK(receiver->IsAccessCheckNeeded()); |
@@ -766,7 +759,8 @@ void Isolate::ReportFailedAccessCheck(Handle<JSObject> receiver) { |
AccessCheckInfo* access_check_info = GetAccessCheckInfo(this, receiver); |
if (!access_check_info) { |
AllowHeapAllocation doesnt_matter_anymore; |
- return ThrowAccessCheckError(this); |
+ return ScheduleThrow( |
+ *factory()->NewTypeError(MessageTemplate::kNoAccess)); |
} |
data = handle(access_check_info->data(), this); |
} |