Skip to content

Commit 39f866b

Browse files
committed
Fix nwjs#6004 regression: cannot switch panels with CDT extension in webview
This copes with upstream change in site-per-process. CDT extension should be loaded in webview guest process and site instance in this use case.
1 parent c25ca9e commit 39f866b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ vars = {
112112
# the commit queue can handle CLs rolling V8
113113
# and whatever else without interference from each other.
114114
'v8_revision': '5be1b3861c4fe01f7e06403472d8bef7bd6ba465',
115-
'nw_src_revision': '3a6ae819417d72c4000f2df3ab4484ae9773005c',
115+
'nw_src_revision': '3b233264f3c33bbbb1bf043512b004c10ce0eb1d',
116116
'nw_v8_revision': 'b5ae645d1883ef16451b677a738cd3a5321cc54d',
117117
'nw_node_revision': '4052bfe6fa005ec309e48c25b9fa3f30bc82e354',
118118

src/browser/nw_extensions_browser_hooks.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ bool GuestSwapProcessHook(content::BrowserContext* browser_context, const GURL&
214214
std::string extension_id = url.host();
215215
const Extension* extension = registry->enabled_extensions().GetByID(extension_id);
216216
if (extension && !extensions::ManifestURL::Get(extension, "devtools_page").is_empty())
217-
return true;
217+
return false;
218218
return false;
219219
}
220220

src/resources/api_nw_window.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,13 @@ function onClose(user_force) {
785785
}
786786

787787
function get_nw() {
788-
appWindowNatives.FixGamePadAPI();
789-
var nw0 = try_nw(window).nw;
790-
if (nw0)
791-
nw0.Window.get();
788+
try {
789+
appWindowNatives.FixGamePadAPI();
790+
var nw0 = try_nw(window).nw;
791+
if (nw0)
792+
nw0.Window.get();
793+
} catch (e) {
794+
}
792795
}
793796

794797
if (bgPage !== window) {

0 commit comments

Comments
 (0)