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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 27 22:53:56 PDT 2012


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





--- Comment #10 from Yang Guo <yangguo at chromium.org>  2012-04-27 22:53:55 PST ---
(In reply to comment #9)
> (In reply to comment #8)
> > 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?
> 
> Verified that JSC already adds the stack property.

(In reply to comment #4)
> (From update of attachment 139205 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=139205&action=review
> 
> > Source/WebCore/bindings/v8/V8Proxy.cpp:579
> > +    v8::Handle<v8::Value> message = exceptionObject->Get(v8String("message", isolate));
> > +    v8::Handle<v8::Value> error = v8::Exception::Error(message->ToString());
> 
> Why do we need the message? Is that required to get the stack?

No, but necessary in order to make the stack trace look like the one that's attach to any Error object.

> 
> > Source/WebCore/bindings/v8/V8Proxy.cpp:580
> > +    exceptionObject->SetAccessor(v8String("stack", isolate), DOMExceptionStackGetter, 0, error);
> 
> What is the intention here? Make sure that setting stack also works since code out there might already do that.
> 
> > LayoutTests/fast/dom/DOMException/stack-trace.html:23
> > +    }
> 
> Please test that the descriptor looks like you expect it to.
> 
> It should look something like:
> 
> {
>   configurable: true,
>   enumerable: false,
>   get: function () { ... }
>   set: function () { ... }
> }
> 
> > LayoutTests/platform/chromium/fast/dom/DOMException/stack-trace-expected.txt:2
> > +layer at (0,0) size 800x600
> 
> Please add
> 
> layoutTestController.dumpAsText();
> 
> we definitely do not care about the layout here

Will do.

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