WebContents::InspectElement and WebContents::InspenctServiceWorker return immediately if DevTools is disabled
This commit is contained in:
parent
2db5aa8294
commit
91fb85947d
1 changed files with 6 additions and 0 deletions
|
@ -1012,6 +1012,9 @@ void WebContents::InspectElement(int x, int y) {
|
|||
if (type_ == REMOTE)
|
||||
return;
|
||||
|
||||
if (disable_devtools_)
|
||||
return;
|
||||
|
||||
if (!managed_web_contents()->GetDevToolsWebContents())
|
||||
OpenDevTools(nullptr);
|
||||
scoped_refptr<content::DevToolsAgentHost> agent(
|
||||
|
@ -1023,6 +1026,9 @@ void WebContents::InspectServiceWorker() {
|
|||
if (type_ == REMOTE)
|
||||
return;
|
||||
|
||||
if (disable_devtools_)
|
||||
return;
|
||||
|
||||
for (const auto& agent_host : content::DevToolsAgentHost::GetOrCreateAll()) {
|
||||
if (agent_host->GetType() ==
|
||||
content::DevToolsAgentHost::TYPE_SERVICE_WORKER) {
|
||||
|
|
Loading…
Reference in a new issue