Bug 1490950: Define aboutdebugging in script tag on html. r=jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D6227

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Daisuke Akatsuka 2018-09-19 22:07:01 +00:00
parent 9f17cab93a
commit 5f86775660
4 changed files with 16 additions and 11 deletions

View File

@ -4,12 +4,6 @@
"use strict";
const { BrowserLoader } =
ChromeUtils.import("resource://devtools/client/shared/browser-loader.js", {});
const { require } = BrowserLoader({
baseURI: "resource://devtools/client/aboutdebugging-new/",
window,
});
const Services = require("Services");
const { bindActionCreators } = require("devtools/client/shared/vendor/redux");
@ -96,15 +90,13 @@ const AboutDebugging = {
const state = this.store.getState();
L10nRegistry.removeSource("aboutdebugging");
// Call removeNetworkLocationsObserver before unwatchRuntime,
// follow up in Bug 1490950.
removeNetworkLocationsObserver(this.onNetworkLocationsUpdated);
const currentRuntimeId = state.runtimes.selectedRuntimeId;
if (currentRuntimeId) {
await this.actions.unwatchRuntime(currentRuntimeId);
}
removeNetworkLocationsObserver(this.onNetworkLocationsUpdated);
setDebugTargetCollapsibilities(state.ui.debugTargetCollapsibilities);
unmountComponentAtNode(this.mount);
},

View File

@ -7,7 +7,17 @@
<meta charset="utf-8" />
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css" type="text/css"/>
<link rel="stylesheet" href="chrome://devtools/content/aboutdebugging-new/aboutdebugging.css"/>
<script src="chrome://devtools/content/aboutdebugging-new/aboutdebugging.js"></script>
<script>
"use strict";
const { BrowserLoader } =
ChromeUtils.import("resource://devtools/client/shared/browser-loader.js", {});
const { require } = BrowserLoader({
baseURI: "resource://devtools/client/aboutdebugging-new/",
window,
});
require("./aboutdebugging");
</script>
</head>
<body>
<div id="mount"></div>

View File

@ -2,6 +2,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DevToolsModules(
'aboutdebugging.js',
)
DIRS += [
'src',
]

View File

@ -89,7 +89,6 @@ devtools.jar:
content/aboutdebugging/aboutdebugging.css (aboutdebugging/aboutdebugging.css)
content/aboutdebugging-new/index.html (aboutdebugging-new/index.html)
content/aboutdebugging-new/aboutdebugging.css (aboutdebugging-new/aboutdebugging.css)
content/aboutdebugging-new/aboutdebugging.js (aboutdebugging-new/aboutdebugging.js)
# The following line is temporary until the strings for the new
# about:debugging feature stabilize.
content/aboutdebugging-new/tmp-locale/en-US/aboutdebugging.ftl (aboutdebugging-new/tmp-locale/en-US/aboutdebugging.notftl)