Chromium Code Reviews| Index: src/messages.js |
| diff --git a/src/messages.js b/src/messages.js |
| index 69be1c9ab53e737bcdb93a9b6f9dbdf2c2cf0e2e..196309df3657939fcfa72e60b0fc0a18b56c2ba0 100644 |
| --- a/src/messages.js |
| +++ b/src/messages.js |
| @@ -1164,10 +1164,11 @@ function SetUpError() { |
| %FunctionSetPrototype(f, new ErrorPrototype()); |
| } else { |
| %FunctionSetPrototype(f, new $Error()); |
| + %SetPrototype(f, $Error); |
|
adamk
2015/03/31 22:45:12
Any reason not to use %InternalSetPrototype here?
arv (Not doing code reviews)
2015/03/31 22:48:27
Yes, the reason is that I'm stupid. Fixing.
|
| } |
| %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) { } |