Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Unified Diff: src/messages.js

Issue 1049323003: ES6: Error functions should extend Error (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update .status files Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/es6/error-functions-prototypes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) { }
« no previous file with comments | « no previous file | test/mjsunit/es6/error-functions-prototypes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698