Bug 997285 part 4. Drop the custom stringifier from DOMException in favor of the default one on Error.prototype. r=peterv,robcee

This commit is contained in:
Boris Zbarsky 2014-05-05 16:01:57 -04:00
parent 98ca340489
commit 691850628c
2 changed files with 12 additions and 6 deletions

View File

@ -50,7 +50,7 @@ let inputTests = [
{
input: "testDOMException()",
output: 'DOMException [SyntaxError: "An invalid or illegal string was specified"',
printOutput: '[Exception... "An invalid or illegal string was specified"',
printOutput: '[object XrayWrapper [object DOMException]]"',
inspectable: true,
variablesViewLabel: "SyntaxError",
},

View File

@ -18,11 +18,18 @@ interface StackFrame;
[NoInterfaceObject]
interface ExceptionMembers
{
// A custom message set by the thrower.
// A custom message set by the thrower. LenientThis so it can be
// gotten on the prototype, which Error.prototype.toString will do
// if someone tries to stringify DOMException.prototype.
[LenientThis]
readonly attribute DOMString message;
// The nsresult associated with this exception.
readonly attribute unsigned long result;
// The name of the error code (ie, a string repr of |result|)
// The name of the error code (ie, a string repr of |result|).
// LenientThis so it can be gotten on the prototype, which
// Error.prototype.toString will do if someone tries to stringify
// DOMException.prototype.
[LenientThis]
readonly attribute DOMString name;
// Filename location. This is the location that caused the
@ -49,13 +56,12 @@ interface ExceptionMembers
// Arbitary data for the implementation.
readonly attribute nsISupports? data;
// A generic formatter - make it suitable to print, etc.
stringifier;
};
[NoInterfaceObject]
interface Exception {
// A generic formatter - make it suitable to print, etc.
stringifier;
};
Exception implements ExceptionMembers;