Wrap captureStackTrace in a try-catch when constructing an error.

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
This commit is contained in:
yangguo@chromium.org 2014-07-07 07:23:41 +00:00
parent 60af0a25c7
commit a6fd4ba0b4

View 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);
}