Changeset 201211 in webkit


Ignore:
Timestamp:
May 19, 2016 11:32:02 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Can't resume Debugger after breaking on exception in Promise
https://bugs.webkit.org/show_bug.cgi?id=157240
<rdar://problem/26030890>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-05-19
Reviewed by Timothy Hatcher.

If we pause but have no source code to show we paused in purely internal
code. In such cases we were attempting to resume without actually
telling the backend to resume, so the backend and frontend were out of
sync. The frontend thinking it is "paused" without an activeCallFrame
and the backend actually being paused.

This change more gracefully handles this situation. It actually resumes
both the frontend and the backend.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Resume the backend and the frontend.

(WebInspector.DebuggerManager.prototype._didResumeInternal):
Don't look at the active call frame, look at the paused state.
This may issue a Resumed event without actually triggering a
Paused event if this was the only pause, but that is harmless.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r201210 r201211  
     12016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: Can't resume Debugger after breaking on exception in Promise
     4        https://bugs.webkit.org/show_bug.cgi?id=157240
     5        <rdar://problem/26030890>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        If we pause but have no source code to show we paused in purely internal
     10        code. In such cases we were attempting to resume without actually
     11        telling the backend to resume, so the backend and frontend were out of
     12        sync. The frontend thinking it is "paused" without an activeCallFrame
     13        and the backend actually being paused.
     14
     15        This change more gracefully handles this situation. It actually resumes
     16        both the frontend and the backend.
     17
     18        * UserInterface/Controllers/DebuggerManager.js:
     19        (WebInspector.DebuggerManager.prototype.debuggerDidPause):
     20        Resume the backend and the frontend.
     21
     22        (WebInspector.DebuggerManager.prototype._didResumeInternal):
     23        Don't look at the active call frame, look at the paused state.
     24        This may issue a Resumed event without actually triggering a
     25        Paused event if this was the only pause, but that is harmless.
     26
    1272016-05-19  Joseph Pecoraro  <pecoraro@apple.com>
    228
  • trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js

    r201099 r201211  
    522522
    523523        if (!this._activeCallFrame) {
    524             console.warn("We should always have one call frame. This could indicate we are hitting an exception or debugger statement in an internal injected script.");
     524            // This indicates we were pausing in internal scripts only (Injected Scripts, built-ins).
     525            // Just resume and skip past this pause.
     526            DebuggerAgent.resume();
    525527            this._didResumeInternal();
    526528            return;
     
    917919    _didResumeInternal()
    918920    {
    919         if (!this._activeCallFrame)
     921        if (!this._paused)
    920922            return;
    921923
Note: See TracChangeset for help on using the changeset viewer.