From: yangguo@chromium.org Date: Wed, 12 Nov 2014 09:28:17 +0000 (+0000) Subject: Reorder Error properties. X-Git-Tag: upstream/4.7.83~5758 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ebbcbf1646e213867f539843c1ef5e31a4267a9f;p=platform%2Fupstream%2Fv8.git Reorder Error properties. R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/717573006 Cr-Commit-Position: refs/heads/master@{#25282} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25282 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/messages.js b/src/messages.js index 049cecd..cba4745 100644 --- a/src/messages.js +++ b/src/messages.js @@ -1221,13 +1221,13 @@ function SetUpError() { %AddNamedProperty(f.prototype, "name", name, DONT_ENUM); %SetCode(f, function(m) { if (%_IsConstructCall()) { + try { captureStackTrace(this, f); } catch (e) { } // Define all the expected properties directly on the error // object. This avoids going through getters and setters defined // on prototype objects. if (!IS_UNDEFINED(m)) { %AddNamedProperty(this, 'message', ToString(m), DONT_ENUM); } - try { captureStackTrace(this, f); } catch (e) { } } else { return new f(m); }