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

Unified Diff: src/isolate.cc

Issue 516913003: Do not expose termination exceptions to the Exception API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comment Created 6 years, 4 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/isolate.h ('k') | src/json-parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 028da3d8fc86a62000087050955f817563a74372..f049208ad2c71092d2f8a21afc120974dee29de9 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -645,7 +645,10 @@ void Isolate::ReportFailedAccessCheck(Handle<JSObject> receiver,
v8::AccessType type) {
if (!thread_local_top()->failed_access_check_callback_) {
Handle<String> message = factory()->InternalizeUtf8String("no access");
- ScheduleThrow(*factory()->NewTypeError(message));
+ Handle<Object> error;
+ ASSIGN_RETURN_ON_EXCEPTION_VALUE(
+ this, error, factory()->NewTypeError(message), /* void */);
+ ScheduleThrow(*error);
return;
}
@@ -862,12 +865,6 @@ Object* Isolate::ThrowIllegalOperation() {
}
-Object* Isolate::ThrowInvalidStringLength() {
- return Throw(*factory()->NewRangeError(
- "invalid_string_length", HandleVector<Object>(NULL, 0)));
-}
-
-
void Isolate::ScheduleThrow(Object* exception) {
// When scheduling a throw we first throw the exception to get the
// error reporting if it is uncaught before rescheduling it.
@@ -2361,14 +2358,13 @@ void Isolate::RunMicrotasks() {
Handle<JSFunction>::cast(microtask);
SaveContext save(this);
set_context(microtask_function->context()->native_context());
- Handle<Object> exception;
- MaybeHandle<Object> result = Execution::TryCall(
- microtask_function, factory()->undefined_value(),
- 0, NULL, &exception);
+ MaybeHandle<Object> maybe_exception;
+ MaybeHandle<Object> result =
+ Execution::TryCall(microtask_function, factory()->undefined_value(),
+ 0, NULL, &maybe_exception);
// If execution is terminating, just bail out.
- if (result.is_null() &&
- !exception.is_null() &&
- *exception == heap()->termination_exception()) {
+ Handle<Object> exception;
+ if (result.is_null() && maybe_exception.is_null()) {
// Clear out any remaining callbacks in the queue.
heap()->set_microtask_queue(heap()->empty_fixed_array());
set_pending_microtask_count(0);
« no previous file with comments | « src/isolate.h ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698