https://bugs.webkit.org/show_bug.cgi?id=191612
Reviewed by Matt Baker.
Source/JavaScriptCore:
* inspector/InspectorFrontendRouter.cpp:
(Inspector::FrontendRouter::connectFrontend):
(Inspector::FrontendRouter::disconnectFrontend):
* inspector/InspectorFrontendRouter.h:
* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::connectFrontend):
(Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
* inspector/JSGlobalObjectInspectorController.h:
* inspector/remote/RemoteControllableTarget.h:
* inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::close):
* inspector/remote/glib/RemoteConnectionToTargetGlib.cpp:
(Inspector::RemoteConnectionToTarget::setup):
(Inspector::RemoteConnectionToTarget::close):
* runtime/JSGlobalObjectDebuggable.cpp:
(JSC::JSGlobalObjectDebuggable::connect):
(JSC::JSGlobalObjectDebuggable::disconnect):
* runtime/JSGlobalObjectDebuggable.h:
Source/WebCore:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::connectFrontend):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::show):
* inspector/InspectorController.h:
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::connectFrontend):
(WebCore::WorkerInspectorController::disconnectFrontend):
* page/PageDebuggable.cpp:
(WebCore::PageDebuggable::connect):
(WebCore::PageDebuggable::disconnect):
* page/PageDebuggable.h:
* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::InspectorStubFrontend):
(WebCore::InspectorStubFrontend::closeWindow):
* workers/service/context/ServiceWorkerDebuggable.cpp:
(WebCore::ServiceWorkerDebuggable::connect):
(WebCore::ServiceWorkerDebuggable::disconnect):
* workers/service/context/ServiceWorkerDebuggable.h:
* workers/service/context/ServiceWorkerInspectorProxy.cpp:
(WebCore::ServiceWorkerInspectorProxy::connectToWorker):
(WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
* workers/service/context/ServiceWorkerInspectorProxy.h:
Source/WebKit:
* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::connect):
(WebKit::WebAutomationSession::disconnect):
(WebKit::WebAutomationSession::terminate):
* UIProcess/Automation/WebAutomationSession.h:
* UIProcess/WebPageDebuggable.cpp:
(WebKit::WebPageDebuggable::connect):
(WebKit::WebPageDebuggable::disconnect):
* UIProcess/WebPageDebuggable.h:
* UIProcess/WebPageInspectorController.cpp:
(WebKit::WebPageInspectorController::connectFrontend):
(WebKit::WebPageInspectorController::disconnectFrontend):
* UIProcess/WebPageInspectorController.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::close):
* WebProcess/WebPage/WebPageInspectorTarget.cpp:
(WebKit::WebPageInspectorTarget::connect):
(WebKit::WebPageInspectorTarget::disconnect):
Source/WebKitLegacy/mac:
* WebCoreSupport/WebInspectorClient.mm:
(-[WebInspectorWindowController destroyInspectorView]):
Source/WebKitLegacy/win:
* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorFrontendClient::destroyInspectorView):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238206
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+ Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
+ https://bugs.webkit.org/show_bug.cgi?id=191612
+
+ Reviewed by Matt Baker.
+
+ * inspector/InspectorFrontendRouter.cpp:
+ (Inspector::FrontendRouter::connectFrontend):
+ (Inspector::FrontendRouter::disconnectFrontend):
+ * inspector/InspectorFrontendRouter.h:
+ * inspector/JSGlobalObjectInspectorController.cpp:
+ (Inspector::JSGlobalObjectInspectorController::connectFrontend):
+ (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
+ * inspector/JSGlobalObjectInspectorController.h:
+ * inspector/remote/RemoteControllableTarget.h:
+ * inspector/remote/cocoa/RemoteConnectionToTargetCocoa.mm:
+ (Inspector::RemoteConnectionToTarget::setup):
+ (Inspector::RemoteConnectionToTarget::close):
+ * inspector/remote/glib/RemoteConnectionToTargetGlib.cpp:
+ (Inspector::RemoteConnectionToTarget::setup):
+ (Inspector::RemoteConnectionToTarget::close):
+ * runtime/JSGlobalObjectDebuggable.cpp:
+ (JSC::JSGlobalObjectDebuggable::connect):
+ (JSC::JSGlobalObjectDebuggable::disconnect):
+ * runtime/JSGlobalObjectDebuggable.h:
+
+2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+
Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
https://bugs.webkit.org/show_bug.cgi?id=191494
<rdar://problem/45469854>
return adoptRef(*new FrontendRouter);
}
-void FrontendRouter::connectFrontend(FrontendChannel* connection)
+void FrontendRouter::connectFrontend(FrontendChannel& connection)
{
- ASSERT_ARG(connection, connection);
-
- if (m_connections.contains(connection)) {
+ if (m_connections.contains(&connection)) {
ASSERT_NOT_REACHED();
return;
}
- m_connections.append(connection);
+ m_connections.append(&connection);
}
-void FrontendRouter::disconnectFrontend(FrontendChannel* connection)
+void FrontendRouter::disconnectFrontend(FrontendChannel& connection)
{
- ASSERT_ARG(connection, connection);
-
- if (!m_connections.contains(connection)) {
+ if (!m_connections.contains(&connection)) {
ASSERT_NOT_REACHED();
return;
}
- m_connections.removeFirst(connection);
+ m_connections.removeFirst(&connection);
}
void FrontendRouter::disconnectAllFrontends()
unsigned frontendCount() const { return m_connections.size(); }
- void connectFrontend(FrontendChannel*);
- void disconnectFrontend(FrontendChannel*);
+ void connectFrontend(FrontendChannel&);
+ void disconnectFrontend(FrontendChannel&);
void disconnectAllFrontends();
void sendEvent(const String& message) const;
m_agents.discardValues();
}
-void JSGlobalObjectInspectorController::connectFrontend(FrontendChannel* frontendChannel, bool isAutomaticInspection, bool immediatelyPause)
+void JSGlobalObjectInspectorController::connectFrontend(FrontendChannel& frontendChannel, bool isAutomaticInspection, bool immediatelyPause)
{
- ASSERT_ARG(frontendChannel, frontendChannel);
-
m_isAutomaticInspection = isAutomaticInspection;
m_pauseAfterInitialization = immediatelyPause;
#endif
}
-void JSGlobalObjectInspectorController::disconnectFrontend(FrontendChannel* frontendChannel)
+void JSGlobalObjectInspectorController::disconnectFrontend(FrontendChannel& frontendChannel)
{
- ASSERT_ARG(frontendChannel, frontendChannel);
-
// FIXME: change this to notify agents which frontend has disconnected (by id).
m_agents.willDestroyFrontendAndBackend(DisconnectReason::InspectorDestroyed);
JSGlobalObjectInspectorController(JSC::JSGlobalObject&);
~JSGlobalObjectInspectorController();
- void connectFrontend(FrontendChannel*, bool isAutomaticInspection, bool immediatelyPause);
- void disconnectFrontend(FrontendChannel*);
+ void connectFrontend(FrontendChannel&, bool isAutomaticInspection, bool immediatelyPause);
+ void disconnectFrontend(FrontendChannel&);
void dispatchMessageFromFrontend(const String&);
void init();
void update();
- virtual void connect(FrontendChannel*, bool isAutomaticConnection = false, bool immediatelyPause = false) = 0;
- virtual void disconnect(FrontendChannel*) = 0;
+ virtual void connect(FrontendChannel&, bool isAutomaticConnection = false, bool immediatelyPause = false) = 0;
+ virtual void disconnect(FrontendChannel&) = 0;
unsigned targetIdentifier() const { return m_identifier; }
void setTargetIdentifier(unsigned identifier) { m_identifier = identifier; }
m_target = nullptr;
} else if (is<RemoteInspectionTarget>(m_target)) {
auto castedTarget = downcast<RemoteInspectionTarget>(m_target);
- castedTarget->connect(this, isAutomaticInspection, automaticallyPause);
+ castedTarget->connect(*this, isAutomaticInspection, automaticallyPause);
m_connected = true;
RemoteInspector::singleton().updateTargetListing(targetIdentifier);
} else if (is<RemoteAutomationTarget>(m_target)) {
auto castedTarget = downcast<RemoteAutomationTarget>(m_target);
- castedTarget->connect(this);
+ castedTarget->connect(*this);
m_connected = true;
RemoteInspector::singleton().updateTargetListing(targetIdentifier);
std::lock_guard<Lock> lock(m_targetMutex);
if (m_target) {
if (m_connected)
- m_target->disconnect(this);
+ m_target->disconnect(*this);
m_target = nullptr;
m_target = nullptr;
} else if (is<RemoteInspectionTarget>(m_target)) {
auto target = downcast<RemoteInspectionTarget>(m_target);
- target->connect(this, isAutomaticInspection, automaticallyPause);
+ target->connect(*this, isAutomaticInspection, automaticallyPause);
m_connected = true;
RemoteInspector::singleton().updateTargetListing(targetIdentifier);
} else if (is<RemoteAutomationTarget>(m_target)) {
auto target = downcast<RemoteAutomationTarget>(m_target);
- target->connect(this);
+ target->connect(*this);
m_connected = true;
RemoteInspector::singleton().updateTargetListing(targetIdentifier);
unsigned targetIdentifier = m_target->targetIdentifier();
if (m_connected)
- m_target->disconnect(this);
+ m_target->disconnect(*this);
m_target = nullptr;
return name.isEmpty() ? "JSContext"_s : name;
}
-void JSGlobalObjectDebuggable::connect(FrontendChannel* frontendChannel, bool automaticInspection, bool immediatelyPause)
+void JSGlobalObjectDebuggable::connect(FrontendChannel& frontendChannel, bool automaticInspection, bool immediatelyPause)
{
JSLockHolder locker(&m_globalObject.vm());
m_globalObject.inspectorController().connectFrontend(frontendChannel, automaticInspection, immediatelyPause);
}
-void JSGlobalObjectDebuggable::disconnect(FrontendChannel* frontendChannel)
+void JSGlobalObjectDebuggable::disconnect(FrontendChannel& frontendChannel)
{
JSLockHolder locker(&m_globalObject.vm());
String name() const final;
bool hasLocalDebugger() const final { return false; }
- void connect(Inspector::FrontendChannel*, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
- void disconnect(Inspector::FrontendChannel*) final;
+ void connect(Inspector::FrontendChannel&, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
+ void disconnect(Inspector::FrontendChannel&) final;
void dispatchMessageFromRemote(const String& message) final;
bool automaticInspectionAllowed() const final { return true; }
+2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
+ https://bugs.webkit.org/show_bug.cgi?id=191612
+
+ Reviewed by Matt Baker.
+
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::connectFrontend):
+ (WebCore::InspectorController::disconnectFrontend):
+ (WebCore::InspectorController::show):
+ * inspector/InspectorController.h:
+ * inspector/WorkerInspectorController.cpp:
+ (WebCore::WorkerInspectorController::connectFrontend):
+ (WebCore::WorkerInspectorController::disconnectFrontend):
+ * page/PageDebuggable.cpp:
+ (WebCore::PageDebuggable::connect):
+ (WebCore::PageDebuggable::disconnect):
+ * page/PageDebuggable.h:
+ * testing/Internals.cpp:
+ (WebCore::InspectorStubFrontend::InspectorStubFrontend):
+ (WebCore::InspectorStubFrontend::closeWindow):
+ * workers/service/context/ServiceWorkerDebuggable.cpp:
+ (WebCore::ServiceWorkerDebuggable::connect):
+ (WebCore::ServiceWorkerDebuggable::disconnect):
+ * workers/service/context/ServiceWorkerDebuggable.h:
+ * workers/service/context/ServiceWorkerInspectorProxy.cpp:
+ (WebCore::ServiceWorkerInspectorProxy::connectToWorker):
+ (WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
+ * workers/service/context/ServiceWorkerInspectorProxy.h:
+
2018-11-14 Timothy Hatcher <timothy@apple.com>
Update prefers-color-scheme media query matching based on GitHub issue #3278.
m_inspectorFrontendClient->windowObjectCleared();
}
-void InspectorController::connectFrontend(Inspector::FrontendChannel* frontendChannel, bool isAutomaticInspection, bool immediatelyPause)
+void InspectorController::connectFrontend(Inspector::FrontendChannel& frontendChannel, bool isAutomaticInspection, bool immediatelyPause)
{
- ASSERT_ARG(frontendChannel, frontendChannel);
ASSERT(m_inspectorClient);
// If a frontend has connected enable the developer extras and keep them enabled.
#endif
}
-void InspectorController::disconnectFrontend(FrontendChannel* frontendChannel)
+void InspectorController::disconnectFrontend(FrontendChannel& frontendChannel)
{
m_frontendRouter->disconnectFrontend(frontendChannel);
if (m_frontendRouter->hasLocalFrontend())
m_inspectorClient->bringFrontendToFront();
else if (Inspector::FrontendChannel* frontendChannel = m_inspectorClient->openLocalFrontend(this))
- connectFrontend(frontendChannel);
+ connectFrontend(*frontendChannel);
}
void InspectorController::setIsUnderTest(bool value)
bool hasLocalFrontend() const;
bool hasRemoteFrontend() const;
- WEBCORE_EXPORT void connectFrontend(Inspector::FrontendChannel*, bool isAutomaticInspection = false, bool immediatelyPause = false);
- WEBCORE_EXPORT void disconnectFrontend(Inspector::FrontendChannel*);
+ WEBCORE_EXPORT void connectFrontend(Inspector::FrontendChannel&, bool isAutomaticInspection = false, bool immediatelyPause = false);
+ WEBCORE_EXPORT void disconnectFrontend(Inspector::FrontendChannel&);
WEBCORE_EXPORT void disconnectAllFrontends();
void inspect(Node*);
m_executionStopwatch->start();
m_forwardingChannel = std::make_unique<WorkerToPageFrontendChannel>(m_workerGlobalScope);
- m_frontendRouter->connectFrontend(m_forwardingChannel.get());
+ m_frontendRouter->connectFrontend(*m_forwardingChannel.get());
m_agents.didCreateFrontendAndBackend(&m_frontendRouter.get(), &m_backendDispatcher.get());
}
});
m_agents.willDestroyFrontendAndBackend(reason);
- m_frontendRouter->disconnectFrontend(m_forwardingChannel.get());
+ m_frontendRouter->disconnectFrontend(*m_forwardingChannel.get());
m_forwardingChannel = nullptr;
}
return m_page.inspectorController().hasLocalFrontend();
}
-void PageDebuggable::connect(Inspector::FrontendChannel* channel, bool isAutomaticConnection, bool immediatelyPause)
+void PageDebuggable::connect(FrontendChannel& channel, bool isAutomaticConnection, bool immediatelyPause)
{
- InspectorController& inspectorController = m_page.inspectorController();
- inspectorController.connectFrontend(channel, isAutomaticConnection, immediatelyPause);
+ m_page.inspectorController().connectFrontend(channel, isAutomaticConnection, immediatelyPause);
}
-void PageDebuggable::disconnect(Inspector::FrontendChannel* channel)
+void PageDebuggable::disconnect(FrontendChannel& channel)
{
- InspectorController& inspectorController = m_page.inspectorController();
- inspectorController.disconnectFrontend(channel);
+ m_page.inspectorController().disconnectFrontend(channel);
}
void PageDebuggable::dispatchMessageFromRemote(const String& message)
String url() const final;
bool hasLocalDebugger() const final;
- void connect(Inspector::FrontendChannel*, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
- void disconnect(Inspector::FrontendChannel*) final;
+ void connect(Inspector::FrontendChannel&, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
+ void disconnect(Inspector::FrontendChannel&) final;
void dispatchMessageFromRemote(const String& message) final;
void setIndicating(bool) final;
ASSERT_ARG(frontendWindow, frontendWindow);
m_frontendController.setInspectorFrontendClient(this);
- inspectedPage.inspectorController().connectFrontend(this);
+ inspectedPage.inspectorController().connectFrontend(*this);
}
InspectorStubFrontend::~InspectorStubFrontend()
return;
m_frontendController.setInspectorFrontendClient(nullptr);
- inspectedPage()->inspectorController().disconnectFrontend(this);
+ inspectedPage()->inspectorController().disconnectFrontend(*this);
m_frontendWindow->close();
m_frontendWindow = nullptr;
{
}
-void ServiceWorkerDebuggable::connect(Inspector::FrontendChannel* channel, bool, bool)
+void ServiceWorkerDebuggable::connect(FrontendChannel& channel, bool, bool)
{
m_serviceWorkerThreadProxy.inspectorProxy().connectToWorker(channel);
}
-void ServiceWorkerDebuggable::disconnect(Inspector::FrontendChannel* channel)
+void ServiceWorkerDebuggable::disconnect(FrontendChannel& channel)
{
m_serviceWorkerThreadProxy.inspectorProxy().disconnectFromWorker(channel);
}
String url() const final { return m_scopeURL; }
bool hasLocalDebugger() const final { return false; }
- void connect(Inspector::FrontendChannel*, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
- void disconnect(Inspector::FrontendChannel*) final;
+ void connect(Inspector::FrontendChannel&, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
+ void disconnect(Inspector::FrontendChannel&) final;
void dispatchMessageFromRemote(const String& message) final;
private:
m_channel = nullptr;
}
-void ServiceWorkerInspectorProxy::connectToWorker(FrontendChannel* channel)
+void ServiceWorkerInspectorProxy::connectToWorker(FrontendChannel& channel)
{
- m_channel = channel;
+ m_channel = &channel;
m_serviceWorkerThreadProxy.thread().runLoop().postTaskForMode([] (ScriptExecutionContext& context) {
downcast<WorkerGlobalScope>(context).inspectorController().connectFrontend();
}, WorkerRunLoop::debuggerMode());
}
-void ServiceWorkerInspectorProxy::disconnectFromWorker(FrontendChannel* channel)
+void ServiceWorkerInspectorProxy::disconnectFromWorker(FrontendChannel& channel)
{
- ASSERT_UNUSED(channel, channel == m_channel);
+ ASSERT_UNUSED(channel, &channel == m_channel);
m_channel = nullptr;
m_serviceWorkerThreadProxy.thread().runLoop().postTaskForMode([] (ScriptExecutionContext& context) {
void serviceWorkerTerminated();
- void connectToWorker(Inspector::FrontendChannel*);
- void disconnectFromWorker(Inspector::FrontendChannel*);
+ void connectToWorker(Inspector::FrontendChannel&);
+ void disconnectFromWorker(Inspector::FrontendChannel&);
void sendMessageToWorker(const String&);
void sendMessageFromWorkerToFrontend(const String&);
2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+ Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
+ https://bugs.webkit.org/show_bug.cgi?id=191612
+
+ Reviewed by Matt Baker.
+
+ * UIProcess/Automation/WebAutomationSession.cpp:
+ (WebKit::WebAutomationSession::connect):
+ (WebKit::WebAutomationSession::disconnect):
+ (WebKit::WebAutomationSession::terminate):
+ * UIProcess/Automation/WebAutomationSession.h:
+ * UIProcess/WebPageDebuggable.cpp:
+ (WebKit::WebPageDebuggable::connect):
+ (WebKit::WebPageDebuggable::disconnect):
+ * UIProcess/WebPageDebuggable.h:
+ * UIProcess/WebPageInspectorController.cpp:
+ (WebKit::WebPageInspectorController::connectFrontend):
+ (WebKit::WebPageInspectorController::disconnectFrontend):
+ * UIProcess/WebPageInspectorController.h:
+ * WebProcess/WebPage/WebInspector.cpp:
+ (WebKit::WebInspector::close):
+ * WebProcess/WebPage/WebPageInspectorTarget.cpp:
+ (WebKit::WebPageInspectorTarget::connect):
+ (WebKit::WebPageInspectorTarget::disconnect):
+
+2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+
Unreviewed attempted wincairo build fix after 238192.
* WebProcess/WebPage/WebPageInspectorTargetController.h:
m_backendDispatcher->dispatch(message);
}
-void WebAutomationSession::connect(Inspector::FrontendChannel* channel, bool isAutomaticConnection, bool immediatelyPause)
+void WebAutomationSession::connect(Inspector::FrontendChannel& channel, bool isAutomaticConnection, bool immediatelyPause)
{
UNUSED_PARAM(isAutomaticConnection);
UNUSED_PARAM(immediatelyPause);
- m_remoteChannel = channel;
+ m_remoteChannel = &channel;
m_frontendRouter->connectFrontend(channel);
setIsPaired(true);
}
-void WebAutomationSession::disconnect(Inspector::FrontendChannel* channel)
+void WebAutomationSession::disconnect(Inspector::FrontendChannel& channel)
{
- ASSERT(channel == m_remoteChannel);
+ ASSERT(&channel == m_remoteChannel);
terminate();
}
#if ENABLE(REMOTE_INSPECTOR)
if (Inspector::FrontendChannel* channel = m_remoteChannel) {
m_remoteChannel = nullptr;
- m_frontendRouter->disconnectFrontend(channel);
+ m_frontendRouter->disconnectFrontend(*channel);
}
setIsPaired(false);
// Inspector::RemoteAutomationTarget API
String name() const override { return m_sessionIdentifier; }
void dispatchMessageFromRemote(const String& message) override;
- void connect(Inspector::FrontendChannel*, bool isAutomaticConnection = false, bool immediatelyPause = false) override;
- void disconnect(Inspector::FrontendChannel*) override;
+ void connect(Inspector::FrontendChannel&, bool isAutomaticConnection = false, bool immediatelyPause = false) override;
+ void disconnect(Inspector::FrontendChannel&) override;
#endif
void terminate();
return m_page.inspectorController().hasLocalFrontend();
}
-void WebPageDebuggable::connect(Inspector::FrontendChannel* channel, bool isAutomaticConnection, bool immediatelyPause)
+void WebPageDebuggable::connect(FrontendChannel& channel, bool isAutomaticConnection, bool immediatelyPause)
{
m_page.inspectorController().connectFrontend(channel, isAutomaticConnection, immediatelyPause);
}
-void WebPageDebuggable::disconnect(Inspector::FrontendChannel* channel)
+void WebPageDebuggable::disconnect(FrontendChannel& channel)
{
m_page.inspectorController().disconnectFrontend(channel);
}
String url() const final;
bool hasLocalDebugger() const final;
- void connect(Inspector::FrontendChannel*, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
- void disconnect(Inspector::FrontendChannel*) final;
+ void connect(Inspector::FrontendChannel&, bool isAutomaticConnection = false, bool immediatelyPause = false) final;
+ void disconnect(Inspector::FrontendChannel&) final;
void dispatchMessageFromRemote(const String& message) final;
void setIndicating(bool) final;
return m_frontendRouter->hasLocalFrontend();
}
-void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel* frontendChannel, bool, bool)
+void WebPageInspectorController::connectFrontend(Inspector::FrontendChannel& frontendChannel, bool, bool)
{
- ASSERT_ARG(frontendChannel, frontendChannel);
-
bool connectingFirstFrontend = !m_frontendRouter->hasFrontends();
m_frontendRouter->connectFrontend(frontendChannel);
#endif
}
-void WebPageInspectorController::disconnectFrontend(FrontendChannel* frontendChannel)
+void WebPageInspectorController::disconnectFrontend(FrontendChannel& frontendChannel)
{
m_frontendRouter->disconnectFrontend(frontendChannel);
bool hasLocalFrontend() const;
- void connectFrontend(Inspector::FrontendChannel*, bool isAutomaticInspection = false, bool immediatelyPause = false);
- void disconnectFrontend(Inspector::FrontendChannel*);
+ void connectFrontend(Inspector::FrontendChannel&, bool isAutomaticInspection = false, bool immediatelyPause = false);
+ void disconnectFrontend(Inspector::FrontendChannel&);
void disconnectAllFrontends();
void dispatchMessageFromFrontend(const String& message);
if (!m_frontendConnection)
return;
- m_page->corePage()->inspectorController().disconnectFrontend(this);
+ m_page->corePage()->inspectorController().disconnectFrontend(*this);
closeFrontendConnection();
}
void WebPageInspectorTarget::connect(Inspector::FrontendChannel& channel)
{
if (m_page.corePage())
- m_page.corePage()->inspectorController().connectFrontend(&channel);
+ m_page.corePage()->inspectorController().connectFrontend(channel);
}
void WebPageInspectorTarget::disconnect(Inspector::FrontendChannel& channel)
{
if (m_page.corePage())
- m_page.corePage()->inspectorController().disconnectFrontend(&channel);
+ m_page.corePage()->inspectorController().disconnectFrontend(channel);
}
void WebPageInspectorTarget::sendMessageToTargetBackend(const String& message)
2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+ Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
+ https://bugs.webkit.org/show_bug.cgi?id=191612
+
+ Reviewed by Matt Baker.
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController destroyInspectorView]):
+
+2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+
Web Inspector: Keep Web Inspector window alive across process swaps (PSON) (Remote Inspector)
https://bugs.webkit.org/show_bug.cgi?id=191494
<rdar://problem/45469854>
if (Page* frontendPage = _frontendClient->frontendPage())
frontendPage->inspectorController().setInspectorFrontendClient(nullptr);
if (Page* inspectedPage = [_inspectedWebView.get() page])
- inspectedPage->inspectorController().disconnectFrontend(_inspectorClient);
+ inspectedPage->inspectorController().disconnectFrontend(*_inspectorClient);
[[_inspectedWebView.get() inspector] releaseFrontend];
_inspectorClient->releaseFrontend();
+2018-11-14 Joseph Pecoraro <pecoraro@apple.com>
+
+ Web Inspector: Pass Inspector::FrontendChannel as a reference connect/disconnect methods
+ https://bugs.webkit.org/show_bug.cgi?id=191612
+
+ Reviewed by Matt Baker.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::destroyInspectorView):
+
2018-11-12 Don Olmstead <don.olmstead@sony.com>
Shipped PNGs include bad profiles: iCCP: known incorrect sRGB profile
if (Page* frontendPage = this->frontendPage())
frontendPage->inspectorController().setInspectorFrontendClient(nullptr);
if (Page* inspectedPage = m_inspectedWebView->page())
- inspectedPage->inspectorController().disconnectFrontend(m_inspectorClient);
+ inspectedPage->inspectorController().disconnectFrontend(*m_inspectorClient);
m_inspectorClient->releaseFrontend();