Changeset 147872 in webkit
- Timestamp:
- Apr 7, 2013, 11:47:20 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r147871 r147872 1 2013-04-07 Oliver Hunt <[email protected]> 2 3 Inspector should display information about non-object exceptions 4 https://bugs.webkit.org/show_bug.cgi?id=114123 5 6 Reviewed by Adele Peterson. 7 8 All these tests throw primitives as exceptions, and now they have source 9 and line number information 10 11 * fast/dom/exception-getting-event-handler-expected.txt: 12 * fast/dom/javascript-url-exception-isolation-expected.txt: 13 * fast/dom/nested-script-exceptions-expected.txt: 14 * fast/events/onerror-no-constructor-expected.txt: 15 * fast/events/window-onerror13-expected.txt: 16 * fast/events/window-onerror16-expected.txt: 17 * fast/events/window-onerror2-expected.txt: 18 * fast/events/window-onerror8-expected.txt: 19 * fast/js/uncaught-exception-line-number-expected.txt: 20 * fast/sub-pixel/inline-block-with-padding-expected.txt: 21 * platform/mac/fast/AppleScript/001-expected.txt: 22 1 23 2013-04-07 Robert Hogan <[email protected]> 2 24 -
trunk/LayoutTests/fast/dom/exception-getting-event-handler-expected.txt
r104810 r147872 1 CONSOLE MESSAGE: 421 CONSOLE MESSAGE: line 12: 42 2 2 This test checks that an exception thrown when getting the handleEvent property of an event listener does not crash. 3 3 -
trunk/LayoutTests/fast/dom/javascript-url-exception-isolation-expected.txt
r104810 r147872 1 CONSOLE MESSAGE: 421 CONSOLE MESSAGE: line 1: 42 2 2 CONSOLE MESSAGE: line 1: SyntaxError: Unexpected token '<' 3 3 Exceptions thrown in javascript URLs should not propagate to the main script. -
trunk/LayoutTests/fast/dom/nested-script-exceptions-expected.txt
r104810 r147872 1 CONSOLE MESSAGE: Badness 10,0001 CONSOLE MESSAGE: line 1: Badness 10,000 2 2 This test checks that exceptions in nested scripts are logged properly. An exception named "Badness 10,000" should be logged properly. -
trunk/LayoutTests/fast/events/onerror-no-constructor-expected.txt
r142953 r147872 1 1 CONSOLE MESSAGE: line 8: FAIL 2 CONSOLE MESSAGE: PASS if this is reported as an uncaught exception.2 CONSOLE MESSAGE: line 20: PASS if this is reported as an uncaught exception. 3 3 -
trunk/LayoutTests/fast/events/window-onerror13-expected.txt
r104810 r147872 1 CONSOLE MESSAGE: An Error1 CONSOLE MESSAGE: line 24: An Error 2 2 Test that error is treated as not handled when window.onerror return value is not 'true'. Bug 67119. 3 3 -
trunk/LayoutTests/fast/events/window-onerror16-expected.txt
r104810 r147872 1 CONSOLE MESSAGE: An Error1 CONSOLE MESSAGE: line 25: An Error 2 2 Test that error is treated as not handled when window.onerror return value is 'false'. Bug 67119. 3 3 -
trunk/LayoutTests/fast/events/window-onerror2-expected.txt
r76244 r147872 2 2 3 3 Main frame window.onerror: Error: Inline script exception at window-onerror2.html:34 4 Main frame window.onerror: Exception in onload at undefined:04 Main frame window.onerror: Exception in onload at window-onerror2.html:2 5 5 Main frame window.onerror: Error: Exception in setTimeout at window-onerror2.html:29 6 6 -
trunk/LayoutTests/fast/events/window-onerror8-expected.txt
r76216 r147872 1 1 Test that window.onerror is called on window object. Bug 8519. 2 2 3 Main frame window.onerror: 2010 at undefined:03 Main frame window.onerror: 2010 at window-onerror8.html:24 4 4 PASSED: this === window 5 5 -
trunk/LayoutTests/fast/js/uncaught-exception-line-number-expected.txt
r104810 r147872 1 CONSOLE MESSAGE: uh oh, an exception!1 CONSOLE MESSAGE: line 11: uh oh, an exception! 2 2 This tests that uncaught exceptions have the right line numbers, for example for display in the JavaScript error console. To run the test manually, look in the JS console for an uncaught exception on line 11. 3 3 -
trunk/LayoutTests/fast/sub-pixel/inline-block-with-padding-expected.txt
r119461 r147872 1 PASS links[0].offsetWidth is within 1 of 1 671 PASS links[0].offsetWidth is within 1 of 175 2 2 Both links should render the same and not wrap. 3 3 -
trunk/LayoutTests/platform/mac/fast/AppleScript/001-expected.txt
r111579 r147872 1 CONSOLE MESSAGE: this is an exception1 CONSOLE MESSAGE: line 1: this is an exception 2 2 An automated test for basic AppleScript "do JavaScript" support. 3 3 4 ('long') -
trunk/Source/JavaScriptCore/ChangeLog
r147858 r147872 1 2013-04-07 Oliver Hunt <[email protected]> 2 3 Inspector should display information about non-object exceptions 4 https://bugs.webkit.org/show_bug.cgi?id=114123 5 6 Reviewed by Adele Peterson. 7 8 Make sure we store the right stack information, even when throwing 9 a primitive. 10 11 * interpreter/CallFrame.h: 12 (JSC::ExecState::clearSupplementaryExceptionInfo): 13 (ExecState): 14 * interpreter/Interpreter.cpp: 15 (JSC::Interpreter::addStackTraceIfNecessary): 16 (JSC::Interpreter::throwException): 17 1 18 2013-04-06 Oliver Hunt <[email protected]> 2 19 -
trunk/Source/JavaScriptCore/interpreter/CallFrame.h
r146089 r147872 69 69 70 70 void clearException() { globalData().exception = JSValue(); } 71 void clearSupplementaryExceptionInfo() 72 { 73 globalData().exceptionStack = RefCountedArray<StackFrame>(); 74 } 75 71 76 JSValue exception() const { return globalData().exception; } 72 77 bool hadException() const { return globalData().exception; } -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r147858 r147872 762 762 Vector<StackFrame> stackTrace; 763 763 getStackTrace(&callFrame->globalData(), stackTrace); 764 764 globalData->exceptionStack = RefCountedArray<StackFrame>(stackTrace); 765 765 if (stackTrace.isEmpty() || !error.isObject()) 766 766 return; 767 767 768 JSObject* errorObject = asObject(error); 768 769 JSGlobalObject* globalObject = 0; … … 811 812 812 813 isInterrupt = isInterruptedExecutionException(exception) || isTerminatedExecutionException(exception); 814 } else { 815 if (!callFrame->globalData().exceptionStack.size()) { 816 Vector<StackFrame> stack; 817 Interpreter::getStackTrace(&callFrame->globalData(), stack); 818 callFrame->globalData().exceptionStack = RefCountedArray<StackFrame>(stack); 819 } 813 820 } 814 821 -
trunk/Source/WebCore/ChangeLog
r147871 r147872 1 2013-04-07 Oliver Hunt <[email protected]> 2 3 Inspector should display information about non-object exceptions 4 https://bugs.webkit.org/show_bug.cgi?id=114123 5 6 Reviewed by Adele Peterson. 7 8 Make use of the stack trace for line information when we're reporting 9 an exception 10 11 * bindings/js/JSDOMBinding.cpp: 12 (WebCore::reportException): 13 1 14 2013-04-07 Robert Hogan <[email protected]> 2 15 -
trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp
r146430 r147872 148 148 Interpreter::ErrorHandlingMode mode(exec); 149 149 String errorMessage = exception.toString(exec)->value(exec); 150 JSObject* exceptionObject = exception.toObject(exec); 151 int lineNumber = exceptionObject->get(exec, Identifier(exec, "line")).toInt32(exec); 152 String exceptionSourceURL = exceptionObject->get(exec, Identifier(exec, "sourceURL")).toString(exec)->value(exec); 150 int lineNumber = 0; 151 String exceptionSourceURL; 152 153 RefCountedArray<StackFrame> stackTrace = exec->globalData().exceptionStack; 153 154 exec->clearException(); 155 exec->clearSupplementaryExceptionInfo(); 156 157 if (exception.isObject()) { 158 JSObject* exceptionObject = exception.toObject(exec); 159 lineNumber = exceptionObject->get(exec, Identifier(exec, "line")).toInt32(exec); 160 exceptionSourceURL = exceptionObject->get(exec, Identifier(exec, "sourceURL")).toString(exec)->value(exec); 161 } else if (stackTrace.size()) { 162 lineNumber = stackTrace[0].line(); 163 exceptionSourceURL = stackTrace[0].friendlySourceURL(); 164 } 154 165 155 166 if (ExceptionBase* exceptionBase = toExceptionBase(exception))
Note:
See TracChangeset
for help on using the changeset viewer.