Index: src/messages.js |
diff --git a/src/messages.js b/src/messages.js |
index fe4098fb089871d06f01de5141cf2829937a0f40..c1d38f22c49b8724dadd30bea574fd5d2b623135 100644 |
--- a/src/messages.js |
+++ b/src/messages.js |
@@ -1172,10 +1172,11 @@ function SetUpError() { |
%FunctionSetPrototype(f, new ErrorPrototype()); |
} else { |
%FunctionSetPrototype(f, new $Error()); |
+ %InternalSetPrototype(f, $Error); |
} |
%FunctionSetInstanceClassName(f, 'Error'); |
%AddNamedProperty(f.prototype, 'constructor', f, DONT_ENUM); |
- %AddNamedProperty(f.prototype, "name", name, DONT_ENUM); |
+ %AddNamedProperty(f.prototype, 'name', name, DONT_ENUM); |
%SetCode(f, function(m) { |
if (%_IsConstructCall()) { |
try { captureStackTrace(this, f); } catch (e) { } |