Skip to content

Commit 0ce45f5

Browse files
committed
keep the background script alive
1 parent e5dd6d0 commit 0ce45f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/shell_browser_main_parts.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
#include "content/nw/src/common/shell_extensions_client.h"
7777

7878
#include "extensions/browser/browser_context_keyed_service_factories.h"
79+
#include "extensions/browser/process_manager.h"
7980

8081
using base::MessageLoop;
8182

@@ -262,8 +263,10 @@ void ShellBrowserMainParts::Init() {
262263
extensions::ExtensionSystem::Get(browser_context_.get()));
263264
extension_system->Init();
264265
const extensions::Extension* extension = extension_system->LoadInternalApp();
265-
if (extension)
266+
if (extension) {
266267
extension_system->LaunchApp(extension->id());
268+
extensions::ProcessManager::Get(browser_context_.get())->IncrementLazyKeepaliveCount(extension);
269+
}
267270

268271
std::string dummy;
269272
if (!package()->root()->GetString("bg-script", &dummy) ||

0 commit comments

Comments
 (0)