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

Unified Diff: src/messages.js

Issue 43015: Tweaked semantics of error prototype. (Closed)
Patch Set: Created 11 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/error-constructors.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 d6de768e5bed2f7b4947f613637f5f821e279b7e..c2fc5fc74de67f3fc3a0bd9243a5123bccf46cf9 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -634,6 +634,7 @@ function DefineError(f) {
// it hasn't been properly configured yet. Instead we create a
// special not-a-true-error-but-close-enough object.
function ErrorPrototype() {}
+ %FunctionSetPrototype(ErrorPrototype, $Object.prototype);
%FunctionSetInstanceClassName(ErrorPrototype, 'Error');
%FunctionSetPrototype(f, new ErrorPrototype());
} else {
« no previous file with comments | « no previous file | test/mjsunit/error-constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698