Reviewers: Yang,

Description:
Revert r11834 because of broken Chromium unit test.

[email protected]
BUG=v8:2166


Please review this at https://chromiumcodereview.appspot.com/10630003/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/isolate.cc
  M test/cctest/test-api.cc


Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index c2013e3e38b43b31b43e01ee8fe376dd3eef2d5e..c5e2dc872732be7d1bfb7305d945ef79e11763d2 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -945,12 +945,9 @@ 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.
   Throw(exception);
-  PropagatePendingExceptionToExternalTryCatch();
-  if (has_pending_exception()) {
-    thread_local_top()->scheduled_exception_ = pending_exception();
-    thread_local_top()->external_caught_exception_ = false;
-    clear_pending_exception();
-  }
+  thread_local_top()->scheduled_exception_ = pending_exception();
+  thread_local_top()->external_caught_exception_ = false;
+  clear_pending_exception();
 }


Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 8db3fcb438d9743f58845f4844526172d1a12331..65d56d108064709f4fb0463b38e0cebc169a9cb1 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -3363,30 +3363,6 @@ THREADED_TEST(TryCatchAndFinally) {
 }


-static void TryCatchNestedHelper(int depth) {
-  if (depth > 0) {
-    v8::TryCatch try_catch;
-    try_catch.SetVerbose(true);
-    TryCatchNestedHelper(depth - 1);
-    CHECK(try_catch.HasCaught());
-    try_catch.ReThrow();
-  } else {
-    v8::ThrowException(v8_str("back"));
-  }
-}
-
-
-TEST(TryCatchNested) {
-  v8::V8::Initialize();
-  v8::HandleScope scope;
-  LocalContext context;
-  v8::TryCatch try_catch;
-  TryCatchNestedHelper(5);
-  CHECK(try_catch.HasCaught());
- CHECK_EQ(0, strcmp(*v8::String::Utf8Value(try_catch.Exception()), "back"));
-}
-
-
 THREADED_TEST(Equality) {
   v8::HandleScope scope;
   LocalContext context;


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to