[Webkit-unassigned] [Bug 85057] Add "stack" property to DOMException.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 27 11:33:28 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=85057


Erik Arvidsson <arv at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |arv at chromium.org




--- Comment #7 from Erik Arvidsson <arv at chromium.org>  2012-04-27 11:33:28 PST ---
(In reply to comment #6)
> Do you have any idea on the spec compliance?

WebIDL actually specs that DOM exceptions should have Error.prototype in its prototype chain. "stack" is not part of any standard but since we have it all instances that have Error.prototype in its prototype chain I don't think we are violating any spec by adding it ;-)

Look at how we handle TypeError for example:

var te = new TypeError;
Object.prototype.toString.call(te)
te.hasOwnProperty('stack');  // true
te.__proto__.hasOwnProperty('stack');  // true

This seems really fishy to me. JSC seems to do this in a better way. It adds a "stack" property when an object is thrown that has Error.prototype on its prototype chain. So by fixing bug 85078 we will get JSC support for this bug for free.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list