Changeset 158117 in webkit


Ignore:
Timestamp:
Oct 28, 2013, 11:31:16 AM (12 years ago)
Author:
mark.lam@apple.com
Message:

Merge r155471.
https://bugs.webkit.org/show_bug.cgi?id=123409.

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Re-implemented fix based on the frame iteration mechanhism before the
StackVisitor was available.

2013-09-10 Joseph Pecoraro <Joseph Pecoraro>

Web Inspector: [JSC] Caught exception is treated as uncaught
https://bugs.webkit.org/show_bug.cgi?id=93607

Reviewed by Geoff Garen.

Check up the entire call stack to see if there is an exception handler.

  • interpreter/Interpreter.cpp: (JSC::GetExceptionHandlerFunctor::GetExceptionHandlerFunctor): (JSC::GetExceptionHandlerFunctor::handler): (JSC::GetExceptionHandlerFunctor::operator()):

LayoutTests:

Re-based test results from merge.

  • http/tests/inspector-protocol/resources/InspectorTest.js:

(InspectorTest.checkForError): This is needed for the merged tests.

2013-09-10 Joseph Pecoraro <Joseph Pecoraro>

Web Inspector: [JSC] Caught exception is treated as uncaught
https://bugs.webkit.org/show_bug.cgi?id=93607

Reviewed by Geoff Garen.

Add tests for different inspector pause on exceptions states.

  • inspector-protocol/debugger/resources/exception.js: Added.
  • inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt: Added.
  • inspector-protocol/debugger/setPauseOnExceptions-all.html: Added.
  • inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt: Added.
  • inspector-protocol/debugger/setPauseOnExceptions-none.html: Added.
  • inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt: Added.
  • inspector-protocol/debugger/setPauseOnExceptions-uncaught.html: Added.
Location:
branches/safari-537.73-branch
Files:
5 edited
6 copied

Legend:

Unmodified
Added
Removed
  • branches/safari-537.73-branch

  • branches/safari-537.73-branch/LayoutTests/ChangeLog

    r158068 r158117  
     12013-10-28  Mark Lam  <mark.lam@apple.com>
     2
     3        Merge r155471.
     4        https://bugs.webkit.org/show_bug.cgi?id=123409.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Re-based test results from merge.
     9
     10        * http/tests/inspector-protocol/resources/InspectorTest.js:
     11        (InspectorTest.checkForError): This is needed for the merged tests.
     12
     13    2013-09-10  Joseph Pecoraro  <pecoraro@apple.com>
     14
     15            Web Inspector: [JSC] Caught exception is treated as uncaught
     16            https://bugs.webkit.org/show_bug.cgi?id=93607
     17
     18            Reviewed by Geoff Garen.
     19
     20            Add tests for different inspector pause on exceptions states.
     21
     22            * inspector-protocol/debugger/resources/exception.js: Added.
     23            * inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt: Added.
     24            * inspector-protocol/debugger/setPauseOnExceptions-all.html: Added.
     25            * inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt: Added.
     26            * inspector-protocol/debugger/setPauseOnExceptions-none.html: Added.
     27            * inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt: Added.
     28            * inspector-protocol/debugger/setPauseOnExceptions-uncaught.html: Added.
     29
    1302013-10-25  Lucas Forschler  <lforschler@apple.com>
    231
  • branches/safari-537.73-branch/LayoutTests/http/tests/inspector-protocol/resources/InspectorTest.js

    r141393 r158117  
    9090}
    9191
     92InspectorTest.checkForError = function(responseObject)
     93{
     94    if (responseObject.error) {
     95        InspectorTest.log("PROTOCOL ERROR: " + responseObject.error.message);
     96        InspectorTest.completeTest();
     97        throw "PROTOCOL ERROR";
     98    }
     99}
    92100
    93101/**
  • branches/safari-537.73-branch/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-all-expected.txt

    r155471 r158117  
    1 CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
    2 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
    3 CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","line":8,"column":30,"sourceURL":"exception.js"}
     1CONSOLE MESSAGE: line 1: caught inline: {"stack":"","line":1}
     2CONSOLE MESSAGE: line 38: catchNested caught exception: {"stack":"exceptionBasic@exception.js"}
     3CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","stack":"appendChild@[native code]\nexceptionDOM@exception.js"}
    44CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
    55CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
    6 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"column":12,"sourceURL":"exception.js"}
    7 CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
    8 CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
     6CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"sourceURL":"exception.js:33:26\n"}
     7CONSOLE MESSAGE: line 1: TypeError: 'undefined' is not an object (evaluating '({}).a.b')
     8CONSOLE MESSAGE: line 3: TypeError: 'undefined' is not an object (evaluating '({}).a.b')
    99CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
    10 CONSOLE MESSAGE: line 24: exception in host function
    11 CONSOLE MESSAGE: line 13: exception string
     10CONSOLE MESSAGE: exception in host function
     11CONSOLE MESSAGE: exception string
    1212CONSOLE MESSAGE: line 18: [object Object]
    1313CONSOLE MESSAGE: line 18: Error: error message
  • branches/safari-537.73-branch/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-none-expected.txt

    r155471 r158117  
    1 CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
    2 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
    3 CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","line":8,"column":30,"sourceURL":"exception.js"}
     1CONSOLE MESSAGE: line 1: caught inline: {"stack":"","line":1}
     2CONSOLE MESSAGE: line 38: catchNested caught exception: {"stack":"exceptionBasic@exception.js"}
     3CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","stack":"appendChild@[native code]\nexceptionDOM@exception.js"}
    44CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
    55CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
    6 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"column":12,"sourceURL":"exception.js"}
    7 CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
    8 CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
     6CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"sourceURL":"exception.js:33:26\n"}
     7CONSOLE MESSAGE: line 3: TypeError: 'undefined' is not an object (evaluating '({}).a.b')
     8CONSOLE MESSAGE: line 9: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
    99CONSOLE MESSAGE: line 24: exception in host function
    1010CONSOLE MESSAGE: line 13: exception string
  • branches/safari-537.73-branch/LayoutTests/inspector-protocol/debugger/setPauseOnExceptions-uncaught-expected.txt

    r155471 r158117  
    1 CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
    2 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
    3 CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","line":8,"column":30,"sourceURL":"exception.js"}
     1CONSOLE MESSAGE: line 1: caught inline: {"stack":"","line":1}
     2CONSOLE MESSAGE: line 38: catchNested caught exception: {"stack":"exceptionBasic@exception.js"}
     3CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","stack":"appendChild@[native code]\nexceptionDOM@exception.js"}
    44CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
    55CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
    6 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"column":12,"sourceURL":"exception.js"}
    7 CONSOLE MESSAGE: line 1: TypeError: undefined is not an object (evaluating '({}).a.b')
    8 CONSOLE MESSAGE: line 3: TypeError: undefined is not an object (evaluating '({}).a.b')
     6CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"sourceURL":"exception.js:33:26\n"}
     7CONSOLE MESSAGE: line 1: TypeError: 'undefined' is not an object (evaluating '({}).a.b')
     8CONSOLE MESSAGE: line 3: TypeError: 'undefined' is not an object (evaluating '({}).a.b')
    99CONSOLE MESSAGE: line 8: NotFoundError: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
    10 CONSOLE MESSAGE: line 24: exception in host function
    11 CONSOLE MESSAGE: line 13: exception string
     10CONSOLE MESSAGE: exception in host function
     11CONSOLE MESSAGE: exception string
    1212CONSOLE MESSAGE: line 18: [object Object]
    1313CONSOLE MESSAGE: line 18: Error: error message
    14 CONSOLE MESSAGE: line 1: caught inline: {"line":1,"column":36}
    15 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":3,"column":11,"sourceURL":"exception.js"}
    16 CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","line":8,"column":30,"sourceURL":"exception.js"}
     14CONSOLE MESSAGE: line 1: caught inline: {"stack":"","line":1}
     15CONSOLE MESSAGE: line 38: catchNested caught exception: {"stack":"exceptionBasic@exception.js"}
     16CONSOLE MESSAGE: line 38: catchNested caught exception: {"code":8,"message":"NotFoundError: DOM Exception 8","name":"NotFoundError","stack":"appendChild@[native code]\nexceptionDOM@exception.js"}
    1717CONSOLE MESSAGE: line 38: catchNested caught exception: "exception in host function"
    1818CONSOLE MESSAGE: line 38: catchNested caught exception: "exception string"
    19 CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"column":12,"sourceURL":"exception.js"}
     19CONSOLE MESSAGE: line 38: catchNested caught exception: {"line":18,"sourceURL":"exception.js:33:26\n"}
    2020Debugger.setPauseOnExceptions uncaught
    2121
  • branches/safari-537.73-branch/Source/JavaScriptCore/ChangeLog

    r158068 r158117  
     12013-10-28  Mark Lam  <mark.lam@apple.com>
     2
     3        Merge r155471.
     4        https://bugs.webkit.org/show_bug.cgi?id=123409.
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Re-implemented fix based on the frame iteration mechanhism before the
     9        StackVisitor was available.
     10
     11    2013-09-10  Joseph Pecoraro  <pecoraro@apple.com>
     12
     13            Web Inspector: [JSC] Caught exception is treated as uncaught
     14            https://bugs.webkit.org/show_bug.cgi?id=93607
     15
     16            Reviewed by Geoff Garen.
     17
     18            Check up the entire call stack to see if there is an exception handler.
     19
     20            * interpreter/Interpreter.cpp:
     21            (JSC::GetExceptionHandlerFunctor::GetExceptionHandlerFunctor):
     22            (JSC::GetExceptionHandlerFunctor::handler):
     23            (JSC::GetExceptionHandlerFunctor::operator()):
     24
    1252013-10-25  Lucas Forschler  <lforschler@apple.com>
    226
  • branches/safari-537.73-branch/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r152515 r158117  
    766766    if (Debugger* debugger = callFrame->dynamicGlobalObject()->debugger()) {
    767767        DebuggerCallFrame debuggerCallFrame(callFrame, exceptionValue);
    768         bool hasHandler = codeBlock->handlerForBytecodeOffset(bytecodeOffset);
     768        bool hasHandler = false;
     769        if (!isTermination) {
     770            VM* vm = &callFrame->vm();
     771            CallFrame* currentFrame = callFrame;
     772            CodeBlock* currentCB = codeBlock;
     773            unsigned currentOffset = bytecodeOffset;
     774            while (currentFrame) {
     775                if (currentCB && currentCB->handlerForBytecodeOffset(currentOffset)) {
     776                    hasHandler = true;
     777                    break;
     778                }
     779                currentFrame = getCallerInfo(vm, currentFrame, currentOffset, currentCB);
     780            }
     781        }
    769782        debugger->exception(debuggerCallFrame, codeBlock->ownerExecutable()->sourceID(), codeBlock->lineNumberForBytecodeOffset(bytecodeOffset), 0, hasHandler);
    770783    }
Note: See TracChangeset for help on using the changeset viewer.