Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 165749535eb7299332dfd0d2b5d718d7465c8262
      
https://github.com/WebKit/WebKit/commit/165749535eb7299332dfd0d2b5d718d7465c8262
  Author: Qianlang Chen <[email protected]>
  Date:   2025-12-15 (Mon, 15 Dec 2025)

  Changed paths:
    M Source/WebCore/inspector/FrameInspectorController.cpp
    M Source/WebCore/inspector/FrameInspectorController.h
    M Source/WebCore/inspector/PageInspectorController.cpp
    M Source/WebCore/inspector/PageInspectorController.h
    M Source/WebCore/inspector/WebInjectedScriptManager.cpp
    M Source/WebCore/inspector/WebInjectedScriptManager.h
    M Source/WebCore/inspector/WorkerInspectorController.cpp
    M Source/WebCore/inspector/WorkerInspectorController.h
    M Source/WebCore/inspector/agents/WebConsoleAgent.cpp

  Log Message:
  -----------
  Web Inspector: Page/frame targets in the same web process should share 
InjectedScriptManager
rdar://164199657
https://bugs.webkit.org/show_bug.cgi?id=302120

Reviewed by BJ Burg.

Having many InjectedScriptManagers in the same web process and same VM
will cause problems when we start implementing agents in the frame
target and move them from the page. Make the WebInjectedScriptManager
ref-counted so that the page target (InspectorController) can share it
with its frame target (FrameInspectorController).

No new tests. No expected changes in noticeable behavior.

* Source/WebCore/inspector/FrameInspectorController.cpp:
(WebCore::FrameInspectorController::FrameInspectorController):
(WebCore::FrameInspectorController::createLazyAgents):
(WebCore::FrameInspectorController::disconnectFrontend):
(WebCore::FrameInspectorController::inspectedFrameDestroyed):
* Source/WebCore/inspector/FrameInspectorController.h:
* Source/WebCore/inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* Source/WebCore/inspector/InspectorController.h:
* Source/WebCore/inspector/WebInjectedScriptManager.cpp:
(WebCore::WebInjectedScriptManager::create):
* Source/WebCore/inspector/WebInjectedScriptManager.h:
* Source/WebCore/inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* Source/WebCore/inspector/WorkerInspectorController.h:
* Source/WebCore/inspector/agents/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::frameWindowDiscarded):

Canonical link: https://commits.webkit.org/304471@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to