Skip to content

Site settings UI hooks refactors; Utility class for reflecting members in java; Support fetching DCL states; Set jitless flags based on DCL states and reflect on UI#1124

Open
quh4gko8 wants to merge 8 commits into
GrapheneOS:mainfrom
repository-staging:148.0.7778.167.1

Conversation

@quh4gko8
Copy link
Copy Markdown
Member

No description provided.

@quh4gko8 quh4gko8 force-pushed the 148.0.7778.167.1 branch from bc8db28 to 22653fe Compare May 13, 2026 17:02
Copy link
Copy Markdown
Member

@inthewaves inthewaves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think it makes more sense to always show the message with the link to Android Settings even if user had it off originally so that users know where it's coming from:

Allow JIT then DCLM off shows the app settings link Don't allow JIT then DCLM off shows the app settings link

+ .containsKey("CheckOsConfigsForIsolatedProcessV1")) {
+ return;
+ }
+ if (CustomOSApis.isExecmemBlocked()) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CustomOSApis.isExecmemBlocked() is nullable, so null would NPE here

Also should we be using CustomOSApis.isExecmemBlocked() still here? The documentation for it says, "Method obsoleted since 2026050400 release"

    /**
     * Checks if execmem is blocked in current process. Method obsoleted since 2026050400 release.
     * @return true or false if method exists and returns boolean type, null otherwise.
     */
    public static Boolean isExecmemBlocked() {
        return sIsExecmemBlockedMethodCacheWrapper.invoke(null);
    }

Would likely need to replace with isMemoryDclRestricted() for browser child processes and WebView child processes should follow .isWebViewDclRestricted(). Maybe a helper like this with a fallback to obsolete API in the case of older OS versions

private static boolean shouldForceJitless(@LibraryProcessType int type) {
    Boolean restricted = null;
    switch (type) {
        case LibraryProcessType.PROCESS_CHILD:
            restricted = CustomOSApis.isMemoryDclRestricted();
            break;
        case LibraryProcessType.PROCESS_WEBVIEW_CHILD:
            restricted = CustomOSApis.isWebViewDclRestricted();
            break;
    }

    if (restricted == null) {
        restricted = CustomOSApis.isExecmemBlocked();
    }
    return Boolean.TRUE.equals(restricted);
}

+import android.graphics.drawable.Drawable;
+
@NullMarked
public final class JavascriptJitSettingsHooks {
Copy link
Copy Markdown
Member

@inthewaves inthewaves May 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should update the Site settings JavaScript JIT UI preference when DCLM is disabled, currently it's shown like this when DCLM is disabled but it was allowed in Vanadium before:

Image

Apply the attached patch

0001-fixup-Reflect-Javascript-JIT-state-also-dependent-on.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants