Skip to content

Commit

Permalink
Fix #6004 regression: cannot switch panels with CDT extension in webview
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rogerwang committed Oct 15, 2018
1 parent c25ca9e commit 39f866b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DEPS
Expand Up @@ -112,7 +112,7 @@ vars = {
# the commit queue can handle CLs rolling V8
# and whatever else without interference from each other.
'v8_revision': '5be1b3861c4fe01f7e06403472d8bef7bd6ba465',
'nw_src_revision': '3a6ae819417d72c4000f2df3ab4484ae9773005c',
'nw_src_revision': '3b233264f3c33bbbb1bf043512b004c10ce0eb1d',
'nw_v8_revision': 'b5ae645d1883ef16451b677a738cd3a5321cc54d',
'nw_node_revision': '4052bfe6fa005ec309e48c25b9fa3f30bc82e354',

Expand Down
2 changes: 1 addition & 1 deletion src/browser/nw_extensions_browser_hooks.cc
Expand Up @@ -214,7 +214,7 @@ bool GuestSwapProcessHook(content::BrowserContext* browser_context, const GURL&
std::string extension_id = url.host();
const Extension* extension = registry->enabled_extensions().GetByID(extension_id);
if (extension && !extensions::ManifestURL::Get(extension, "devtools_page").is_empty())
return true;
return false;
return false;
}

Expand Down
11 changes: 7 additions & 4 deletions src/resources/api_nw_window.js
Expand Up @@ -785,10 +785,13 @@ function onClose(user_force) {
}

function get_nw() {
appWindowNatives.FixGamePadAPI();
var nw0 = try_nw(window).nw;
if (nw0)
nw0.Window.get();
try {
appWindowNatives.FixGamePadAPI();
var nw0 = try_nw(window).nw;
if (nw0)
nw0.Window.get();
} catch (e) {
}
}

if (bgPage !== window) {
Expand Down

0 comments on commit 39f866b

Please sign in to comment.