Commit ebbcbf16 authored by yangguo@chromium.org's avatar yangguo@chromium.org

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
parent e1c9e732
...@@ -1221,13 +1221,13 @@ function SetUpError() { ...@@ -1221,13 +1221,13 @@ function SetUpError() {
%AddNamedProperty(f.prototype, "name", name, DONT_ENUM); %AddNamedProperty(f.prototype, "name", name, DONT_ENUM);
%SetCode(f, function(m) { %SetCode(f, function(m) {
if (%_IsConstructCall()) { if (%_IsConstructCall()) {
try { captureStackTrace(this, f); } catch (e) { }
// Define all the expected properties directly on the error // Define all the expected properties directly on the error
// object. This avoids going through getters and setters defined // object. This avoids going through getters and setters defined
// on prototype objects. // on prototype objects.
if (!IS_UNDEFINED(m)) { if (!IS_UNDEFINED(m)) {
%AddNamedProperty(this, 'message', ToString(m), DONT_ENUM); %AddNamedProperty(this, 'message', ToString(m), DONT_ENUM);
} }
try { captureStackTrace(this, f); } catch (e) { }
} else { } else {
return new f(m); return new f(m);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment