mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1519586
- Fix js error in browser_aboutdevtools_reuse_existing.js r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D44345 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
19972acbe5
commit
17ae774116
@ -104,6 +104,10 @@ function synthesizeToggleToolboxKey() {
|
||||
*/
|
||||
function isAboutDevtoolsTab(tab) {
|
||||
const browser = tab.linkedBrowser;
|
||||
const location = browser.documentURI.spec;
|
||||
return location.startsWith("about:devtools");
|
||||
// browser.documentURI might be unavailable if the tab is loading.
|
||||
if (browser && browser.documentURI) {
|
||||
const location = browser.documentURI.spec;
|
||||
return location.startsWith("about:devtools");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user