Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d085b3f19231b28ece7b18aa18d0b075dd6d7f1c
      
https://github.com/WebKit/WebKit/commit/d085b3f19231b28ece7b18aa18d0b075dd6d7f1c
  Author: Ryosuke Niwa <[email protected]>
  Date:   2025-12-19 (Fri, 19 Dec 2025)

  Changed paths:
    M Source/WebCore/bindings/js/ScriptController.cpp
    M Source/WebCore/bindings/js/ScriptController.h
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm

  Log Message:
  -----------
  Evaluating scripts in non-normal world should always work even inside a 
sandboxed iframe
https://bugs.webkit.org/show_bug.cgi?id=304512

Reviewed by Sihui Liu and Alex Christensen.

When a script is evaluated using evaluateJavaScript in a non-normal world, we 
should always
execute it even if the sandbox rule prohibited the execution of scripts in the 
normal world.

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm

* Source/WebCore/bindings/js/ScriptController.cpp:
(WebCore::ScriptController::executeScriptInWorld):
(WebCore::ScriptController::canExecuteScripts):
* Source/WebCore/bindings/js/ScriptController.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewEvaluateJavaScript.mm:
(TEST(WKWebView, EvaluateJavaScriptInWorlds)):

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



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

Reply via email to