[webkit-changes] [WebKit/WebKit] a3fb9e: [JSC] Use smart pointers to store reference to Loc...

Claudio Saavedra noreply at github.com
Wed Jan 22 05:29:43 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a3fb9e99575e0931198a0fe3966fb609b063d1f4
      https://github.com/WebKit/WebKit/commit/a3fb9e99575e0931198a0fe3966fb609b063d1f4
  Author: Claudio Saavedra <csaavedra at igalia.com>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations
    M Source/WebCore/bindings/js/ScriptController.cpp
    M Source/WebCore/bindings/js/ScriptController.h

  Log Message:
  -----------
  [JSC] Use smart pointers to store reference to LocalFrame in ScriptController
https://bugs.webkit.org/show_bug.cgi?id=285994

Reviewed by Darin Adler.

This fixes a Safer-CPP warning caused by using a raw reference to
store the owning LocalFrame in ScriptController. Since the frame
owns the controller, a weak reference is enough here.

* Source/WebCore/SaferCPPExpectations/NoUncountedMemberCheckerExpectations:
* Source/WebCore/bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::initScriptForWindowProxy):
(WebCore::ScriptController::protectedFrame const):
(WebCore::ScriptController::windowProxy):
(WebCore::ScriptController::jsWindowProxy):
(WebCore::ScriptController::eventHandlerPosition const):
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::canExecuteScripts):
(WebCore::ScriptController::executeJavaScriptURL):
* Source/WebCore/bindings/js/ScriptController.h:

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



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


More information about the webkit-changes mailing list