Skip to content

Commit 2a8ef0e

Browse files
committed
Force starting devtools window in new renderer process
1 parent f8216f4 commit 2a8ef0e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/nw_shell.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,19 @@ void Shell::ShowDevTools() {
278278
manifest.SetInteger(switches::kmWidth, 700);
279279
manifest.SetInteger(switches::kmHeight, 500);
280280

281+
ShellBrowserContext* browser_context =
282+
static_cast<ShellBrowserContext*>(web_contents_->GetBrowserContext());
283+
284+
browser_context->set_pinning_renderer(false); // opens devtool in
285+
// new renderer
286+
// process or break
287+
// points will stall both
281288
Shell* shell = new Shell(
282289
WebContents::Create(web_contents()->GetBrowserContext(),
283290
NULL, MSG_ROUTING_NONE, NULL),
284291
&manifest);
292+
browser_context->set_pinning_renderer(true);
293+
285294
int rh_id = shell->web_contents_->GetRenderProcessHost()->GetID();
286295
ChildProcessSecurityPolicyImpl::GetInstance()->GrantScheme(rh_id, chrome::kFileScheme);
287296
shell->is_devtools_ = true;

0 commit comments

Comments
 (0)