mirror of https://github.com/electron/electron
23 lines
1.1 KiB
Diff
23 lines
1.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: John Kleinschmidt <jkleinsc@electronjs.org>
|
|
Date: Mon, 30 Oct 2023 20:56:45 -0400
|
|
Subject: chore: remove CHECK_IS_TEST on script injection tracker
|
|
|
|
https://chromium-review.googlesource.com/c/chromium/src/+/4950530 added
|
|
a check for test when the UserScriptManager is not available. In
|
|
Electron when a session is non persistent we do not initialize the
|
|
ExtensionSystem, so this check is not relevant for Electron.
|
|
|
|
diff --git a/extensions/browser/script_injection_tracker.cc b/extensions/browser/script_injection_tracker.cc
|
|
index 0bcfb2e759b65a9c9dc29a21e954f91d7bc971d9..c20e988c1d5caaf36101f641a8d624c09c23cb83 100644
|
|
--- a/extensions/browser/script_injection_tracker.cc
|
|
+++ b/extensions/browser/script_injection_tracker.cc
|
|
@@ -170,7 +170,6 @@ std::vector<const UserScript*> GetLoadedDynamicScripts(
|
|
UserScriptManager* manager =
|
|
ExtensionSystem::Get(process.GetBrowserContext())->user_script_manager();
|
|
if (!manager) {
|
|
- CHECK_IS_TEST();
|
|
return std::vector<const UserScript*>();
|
|
}
|
|
|