Changeset 180660 in webkit


Ignore:
Timestamp:
Feb 25, 2015 10:05:02 PM (9 years ago)
Author:
msaboff@apple.com
Message:

Web Inspector: CRASH when debugger pauses inside a Promise handler
https://bugs.webkit.org/show_bug.cgi?id=141396

Reviewed by Mark Lam.

Source/JavaScriptCore:

For frames that don't have a scope, typically native frames, use the lexicalGlobalObject to
create the DebuggerScope for that frame.

  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::scope):

LayoutTests:

New test.

  • inspector/debugger/breakpoint-scope-expected.txt: Added.
  • inspector/debugger/breakpoint-scope.html: Added.
  • inspector/debugger/resources/scope.js: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r180659 r180660  
     12015-02-25  Michael Saboff  <msaboff@apple.com>
     2
     3        Web Inspector: CRASH when debugger pauses inside a Promise handler
     4        https://bugs.webkit.org/show_bug.cgi?id=141396
     5
     6        Reviewed by Mark Lam.
     7
     8        New test.
     9
     10        * inspector/debugger/breakpoint-scope-expected.txt: Added.
     11        * inspector/debugger/breakpoint-scope.html: Added.
     12        * inspector/debugger/resources/scope.js: Added.
     13
    1142015-02-25  Brent Fulgham  <bfulgham@apple.com>
    215
  • trunk/Source/JavaScriptCore/ChangeLog

    r180656 r180660  
     12015-02-25  Michael Saboff  <msaboff@apple.com>
     2
     3        Web Inspector: CRASH when debugger pauses inside a Promise handler
     4        https://bugs.webkit.org/show_bug.cgi?id=141396
     5
     6        Reviewed by Mark Lam.
     7
     8        For frames that don't have a scope, typically native frames, use the lexicalGlobalObject to
     9        create the DebuggerScope for that frame.
     10
     11        * debugger/DebuggerCallFrame.cpp:
     12        (JSC::DebuggerCallFrame::scope):
     13
    1142015-02-25  Filip Pizlo  <fpizlo@apple.com>
    215
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r176479 r180660  
    148148        if (codeBlock && codeBlock->scopeRegister().isValid())
    149149            scope = m_callFrame->scope(codeBlock->scopeRegister().offset());
     150        else if (JSCallee* callee = jsDynamicCast<JSCallee*>(m_callFrame->callee()))
     151            scope = callee->scope();
    150152        else
    151             scope = jsCast<JSCallee*>(m_callFrame->callee())->scope();
     153            scope = m_callFrame->lexicalGlobalObject();
    152154
    153155        m_scope.set(vm, DebuggerScope::create(vm, scope));
Note: See TracChangeset for help on using the changeset viewer.