Title: [201211] trunk/Source/WebInspectorUI
Revision
201211
Author
[email protected]
Date
2016-05-19 23:32:02 -0700 (Thu, 19 May 2016)

Log 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 <[email protected]> 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.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (201210 => 201211)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-05-20 06:31:47 UTC (rev 201210)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-05-20 06:32:02 UTC (rev 201211)
@@ -1,5 +1,31 @@
 2016-05-19  Joseph Pecoraro  <[email protected]>
 
+        Web Inspector: Can't resume Debugger after breaking on exception in Promise
+        https://bugs.webkit.org/show_bug.cgi?id=157240
+        <rdar://problem/26030890>
+
+        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.
+
+2016-05-19  Joseph Pecoraro  <[email protected]>
+
         Web Inspector: Main Resource with <scripts> not showing up in debugger sidebar after reload
         https://bugs.webkit.org/show_bug.cgi?id=157939
         <rdar://problem/26385691>

Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (201210 => 201211)


--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2016-05-20 06:31:47 UTC (rev 201210)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js	2016-05-20 06:32:02 UTC (rev 201211)
@@ -521,7 +521,9 @@
         this._activeCallFrame = this._callFrames[0];
 
         if (!this._activeCallFrame) {
-            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.");
+            // This indicates we were pausing in internal scripts only (Injected Scripts, built-ins).
+            // Just resume and skip past this pause.
+            DebuggerAgent.resume();
             this._didResumeInternal();
             return;
         }
@@ -916,7 +918,7 @@
 
     _didResumeInternal()
     {
-        if (!this._activeCallFrame)
+        if (!this._paused)
             return;
 
         if (this._delayedResumeTimeout) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to