Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 7 additions & 31 deletions patches/disable-jit-for-internal-pages.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,25 @@ diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/ch
index e5ce608907f72..09159a4e83115 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -8013,9 +8013,12 @@ bool ChromeContentBrowserClient::IsJitDisabledForSite(
@@ -8013,9 +8013,10 @@ bool ChromeContentBrowserClient::IsJitDisabledForSite(
nullptr) == CONTENT_SETTING_BLOCK;
}

- // Only disable JIT for web schemes.
- if (!site_url.SchemeIsHTTPOrHTTPS())
+ // Disable JIT for non-web schemes.
+ if (!site_url.SchemeIsHTTPOrHTTPS()) {
+ if (!base::FeatureList::IsEnabled(features::kEnableInternalPageJit))
+ return true;
return false;
+ }
- return false;
+ // Only force disable JIT for pages that aren't web schemes, aren't file schemes, and aren't extensions
+ if (!site_url.SchemeIsHTTPOrHTTPS() && !site_url.SchemeIsFile()
+ && !site_url.SchemeIs("chrome-extension"))
+ return true;

return (map && map->GetContentSetting(site_url, site_url,
ContentSettingsType::JAVASCRIPT_JIT) ==
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc
index 2d95d5e1df911..e7a29a6687a07 100644
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -16,6 +16,9 @@

namespace features {

+BASE_FEATURE(kEnableInternalPageJit, "EnableInternalPageJit",
+ base::FEATURE_DISABLED_BY_DEFAULT);
+
// All features in alphabetical order.

// Kill switch to guard additional security checks performed by the browser
@@ -1067,7 +1070,7 @@ BASE_FEATURE(kDisableProcessReuse,
@@ -1067,7 +1067,7 @@ BASE_FEATURE(kDisableProcessReuse,
// This feature is only consulted in site-per-process mode.
BASE_FEATURE(kSpareRendererForSitePerProcess,
"SpareRendererForSitePerProcess",
Expand All @@ -40,16 +29,3 @@ index 2d95d5e1df911..e7a29a6687a07 100644

// Controls whether site isolation should use origins instead of scheme and
// eTLD+1.
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h
index a69dcd3b24015..2f6f3d9265bbf 100644
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -21,6 +21,8 @@

namespace features {

+CONTENT_EXPORT BASE_DECLARE_FEATURE(kEnableInternalPageJit);
+
// BEFORE MODIFYING THIS FILE: If your feature is only used inside content/, add
// your feature in `content/common/features.h` instead.

6 changes: 1 addition & 5 deletions patches/expose-flags.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 7613006656aaa..ee707f847ccba 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4343,6 +4343,48 @@ const FeatureEntry kFeatureEntries[] = {
@@ -4343,6 +4343,44 @@ const FeatureEntry kFeatureEntries[] = {
// //tools/flags/generate_unexpire_flags.py.
#include "build/chromeos_buildflags.h"
#include "chrome/browser/unexpire_flags_gen.inc"
Expand Down Expand Up @@ -39,10 +39,6 @@ index 7613006656aaa..ee707f847ccba 100644
+ "Hides the profile icon in the toolbar in regular profiles. Enabled "
+ "by default. This feature is provided by Trivalent." , kOsAll,
+ FEATURE_VALUE_TYPE(features::kHideProfileIcon)},
+ {"internal-page-jit", "Internal Page Jit",
+ "Toggle JIT for JavaScript and WASM on internal pages & extensions. "
+ "Disabled by default. This feature is provided by Trivalent.",
+ kOsAll, FEATURE_VALUE_TYPE(features::kEnableInternalPageJit)},
+ {"gssapi-support", "GSSAPI Authentication",
+ "Enables GSSAPI for authentication. WARNING! This can cause the "
+ "network service sandbox to become persistently disabled, enable only "
Expand Down