Bug 248682 - Clean up some options initialization workflow.
Summary: Clean up some options initialization workflow.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-02 13:27 PST by Mark Lam
Modified: 2022-12-02 16:29 PST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2022-12-02 13:27:47 PST
We always call correctOptions() before recomputeDependentOptions(), and often call dumpOptionsIfNeeded() and ensureOptionsAreCoherent() after.

This patch makes things more consistent by:
1. Rename recomputeDependentOptions() to notifyOptionsChanged().
2. Rename ensureOptionsAreCoherent() to assertOptionsAreCoherent(), because "ensure" implies that the function will make them coherent.  Instead, the function asserts that they are coherent.
3. Move the body of correctOptions() (which is a tiny function) into the top of notifyOptionsChanged().
4. Call dumpOptionsIfNeeded() and assertOptionsAreCoherent() at the end of notifyOptionsChanged() instead of from clients.
5. Make sure clients call notifyOptionsChanged() after changing options.

Additionally:
6. Rename ExecutableAllocator:: setJITEnabled() to ExecutableAllocator::disableJIT().  Disabling JIT in this function was always a one way street, and there's no going back.  This rename makes it clear and explicit.
Comment 1 Radar WebKit Bug Importer 2022-12-02 13:28:13 PST
<rdar://problem/102916238>
Comment 2 Mark Lam 2022-12-02 13:41:21 PST
<rdar://problem/102916238>
Comment 3 Mark Lam 2022-12-02 13:43:08 PST
<rdar://problem/102844335>
Comment 4 Mark Lam 2022-12-02 14:33:47 PST
Pull request: https://github.com/WebKit/WebKit/pull/7095
Comment 5 EWS 2022-12-02 16:29:33 PST
Committed 257311@main (6d72ef261e4a): <https://commits.webkit.org/257311@main>

Reviewed commits have been landed. Closing PR #7095 and removing active labels.