commit | 54f4c4a5ddf2ad1c9420fb00efe17a0c62826c62 | [log] [tgz] |
---|---|---|
author | Andrey Kosyakov <[email protected]> | Tue Nov 03 03:34:56 2020 |
committer | Commit Bot <[email protected]> | Tue Nov 03 03:34:56 2020 |
tree | 3137c316453afeff3283c96eaf961ed7050af96e | |
parent | d676fda044e638dc555003f4a5ae2020226f6d8f [diff] [blame] |
chrome.debugger: allow attaching to pages having frames with empty URLs Originally regressed by https://chromium-review.googlesource.com/c/chromium/src/+/2412799 Bug: 1143221 Change-Id: I8323b97ecf556d6ad27d1b34d1357479bb208843 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2511749 Commit-Queue: Andrey Kosyakov <[email protected]> Reviewed-by: Devlin <[email protected]> Reviewed-by: Dmitry Gozman <[email protected]> Cr-Commit-Position: refs/heads/master@{#823436}
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc index 4be0073b..b2858ef 100644 --- a/chrome/browser/extensions/api/debugger/debugger_api.cc +++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -92,6 +92,10 @@ const GURL& url, Profile* profile, std::string* error) { + // Allow the extension to attach to about:blank and empty URLs. + if (url.is_empty() || url == "about:") + return true; + if (url == content::kUnreachableWebDataURL) return true; @@ -401,9 +405,6 @@ bool is_webui) { if (is_webui) return false; - // Allow the extension to attach to about:blank. - if (url.is_empty() || url == "about:") - return true; std::string error; if (!ExtensionMayAttachToURL(*extension_, url, profile_, &error)) return false;