| Index: test/cctest/test-thread-termination.cc
|
| diff --git a/test/cctest/test-thread-termination.cc b/test/cctest/test-thread-termination.cc
|
| index d0c73e32e8ce24c0c4fa4d345f8fe48b86e2248b..cebabaa97e84fe0076da552d5cd6bd435f14f7bc 100644
|
| --- a/test/cctest/test-thread-termination.cc
|
| +++ b/test/cctest/test-thread-termination.cc
|
| @@ -373,41 +373,3 @@ TEST(TerminateAndReenterFromThreadItself) {
|
| context.Dispose();
|
| }
|
|
|
| -
|
| -v8::Handle<v8::Value> DoLoopResume(const v8::Arguments& args) {
|
| - v8::TryCatch try_catch;
|
| - CHECK(!v8::V8::IsExecutionTerminating());
|
| - v8::Script::Compile(v8::String::New("var term = true;"
|
| - "while(true) {"
|
| - " if (term) terminate();"
|
| - " term = false;"
|
| - "}"))->Run();
|
| - CHECK(try_catch.HasCaught());
|
| - CHECK(try_catch.Exception()->IsNull());
|
| - CHECK(try_catch.Message().IsEmpty());
|
| - CHECK(!try_catch.CanContinue());
|
| - CHECK(v8::V8::IsExecutionTerminating());
|
| - CHECK(try_catch.HasTerminated());
|
| - v8::V8::ResumeExecution(v8::Isolate::GetCurrent());
|
| - CHECK(!v8::V8::IsExecutionTerminating());
|
| - return v8::Undefined();
|
| -}
|
| -
|
| -// Test that a single thread of JavaScript execution can terminate+
|
| -// itself and then resume execution.
|
| -TEST(TerminateResumeFromThreadItself) {
|
| - v8::HandleScope scope;
|
| - v8::Handle<v8::ObjectTemplate> global =
|
| - CreateGlobalTemplate(TerminateCurrentThread, DoLoopResume);
|
| - v8::Persistent<v8::Context> context = v8::Context::New(NULL, global);
|
| - v8::Context::Scope context_scope(context);
|
| - CHECK(!v8::V8::IsExecutionTerminating());
|
| - // Run a loop that will be infinite if thread termination does not work.
|
| - v8::Handle<v8::String> source =
|
| - v8::String::New("try { doloop(); } catch(e) { fail(); }");
|
| - v8::Script::Compile(source)->Run();
|
| - // Test that we can run the code again after thread termination.
|
| - CHECK(!v8::V8::IsExecutionTerminating());
|
| - v8::Script::Compile(source)->Run();
|
| - context.Dispose();
|
| -}
|
|
|