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)
|
if (type_ == REMOTE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (disable_devtools_)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!managed_web_contents()->GetDevToolsWebContents())
|
if (!managed_web_contents()->GetDevToolsWebContents())
|
||||||
OpenDevTools(nullptr);
|
OpenDevTools(nullptr);
|
||||||
scoped_refptr<content::DevToolsAgentHost> agent(
|
scoped_refptr<content::DevToolsAgentHost> agent(
|
||||||
|
@ -1023,6 +1026,9 @@ void WebContents::InspectServiceWorker() {
|
||||||
if (type_ == REMOTE)
|
if (type_ == REMOTE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (disable_devtools_)
|
||||||
|
return;
|
||||||
|
|
||||||
for (const auto& agent_host : content::DevToolsAgentHost::GetOrCreateAll()) {
|
for (const auto& agent_host : content::DevToolsAgentHost::GetOrCreateAll()) {
|
||||||
if (agent_host->GetType() ==
|
if (agent_host->GetType() ==
|
||||||
content::DevToolsAgentHost::TYPE_SERVICE_WORKER) {
|
content::DevToolsAgentHost::TYPE_SERVICE_WORKER) {
|
||||||
|
|
Loading…
Reference in a new issue