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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 27 11:46:50 PDT 2012


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





--- Comment #8 from Oliver Hunt <oliver at apple.com>  2012-04-27 11:46:49 PST ---
(In reply to comment #7)
> (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.

JSC adds error info to _any_ object that is thrown, error or not -- we should already have a stack property attached to dom errors, if not could you file a jsc specific bug so i can try and work out what's going wrong?

-- 
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