Bug 247168 - XPCServiceInitializer should process "disable-jit" before "enable-captive-portal-mode".
Summary: XPCServiceInitializer should process "disable-jit" before "enable-captive-por...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-10-27 21:44 PDT by Mark Lam
Modified: 2022-10-27 21:57 PDT (History)
2 users (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-10-27 21:44:58 PDT
The reason is because "disable-jit" calls JSC::ExecutableAllocator::setJITEnabled(), which should be done before calling JSC::Options::initialize().  The processing of "enable-captive-portal-mode" in XPCServiceInitializer does itself call JSC::ExecutableAllocator::setJITEnabled() before calling JSC::Options::initialize().  Hence, if we process "disable-jit" case afterwards, it will have no effect because JSC::Options::initialize() has already been called.

In practice, this doesn't matter because both the "disable-jit" and "enable-captive-portal-mode" cases disables the JIT.  However, just so the code doesn't erroneously suggest that it's ok to call JSC::ExecutableAllocator::setJITEnabled() after calling JSC::Options::initialize(), let's fix the order.
Comment 1 Radar WebKit Bug Importer 2022-10-27 21:45:31 PDT
<rdar://problem/101664549>
Comment 2 Mark Lam 2022-10-27 21:57:55 PDT
Correction: this is not needed.  JSC::ExecutableAllocator::setJITEnabled() needs to be called before JSC::initialized() is called, not before JSC::Options::initialize() is called.  So, there's no issue here.