Inspector should display information about non-object exceptions
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Apr 2013 18:47:20 +0000 (18:47 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 7 Apr 2013 18:47:20 +0000 (18:47 +0000)
commit9e4e927874f1ba09c3106d28c16be0ede8e87a70
treeb6de25cf63e692da4748f2d1462fe49bc501c972
parentd605c3bb31c13be39740b3108425d3cf843d8edb
Inspector should display information about non-object exceptions
https://bugs.webkit.org/show_bug.cgi?id=114123

Reviewed by Adele Peterson.

Source/JavaScriptCore:

Make sure we store the right stack information, even when throwing
a primitive.

* interpreter/CallFrame.h:
(JSC::ExecState::clearSupplementaryExceptionInfo):
(ExecState):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::addStackTraceIfNecessary):
(JSC::Interpreter::throwException):

Source/WebCore:

Make use of the stack trace for line information when we're reporting
an exception

* bindings/js/JSDOMBinding.cpp:
(WebCore::reportException):

LayoutTests:

All these tests throw primitives as exceptions, and now they have source
and line number information

* fast/dom/exception-getting-event-handler-expected.txt:
* fast/dom/javascript-url-exception-isolation-expected.txt:
* fast/dom/nested-script-exceptions-expected.txt:
* fast/events/onerror-no-constructor-expected.txt:
* fast/events/window-onerror13-expected.txt:
* fast/events/window-onerror16-expected.txt:
* fast/events/window-onerror2-expected.txt:
* fast/events/window-onerror8-expected.txt:
* fast/js/uncaught-exception-line-number-expected.txt:
* fast/sub-pixel/inline-block-with-padding-expected.txt:
* platform/mac/fast/AppleScript/001-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@147872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/exception-getting-event-handler-expected.txt
LayoutTests/fast/dom/javascript-url-exception-isolation-expected.txt
LayoutTests/fast/dom/nested-script-exceptions-expected.txt
LayoutTests/fast/events/onerror-no-constructor-expected.txt
LayoutTests/fast/events/window-onerror13-expected.txt
LayoutTests/fast/events/window-onerror16-expected.txt
LayoutTests/fast/events/window-onerror2-expected.txt
LayoutTests/fast/events/window-onerror8-expected.txt
LayoutTests/fast/js/uncaught-exception-line-number-expected.txt
LayoutTests/fast/sub-pixel/inline-block-with-padding-expected.txt
LayoutTests/platform/mac/fast/AppleScript/001-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/interpreter/CallFrame.h
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSDOMBinding.cpp