[webkit-changes] [WebKit/WebKit] 355e9d: [JSC] Add linked-on-after quirk for canDeclareGlob...

Commit Queue noreply at github.com
Tue Jan 30 11:27:18 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 355e9d25900a300375b1b68576f926278d8b5903
      https://github.com/WebKit/WebKit/commit/355e9d25900a300375b1b68576f926278d8b5903
  Author: Alexey Shvayka <ashvayka at apple.com>
  Date:   2024-01-30 (Tue, 30 Jan 2024)

  Changed paths:
    M Source/JavaScriptCore/jsc.cpp
    M Source/JavaScriptCore/runtime/ProgramExecutable.cpp
    M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp
    M Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h

  Log Message:
  -----------
  [JSC] Add linked-on-after quirk for canDeclareGlobalFunction()
https://bugs.webkit.org/show_bug.cgi?id=267199
<rdar://120965147>

Reviewed by Mark Lam.

This change adds linked-on-after quirk for behavior introduced in https://webkit.org/b/260487,
preventing TypeError from being thrown if canDeclareGlobalFunction() fails, yet only in global code.
Instead of throwing, we bring back old non-compliant behavior of removing non-configurable global property.

* Source/JavaScriptCore/jsc.cpp:
Just like WTR / DRT are calling enableAllSDKAlignedBehaviors(), make JSC shell call it as well.
It's necessary for linkedOnOrAfterSDKWithBehavior() to work locally and on EWS.

* Source/JavaScriptCore/runtime/ProgramExecutable.cpp:
(JSC::requiresCanDeclareGlobalFunctionQuirk):
(JSC::ProgramExecutable::initializeGlobalProperties):
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.cpp:
(WTF::computeSDKAlignedBehaviors):
* Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:

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




More information about the webkit-changes mailing list