Title: [248720] trunk/Source/WebInspectorUI
- Revision
- 248720
- Author
- [email protected]
- Date
- 2019-08-15 10:15:15 -0700 (Thu, 15 Aug 2019)
Log Message
Web Inspector: Uncaught Exception: Content request failed.
https://bugs.webkit.org/show_bug.cgi?id=200704
<rdar://problem/54279372>
Reviewed by Brian Burg.
* UserInterface/Models/WebSocketResource.js:
(WI.WebSocketResource.prototype.requestContentFromBackend): Added.
Add an "assert not reached", as WebSocket resources don't really have "content", instead
having a list of send/receive frames.
* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
Don't attempt to request the content of any `WI.WebSocketResource` for the reason above.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (248719 => 248720)
--- trunk/Source/WebInspectorUI/ChangeLog 2019-08-15 17:13:47 UTC (rev 248719)
+++ trunk/Source/WebInspectorUI/ChangeLog 2019-08-15 17:15:15 UTC (rev 248720)
@@ -1,3 +1,20 @@
+2019-08-15 Devin Rousso <[email protected]>
+
+ Web Inspector: Uncaught Exception: Content request failed.
+ https://bugs.webkit.org/show_bug.cgi?id=200704
+ <rdar://problem/54279372>
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Models/WebSocketResource.js:
+ (WI.WebSocketResource.prototype.requestContentFromBackend): Added.
+ Add an "assert not reached", as WebSocket resources don't really have "content", instead
+ having a list of send/receive frames.
+
+ * UserInterface/Views/ResourceClusterContentView.js:
+ (WI.ResourceClusterContentView.prototype._tryEnableCustomResponseContentView):
+ Don't attempt to request the content of any `WI.WebSocketResource` for the reason above.
+
2019-08-14 Devin Rousso <[email protected]>
Web Inspector: Elements: Computed: move the Box Model section to the top
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js (248719 => 248720)
--- trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js 2019-08-15 17:13:47 UTC (rev 248719)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/WebSocketResource.js 2019-08-15 17:15:15 UTC (rev 248720)
@@ -85,6 +85,15 @@
this.dispatchEventToListeners(WI.WebSocketResource.Event.FrameAdded, frame);
}
+ // Protected
+
+ requestContentFromBackend()
+ {
+ console.assert(false, "A WebSocket's content was requested. WebSockets do not have content so the request is nonsensical.");
+
+ return super.requestContentFromBackend();
+ }
+
// Private
_walltimeForWebSocketTimestamp(timestamp)
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js (248719 => 248720)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js 2019-08-15 17:13:47 UTC (rev 248719)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js 2019-08-15 17:15:15 UTC (rev 248720)
@@ -364,6 +364,10 @@
if (!this._resource.hasResponse())
return;
+ // WebSocket resources already use a "custom" response content view.
+ if (this._resource instanceof WI.WebSocketResource)
+ return;
+
this._resource.requestContent()
.then(({error, content}) => {
if (error || !content || !this._canUseJSONContentViewForContent(content))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes