Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Web Inspector: tighten up lifetimes for InspectorController-owned obj…
…ects; add brace initializers to agents https://bugs.webkit.org/show_bug.cgi?id=148612 Reviewed by Joseph Pecoraro. Both InjectedScriptManager and AgentRegistry (thus all agents) are Source/JavaScriptCore: owned by JSGlobalObjectInspectorController. So, use references. Add brace initalizers for scalar and pointer members in agent classes. * inspector/ConsoleMessage.cpp: (Inspector::ConsoleMessage::addToFrontend): (Inspector::ConsoleMessage::updateRepeatCountInConsole): (Inspector::ConsoleMessage::ConsoleMessage): * inspector/ConsoleMessage.h: * inspector/JSGlobalObjectInspectorController.cpp: (Inspector::JSGlobalObjectInspectorController::JSGlobalObjectInspectorController): * inspector/agents/InspectorAgent.cpp: (Inspector::InspectorAgent::InspectorAgent): * inspector/agents/InspectorAgent.h: * inspector/agents/InspectorConsoleAgent.cpp: (Inspector::InspectorConsoleAgent::InspectorConsoleAgent): (Inspector::InspectorConsoleAgent::enable): (Inspector::InspectorConsoleAgent::clearMessages): (Inspector::InspectorConsoleAgent::addMessageToConsole): (Inspector::InspectorConsoleAgent::addConsoleMessage): * inspector/agents/InspectorConsoleAgent.h: * inspector/agents/InspectorDebuggerAgent.cpp: (Inspector::InspectorDebuggerAgent::InspectorDebuggerAgent): (Inspector::InspectorDebuggerAgent::removeBreakpoint): (Inspector::InspectorDebuggerAgent::getFunctionDetails): (Inspector::InspectorDebuggerAgent::evaluateOnCallFrame): (Inspector::InspectorDebuggerAgent::didPause): (Inspector::InspectorDebuggerAgent::breakpointActionProbe): (Inspector::InspectorDebuggerAgent::didContinue): (Inspector::InspectorDebuggerAgent::clearExceptionValue): * inspector/agents/InspectorDebuggerAgent.h: * inspector/agents/InspectorRuntimeAgent.cpp: (Inspector::InspectorRuntimeAgent::InspectorRuntimeAgent): (Inspector::InspectorRuntimeAgent::callFunctionOn): (Inspector::InspectorRuntimeAgent::getProperties): (Inspector::InspectorRuntimeAgent::getDisplayableProperties): (Inspector::InspectorRuntimeAgent::getCollectionEntries): (Inspector::InspectorRuntimeAgent::saveResult): (Inspector::InspectorRuntimeAgent::releaseObject): (Inspector::InspectorRuntimeAgent::releaseObjectGroup): * inspector/agents/InspectorRuntimeAgent.h: * inspector/agents/JSGlobalObjectConsoleAgent.cpp: (Inspector::JSGlobalObjectConsoleAgent::JSGlobalObjectConsoleAgent): * inspector/agents/JSGlobalObjectConsoleAgent.h: * inspector/agents/JSGlobalObjectDebuggerAgent.cpp: (Inspector::JSGlobalObjectDebuggerAgent::JSGlobalObjectDebuggerAgent): (Inspector::JSGlobalObjectDebuggerAgent::injectedScriptForEval): * inspector/agents/JSGlobalObjectDebuggerAgent.h: * inspector/agents/JSGlobalObjectRuntimeAgent.cpp: (Inspector::JSGlobalObjectRuntimeAgent::JSGlobalObjectRuntimeAgent): (Inspector::JSGlobalObjectRuntimeAgent::injectedScriptForEval): * inspector/agents/JSGlobalObjectRuntimeAgent.h: Source/WebCore: owned by [Worker]InspectorController. So, use references. InstrumentingAgents is morally owned by InspectorController as well, but must be a Ref for now since instrumentation cookies take a strong reference. Add brace initalizers for scalar and pointer members in agent classes. No new tests, no behavior change. * inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent): (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend): (WebCore::InspectorApplicationCacheAgent::enable): * inspector/InspectorApplicationCacheAgent.h: * inspector/InspectorCSSAgent.cpp: (WebCore::InspectorCSSAgent::InspectorCSSAgent): (WebCore::InspectorCSSAgent::enable): (WebCore::InspectorCSSAgent::disable): * inspector/InspectorCSSAgent.h: * inspector/InspectorConsoleInstrumentation.h: (WebCore::InspectorInstrumentation::addMessageToConsole): (WebCore::InspectorInstrumentation::consoleCount): (WebCore::InspectorInstrumentation::startProfiling): (WebCore::InspectorInstrumentation::stopProfiling): * inspector/InspectorController.cpp: (WebCore::InspectorController::InspectorController): (WebCore::InspectorController::connectFrontend): (WebCore::InspectorController::disconnectFrontend): (WebCore::InspectorController::disconnectAllFrontends): * inspector/InspectorController.h: * inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::InspectorDOMAgent): (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend): (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend): (WebCore::InspectorDOMAgent::focusNode): (WebCore::InspectorDOMAgent::buildObjectForEventListener): (WebCore::InspectorDOMAgent::nodeForObjectId): (WebCore::InspectorDOMAgent::resolveNode): * inspector/InspectorDOMAgent.h: * inspector/InspectorDOMDebuggerAgent.cpp: (WebCore::InspectorDOMDebuggerAgent::InspectorDOMDebuggerAgent): (WebCore::InspectorDOMDebuggerAgent::~InspectorDOMDebuggerAgent): (WebCore::InspectorDOMDebuggerAgent::debuggerWasEnabled): (WebCore::InspectorDOMDebuggerAgent::disable): * inspector/InspectorDOMDebuggerAgent.h: * inspector/InspectorDOMStorageAgent.cpp: (WebCore::InspectorDOMStorageAgent::InspectorDOMStorageAgent): (WebCore::InspectorDOMStorageAgent::~InspectorDOMStorageAgent): * inspector/InspectorDOMStorageAgent.h: * inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::InspectorDatabaseAgent): (WebCore::InspectorDatabaseAgent::~InspectorDatabaseAgent): * inspector/InspectorDatabaseAgent.h: * inspector/InspectorIndexedDBAgent.cpp: (WebCore::InspectorIndexedDBAgent::InspectorIndexedDBAgent): (WebCore::InspectorIndexedDBAgent::requestData): * inspector/InspectorIndexedDBAgent.h: * inspector/InspectorInstrumentation.cpp: (WebCore::InspectorInstrumentation::instrumentingAgentsForPage): (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope): * inspector/InspectorInstrumentation.h: (WebCore::InspectorInstrumentation::mouseDidMoveOverElement): (WebCore::InspectorInstrumentation::scriptsEnabled): (WebCore::InspectorInstrumentation::didScroll): (WebCore::InspectorInstrumentation::markResourceAsCached): (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache): (WebCore::InspectorInstrumentation::willRunJavaScriptDialog): (WebCore::InspectorInstrumentation::sessionCreated): (WebCore::InspectorInstrumentation::sessionLoaded): (WebCore::InspectorInstrumentation::sessionModified): (WebCore::InspectorInstrumentation::segmentCreated): (WebCore::InspectorInstrumentation::segmentCompleted): (WebCore::InspectorInstrumentation::segmentLoaded): (WebCore::InspectorInstrumentation::segmentUnloaded): (WebCore::InspectorInstrumentation::captureStarted): (WebCore::InspectorInstrumentation::captureStopped): (WebCore::InspectorInstrumentation::playbackStarted): (WebCore::InspectorInstrumentation::playbackPaused): (WebCore::InspectorInstrumentation::playbackFinished): (WebCore::InspectorInstrumentation::playbackHitPosition): * inspector/InspectorLayerTreeAgent.cpp: (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent): (WebCore::InspectorLayerTreeAgent::enable): (WebCore::InspectorLayerTreeAgent::disable): (WebCore::InspectorLayerTreeAgent::layersForNode): (WebCore::InspectorLayerTreeAgent::idForNode): * inspector/InspectorLayerTreeAgent.h: * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::InspectorPageAgent): (WebCore::InspectorPageAgent::timestamp): (WebCore::InspectorPageAgent::enable): (WebCore::InspectorPageAgent::disable): (WebCore::InspectorPageAgent::frameStartedLoading): (WebCore::InspectorPageAgent::snapshotNode): * inspector/InspectorPageAgent.h: * inspector/InspectorReplayAgent.cpp: (WebCore::InspectorReplayAgent::InspectorReplayAgent): (WebCore::InspectorReplayAgent::didCreateFrontendAndBackend): (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend): * inspector/InspectorReplayAgent.h: * inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::InspectorResourceAgent): (WebCore::InspectorResourceAgent::~InspectorResourceAgent): (WebCore::InspectorResourceAgent::timestamp): (WebCore::InspectorResourceAgent::enable): (WebCore::InspectorResourceAgent::disable): * inspector/InspectorResourceAgent.h: * inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend): (WebCore::InspectorTimelineAgent::internalStart): (WebCore::InspectorTimelineAgent::internalStop): (WebCore::InspectorTimelineAgent::timestamp): (WebCore::InspectorTimelineAgent::startFromConsole): (WebCore::InspectorTimelineAgent::willCallFunction): (WebCore::InspectorTimelineAgent::willEvaluateScript): (WebCore::InspectorTimelineAgent::InspectorTimelineAgent): * inspector/InspectorTimelineAgent.h: * inspector/InspectorWebAgentBase.h: (WebCore::InspectorAgentBase::InspectorAgentBase): * inspector/InspectorWorkerAgent.cpp: (WebCore::InspectorWorkerAgent::InspectorWorkerAgent): (WebCore::InspectorWorkerAgent::~InspectorWorkerAgent): * inspector/InspectorWorkerAgent.h: * inspector/InstrumentingAgents.cpp: (WebCore::InstrumentingAgents::InstrumentingAgents): Deleted. * inspector/InstrumentingAgents.h: (WebCore::InstrumentingAgents::create): * inspector/PageConsoleAgent.cpp: (WebCore::PageConsoleAgent::PageConsoleAgent): (WebCore::PageConsoleAgent::addInspectedNode): * inspector/PageConsoleAgent.h: * inspector/PageDebuggerAgent.cpp: (WebCore::PageDebuggerAgent::PageDebuggerAgent): (WebCore::PageDebuggerAgent::enable): (WebCore::PageDebuggerAgent::disable): (WebCore::PageDebuggerAgent::injectedScriptForEval): * inspector/PageDebuggerAgent.h: * inspector/PageRuntimeAgent.cpp: (WebCore::PageRuntimeAgent::PageRuntimeAgent): (WebCore::PageRuntimeAgent::injectedScriptForEval): (WebCore::PageRuntimeAgent::notifyContextCreated): * inspector/PageRuntimeAgent.h: * inspector/WebConsoleAgent.cpp: (WebCore::WebConsoleAgent::WebConsoleAgent): (WebCore::WebConsoleAgent::frameWindowDiscarded): (WebCore::WebConsoleAgent::didFinishXHRLoading): (WebCore::WebConsoleAgent::didReceiveResponse): (WebCore::WebConsoleAgent::didFailLoading): * inspector/WebConsoleAgent.h: * inspector/WebDebuggerAgent.cpp: (WebCore::WebDebuggerAgent::WebDebuggerAgent): (WebCore::WebDebuggerAgent::enable): (WebCore::WebDebuggerAgent::disable): * inspector/WebDebuggerAgent.h: * inspector/WorkerConsoleAgent.cpp: (WebCore::WorkerConsoleAgent::WorkerConsoleAgent): * inspector/WorkerConsoleAgent.h: * inspector/WorkerDebuggerAgent.cpp: (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent): (WebCore::WorkerDebuggerAgent::injectedScriptForEval): * inspector/WorkerDebuggerAgent.h: * inspector/WorkerInspectorController.cpp: (WebCore::WorkerInspectorController::WorkerInspectorController): * inspector/WorkerInspectorController.h: * inspector/WorkerRuntimeAgent.cpp: (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent): (WebCore::WorkerRuntimeAgent::injectedScriptForEval): * inspector/WorkerRuntimeAgent.h: Canonical link: https://commits.webkit.org/166796@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information