Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 04:39:45 +0000 (04:39 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Nov 2018 04:39:45 +0000 (04:39 +0000)
commite9d658e05c223fbc0a9bf1721c3a2777e8b69f25
treeaefd1694f00277d4b31990e134607e007496e7f2
parent8e61be7e0f4aed85749418c926c2c7dd755244c0
Web Inspector: REGRESSION(?): all "Show *" develop menu items cause the page to crash
https://bugs.webkit.org/show_bug.cgi?id=192016
<rdar://problem/46284417>

Reviewed by Devin Rousso.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
(WI.loaded):
(WI.initializeBackendTarget):
(WI.contentLoaded):
(WI.whenTargetsAvailable):
Don't evaluate any InspectorFrontendAPI commands until the frontend
has initialized a main target and the user interface.

Source/WebKit:

Previously calling the Page's inspectorController.show()
would create a frontend connection on the WebProcess side.
However now the frontend connection is handed to the WebProcess
once the UIProcess creates it. So queue actions that take place
immediately after showing the inspector until we have a frontend
to send the actions to.

* WebProcess/WebPage/WebInspector.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setFrontendConnection):
(WebKit::WebInspector::closeFrontendConnection):
(WebKit::WebInspector::whenFrontendConnectionEstablished):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showTimelines):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::startElementSelection):
(WebKit::WebInspector::stopElementSelection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Base/Main.js
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/WebInspector.cpp
Source/WebKit/WebProcess/WebPage/WebInspector.h