V8 can clear exception pending message, when should not do this.
authoryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 5 Jun 2014 13:07:53 +0000 (13:07 +0000)
committeryurys@chromium.org <yurys@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 5 Jun 2014 13:07:53 +0000 (13:07 +0000)
commit6c57157587a0c9e2de0a816825cb2b07257b569d
tree2f46074bda0f26acf80796d957d8aed74915c6b8
parentba9f391bc066268dfc520b7ddde95b8700bd9740
V8 can clear exception pending message, when should not do this.

The case:
v8::TryCatch try_catch;
CompileRun(try { CEvaluate('throw 1;'); } finally {});
CHECK(try_catch.HasCaught());
CHECK(!try_catch.Message().IsEmpty());

CEvaluate is native call. Last check is not passed without patch. Patch contains test TryCatchFinallyStoresMessageUsingTryCatchHandler with more details.

R=mstarzinger@chromium.org, vsevik@chromium.org, yangguo@chromium.org

Review URL: https://codereview.chromium.org/306463002

Patch from Alexey Kozyatinskiy <kozyatinskiy@google.com>.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21697 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/isolate.cc
src/isolate.h
test/cctest/test-api.cc