0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 05:33:03 -05:00

Update patches/devtools-bypass.patch

This commit is contained in:
LagradOst 2023-10-03 22:23:24 +00:00 committed by Malte Jürgens
parent 52bac2fae2
commit e2b01dc6ba

View file

@ -1,20 +1,3 @@
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index fdd5468..b012c07 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -2772,6 +2772,11 @@ pref("devtools.debugger.features.async-captured-stacks", true);
pref("devtools.debugger.features.async-live-stacks", false);
pref("devtools.debugger.hide-ignored-sources", false);
+// Force detach the debugger to prevent detecting that the debugger is initialized.
+pref("devtools.debugger.force_detach", false);
+// Stops all logging to prevent detection of devtools by evaluating strings.
+pref("devtools.console.logging_disabled", false);
+
// Disable autohide for DevTools popups and tooltips.
// This is currently not exposed by any UI to avoid making
// about:devtools-toolbox tabs unusable by mistake.
diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js diff --git a/devtools/server/actors/thread.js b/devtools/server/actors/thread.js
index d91f463..3c1ba5a 100644 index d91f463..3c1ba5a 100644
--- a/devtools/server/actors/thread.js --- a/devtools/server/actors/thread.js
@ -24,7 +7,7 @@ index d91f463..3c1ba5a 100644
// Note that the client avoids trying to call attach if already attached. // Note that the client avoids trying to call attach if already attached.
// But just in case, avoid any possible duplicate call to attach. // But just in case, avoid any possible duplicate call to attach.
- if (this.alreadyAttached) { - if (this.alreadyAttached) {
+ let forceDetach = Services.prefs.getBoolPref("devtools.debugger.force_detach", false); + let forceDetach = Services.prefs.getBoolPref("librewolf.debugger.force_detach", false);
+ if (this.alreadyAttached || forceDetach) { + if (this.alreadyAttached || forceDetach) {
return; return;
} }
@ -38,7 +21,7 @@ index 3e5d0bc..8260e2b 100644
*/ */
onConsoleAPILogEvent(message) { onConsoleAPILogEvent(message) {
- if (!this.handler) { - if (!this.handler) {
+ let disableConsole = Services.prefs.getBoolPref("devtools.console.logging_disabled", false); + let disableConsole = Services.prefs.getBoolPref("librewolf.console.logging_disabled", false);
+ if (!this.handler || disableConsole) { + if (!this.handler || disableConsole) {
return; return;
} }