Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Stacktraces#270

Closed
jonleighton wants to merge 2 commits into
ariya:masterfrom
jonleighton:stacktraces
Closed

Stacktraces#270
jonleighton wants to merge 2 commits into
ariya:masterfrom
jonleighton:stacktraces

Conversation

@jonleighton

Copy link
Copy Markdown
Contributor

Please see the commit messages for explanation.

This is to avoid adding a onError handler to the page that exists in the
outer scope.
On reflection, this approach seems like a bad idea and a source of bugs.
I think passing object references between pages seems inherently
problematic, and we are better off just passing data to the onError
handler. If users need the actual object reference, they are able to use
try ... catch within the page.

This change also means that we are no longer breaking backwards
compatibility with the page.onError function signature.

WebCore already has a bunch of plumbing to pass around stacks. This
exists for the inspector/console. However, we need to actually retrieve
the error stack in WebCore::reportException.

To achieve this, I am attaching a stackArray property to the error
object. This is not as clean as I'd like, but seems ok for now. (We
should not document stackArray though.)

https://code.google.com/p/phantomjs/issues/detail?id=166
@ariya

ariya commented Jun 16, 2012

Copy link
Copy Markdown
Owner

Merged. Thanks!

@ariya ariya closed this Jun 16, 2012
@detro

detro commented Jun 17, 2012

Copy link
Copy Markdown
Collaborator

@ariya You sure you merged this? I can't see the commit anywhere. Jetlag?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants