Wrap captureStackTrace in a try-catch when constructing an error.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Jul 2014 07:23:41 +0000 (07:23 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Jul 2014 07:23:41 +0000 (07:23 +0000)
TBR=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22225 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/messages.js

index 1df1c8c45aa65e376ba29a540b719259503031be..e3d941b0395a94b93988a0e2d3ad69e56ae877e1 100644 (file)
@@ -1189,7 +1189,7 @@ function SetUpError() {
         if (!IS_UNDEFINED(m)) {
           %AddProperty(this, 'message', ToString(m), DONT_ENUM);
         }
-        captureStackTrace(this, f);
+        try { captureStackTrace(this, f); } catch (e) { }
       } else {
         return new f(m);
       }