| Index: src/messages.js
|
| diff --git a/src/messages.js b/src/messages.js
|
| index 049cecde445d595cc2353ed2860df8254507d14b..cba474538eda764a926818345812af0077c74459 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);
|
| }
|
|
|