Web Inspector: Debugger: lazily create the agent
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 05:40:11 +0000 (05:40 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 05:40:11 +0000 (05:40 +0000)
commitb4bc205b508df0072cb7b858e5f32c44db868cb0
tree633295d675860b5437ce2fed162ec6a031c7042a
parent2e3712867aa29186d346cf45466c0050ff6325af
Web Inspector: Debugger: lazily create the agent
https://bugs.webkit.org/show_bug.cgi?id=195973
<rdar://problem/49039674>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* inspector/JSGlobalObjectInspectorController.cpp:
(Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController):
(Inspector::JSGlobalObjectInspectorController::frontendInitialized):
(Inspector::JSGlobalObjectInspectorController::createLazyAgents):

* inspector/JSGlobalObjectConsoleClient.h:
(Inspector::JSGlobalObjectConsoleClient::setInspectorDebuggerAgent): Added.
* inspector/JSGlobalObjectConsoleClient.cpp:
(Inspector::JSGlobalObjectConsoleClient::JSGlobalObjectConsoleClient):
(Inspector::JSGlobalObjectConsoleClient::startConsoleProfile):
(Inspector::JSGlobalObjectConsoleClient::stopConsoleProfile):

* inspector/agents/InspectorDebuggerAgent.h:
(Inspector::InspectorDebuggerAgent::addListener): Added.
(Inspector::InspectorDebuggerAgent::removeListener): Added.
(Inspector::InspectorDebuggerAgent::setListener): Deleted.
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent):
(Inspector::InspectorDebuggerAgent::enable):
(Inspector::InspectorDebuggerAgent::disable):
(Inspector::InspectorDebuggerAgent::getScriptSource):
(Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::didPause):
(Inspector::InspectorDebuggerAgent::breakProgram):
(Inspector::InspectorDebuggerAgent::clearBreakDetails):
Drive-by: reorder some member variables for better sizing.
Drive-by: rename some member variables for clarity.
Source/WebCore:

No change in functionality.

* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
(WebCore::WorkerInspectorController::createLazyAgents):

* inspector/agents/WebDebuggerAgent.cpp:
(WebCore::WebDebuggerAgent::disable):

* inspector/agents/InspectorDOMDebuggerAgent.cpp:
(WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent):
(WebCore::InspectorDOMDebuggerAgent::discardAgent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.cpp
Source/JavaScriptCore/inspector/JSGlobalObjectConsoleClient.h
Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp
Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.h
Source/WebCore/ChangeLog
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebCore/inspector/agents/InspectorDOMDebuggerAgent.cpp
Source/WebCore/inspector/agents/WebDebuggerAgent.cpp