Skip to content

Commit 3dfd929

Browse files
committed
Version 4.2.77.1
Revert "Correctly propagate terminate exception in TryCall." This reverts commit a49b55b. [email protected] [email protected], [email protected], [email protected] BUG=v8:3892 LOG=n Review URL: https://codereview.chromium.org/945243002 Cr-Commit-Position: refs/heads/4.2.77@{#2} Cr-Branched-From: e011092-refs/heads/master@{#26757}
1 parent ad55afc commit 3dfd929

File tree

3 files changed

+8
-37
lines changed

3 files changed

+8
-37
lines changed

src/execution.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,18 +210,19 @@ MaybeHandle<Object> Execution::TryCall(Handle<JSFunction> func,
210210
DCHECK(catcher.HasCaught());
211211
DCHECK(isolate->has_pending_exception());
212212
DCHECK(isolate->external_caught_exception());
213-
if (isolate->pending_exception() ==
214-
isolate->heap()->termination_exception()) {
215-
is_termination = true;
216-
} else {
217-
if (exception_out != NULL) {
213+
if (exception_out != NULL) {
214+
if (isolate->pending_exception() ==
215+
isolate->heap()->termination_exception()) {
216+
is_termination = true;
217+
} else {
218218
*exception_out = v8::Utils::OpenHandle(*catcher.Exception());
219219
}
220220
}
221-
isolate->OptionalRescheduleException(false);
221+
isolate->OptionalRescheduleException(true);
222222
}
223223

224224
DCHECK(!isolate->has_pending_exception());
225+
DCHECK(!isolate->external_caught_exception());
225226
}
226227
if (is_termination) isolate->TerminateExecution();
227228
return maybe_result;

src/version.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define MAJOR_VERSION 4
1313
#define MINOR_VERSION 2
1414
#define BUILD_NUMBER 77
15-
#define PATCH_LEVEL 0
15+
#define PATCH_LEVEL 1
1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)
1818
#define IS_CANDIDATE_VERSION 0

test/cctest/test-thread-termination.cc

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -474,33 +474,3 @@ TEST(ErrorObjectAfterTermination) {
474474
// TODO(yangguo): crbug/403509. Check for empty handle instead.
475475
CHECK(error->IsUndefined());
476476
}
477-
478-
479-
void InnerTryCallTerminate(const v8::FunctionCallbackInfo<v8::Value>& args) {
480-
CHECK(!v8::V8::IsExecutionTerminating(args.GetIsolate()));
481-
v8::Handle<v8::Object> global = CcTest::global();
482-
v8::Handle<v8::Function> loop =
483-
v8::Handle<v8::Function>::Cast(global->Get(v8_str("loop")));
484-
i::MaybeHandle<i::Object> result =
485-
i::Execution::TryCall(v8::Utils::OpenHandle((*loop)),
486-
v8::Utils::OpenHandle((*global)), 0, NULL, NULL);
487-
CHECK(result.is_null());
488-
CHECK(v8::V8::IsExecutionTerminating(CcTest::isolate()));
489-
}
490-
491-
492-
TEST(TerminationInInnerTryCall) {
493-
v8::Isolate* isolate = CcTest::isolate();
494-
v8::HandleScope scope(isolate);
495-
v8::Handle<v8::ObjectTemplate> global_template = CreateGlobalTemplate(
496-
CcTest::isolate(), TerminateCurrentThread, DoLoopNoCall);
497-
global_template->Set(
498-
v8_str("inner_try_call_terminate"),
499-
v8::FunctionTemplate::New(isolate, InnerTryCallTerminate));
500-
v8::Handle<v8::Context> context =
501-
v8::Context::New(CcTest::isolate(), NULL, global_template);
502-
v8::Context::Scope context_scope(context);
503-
v8::TryCatch try_catch;
504-
CompileRun("inner_try_call_terminate()");
505-
CHECK(try_catch.HasTerminated());
506-
}

0 commit comments

Comments
 (0)