зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1403489 - remove special loader rule for devtools/shared/platform;r=tromey
MozReview-Commit-ID: HwhAXHm8ipq --HG-- rename : devtools/shared/platform/content/.eslintrc.js => devtools/client/shared/webpack/shims/.eslintrc.js rename : devtools/shared/platform/content/moz.build => devtools/client/shared/webpack/shims/moz.build rename : devtools/shared/platform/content/clipboard.js => devtools/client/shared/webpack/shims/platform-clipboard-stub.js rename : devtools/shared/platform/content/stack.js => devtools/client/shared/webpack/shims/platform-stack-stub.js rename : devtools/shared/platform/content/test/.eslintrc.js => devtools/client/shared/webpack/shims/test/.eslintrc.js rename : devtools/shared/platform/content/test/mochitest.ini => devtools/client/shared/webpack/shims/test/mochitest.ini rename : devtools/shared/platform/content/test/test_clipboard.html => devtools/client/shared/webpack/shims/test/test_clipboard.html rename : devtools/shared/platform/content/test/test_stack.js => devtools/client/shared/webpack/shims/test/test_stack.js rename : devtools/shared/platform/content/test/xpcshell.ini => devtools/client/shared/webpack/shims/test/xpcshell.ini rename : devtools/shared/platform/chrome/clipboard.js => devtools/shared/platform/clipboard.js rename : devtools/shared/platform/chrome/stack.js => devtools/shared/platform/stack.js extra : rebase_source : d233c0d5b4691f595ec61cae52167921f57ee942
This commit is contained in:
Родитель
1df9d06245
Коммит
0702847ccf
|
@ -131,7 +131,7 @@ devtools/server/tests/browser/storage-*.html
|
|||
!devtools/server/tests/browser/storage-unsecured-iframe.html
|
||||
devtools/server/tests/browser/stylesheets-nested-iframes.html
|
||||
devtools/server/tests/unit/xpcshell_debugging_script.js
|
||||
devtools/shared/platform/content/test/test_clipboard.html
|
||||
devtools/client/shared/webpack/shims/test/test_clipboard.html
|
||||
devtools/shared/qrcode/tests/mochitest/test_decode.html
|
||||
devtools/shared/tests/mochitest/*.html
|
||||
devtools/shared/webconsole/test/test_*.html
|
||||
|
|
|
@ -99,7 +99,10 @@ module.exports = envConfig => {
|
|||
"devtools/shared/DevToolsUtils":
|
||||
path.join(__dirname, "./webpack/devtools-utils-sham.js"),
|
||||
"devtools/shared/locales": path.join(__dirname, "../../shared/locales/en-US"),
|
||||
"devtools/shared/platform": path.join(__dirname, "../../shared/platform/content"),
|
||||
"devtools/shared/platform/clipboard": path.join(__dirname,
|
||||
"../../client/shared/webpack/shims/platform-clipboard-stub"),
|
||||
"devtools/shared/platform/stack": path.join(__dirname,
|
||||
"../../client/shared/webpack/shims/platform-clipboard-stub"),
|
||||
"devtools": path.join(__dirname, "../../"),
|
||||
"gcli": path.join(__dirname, "../../shared/gcli/source/lib/gcli"),
|
||||
"method": path.join(__dirname, "../../../addon-sdk/source/lib/method"),
|
||||
|
|
|
@ -87,7 +87,7 @@ let webpackConfig = {
|
|||
|
||||
"devtools/shared/old-event-emitter": "devtools-modules/src/utils/event-emitter",
|
||||
"devtools/shared/fronts/timeline": path.join(__dirname, "../../client/shared/webpack/shims/fronts-timeline-shim"),
|
||||
"devtools/shared/platform/clipboard": path.join(__dirname, "../../shared/platform/content/clipboard"),
|
||||
"devtools/shared/platform/clipboard": path.join(__dirname, "../../client/shared/webpack/shims/platform-clipboard-stub"),
|
||||
|
||||
// Locales need to be explicitly mapped to the en-US subfolder
|
||||
"devtools/client/locales": path.join(__dirname, "../../client/locales/en-US"),
|
||||
|
|
|
@ -12,6 +12,7 @@ DIRS += [
|
|||
'redux',
|
||||
'source-map',
|
||||
'vendor',
|
||||
'webpack',
|
||||
'widgets',
|
||||
]
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
# 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(
|
||||
'clipboard.js',
|
||||
'stack.js',
|
||||
)
|
||||
DIRS += [
|
||||
'shims',
|
||||
]
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module.exports = {
|
||||
// Extend from the devtools eslintrc.
|
||||
"extends": "../../../.eslintrc.js",
|
||||
"extends": "../../../../.eslintrc.js",
|
||||
|
||||
"rules": {
|
||||
/* eslint-disable max-len */
|
|
@ -5,8 +5,8 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DevToolsModules(
|
||||
'clipboard.js',
|
||||
'stack.js',
|
||||
'platform-clipboard-stub.js',
|
||||
'platform-stack-stub.js',
|
||||
)
|
||||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
|
|
@ -2,5 +2,5 @@
|
|||
|
||||
module.exports = {
|
||||
// Extend from the common devtools xpcshell eslintrc config.
|
||||
"extends": "../../../../.eslintrc.xpcshell.js"
|
||||
"extends": "../../../../../.eslintrc.xpcshell.js"
|
||||
};
|
|
@ -39,7 +39,7 @@ async function pre_do_tests() {
|
|||
await (() => new Promise((resolve) => {
|
||||
var script = document.createElement("script");
|
||||
script.onload = resolve;
|
||||
script.src = "resource://devtools/shared/platform/content/clipboard.js";
|
||||
script.src = "resource://devtools/client/shared/webpack/shims/platform-clipboard-stub.js";
|
||||
document.head.appendChild(script);
|
||||
}))();
|
||||
|
|
@ -9,14 +9,11 @@
|
|||
var Cu = Components.utils;
|
||||
const {require} = Cu.import("resource://devtools/shared/Loader.jsm", {});
|
||||
|
||||
// Make sure to explicitly require the content version of this module.
|
||||
// We have to use the ".." trick due to the way the loader remaps
|
||||
// devtools/shared/platform.
|
||||
const {
|
||||
callFunctionWithAsyncStack,
|
||||
getStack,
|
||||
describeNthCaller
|
||||
} = require("devtools/shared/platform/../content/stack");
|
||||
} = require("devtools/client/shared/webpack/shims/platform-stack-stub");
|
||||
|
||||
function f3() {
|
||||
return describeNthCaller(2);
|
|
@ -90,8 +90,8 @@ webpackConfig.resolve = {
|
|||
"devtools/shared/fronts/timeline": path.join(__dirname, "../../client/shared/webpack/shims/fronts-timeline-shim"),
|
||||
"devtools/shared/old-event-emitter": "devtools-modules/src/utils/event-emitter",
|
||||
"devtools/shared/client/main": path.join(__dirname, "new-console-output/test/fixtures/ObjectClient"),
|
||||
"devtools/shared/platform/clipboard": path.join(__dirname, "../../shared/platform/content/clipboard"),
|
||||
"devtools/shared/platform/stack": path.join(__dirname, "../../shared/platform/content/stack"),
|
||||
"devtools/shared/platform/clipboard": path.join(__dirname, "../../client/shared/webpack/shims/platform-clipboard-stub"),
|
||||
"devtools/shared/platform/stack": path.join(__dirname, "../../client/shared/webpack/shims/platform-stack-stub"),
|
||||
|
||||
// Locales need to be explicitly mapped to the en-US subfolder
|
||||
"toolkit/locales": path.join(__dirname, "../../../toolkit/locales/en-US"),
|
||||
|
|
|
@ -29,13 +29,6 @@ function BuiltinProvider() {}
|
|||
BuiltinProvider.prototype = {
|
||||
load: function () {
|
||||
const paths = {
|
||||
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
|
||||
// Modules here are intended to have one implementation for
|
||||
// chrome, and a separate implementation for content. Here we
|
||||
// map the directory to the chrome subdirectory, but the content
|
||||
// loader will map to the content subdirectory. See the
|
||||
// README.md in devtools/shared/platform.
|
||||
"devtools/shared/platform": "resource://devtools/shared/platform/chrome",
|
||||
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
|
||||
"devtools": "resource://devtools",
|
||||
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
This directory is treated specially by the loaders.
|
||||
|
||||
In particular, when running in chrome, a resource like
|
||||
"devtools/shared/platform/mumble" will be found in the chrome
|
||||
subdirectory; and when running in content, it will be found in the
|
||||
content subdirectory.
|
||||
|
||||
Outside of tests, it's not ok to require a specific version of a file;
|
||||
and there is an eslint test to check for that. That is,
|
||||
require("devtools/shared/platform/client/mumble") is an error.
|
||||
|
||||
When adding a new file, you must add two copies, one to chrome and one
|
||||
to content. Otherwise, one case or the other will fail to work.
|
|
@ -4,7 +4,7 @@
|
|||
# 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/.
|
||||
|
||||
DIRS += [
|
||||
'chrome',
|
||||
'content',
|
||||
]
|
||||
DevToolsModules(
|
||||
'clipboard.js',
|
||||
'stack.js',
|
||||
)
|
||||
|
|
|
@ -577,13 +577,6 @@ this.worker = new WorkerDebuggerLoader({
|
|||
"xpcInspector": xpcInspector
|
||||
},
|
||||
paths: {
|
||||
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
|
||||
// Modules here are intended to have one implementation for
|
||||
// chrome, and a separate implementation for content. Here we
|
||||
// map the directory to the chrome subdirectory, but the content
|
||||
// loader will map to the content subdirectory. See the
|
||||
// README.md in devtools/shared/platform.
|
||||
"devtools/shared/platform": "resource://devtools/shared/platform/chrome",
|
||||
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
|
||||
"devtools": "resource://devtools",
|
||||
// ⚠ DISCUSSION ON DEV-DEVELOPER-TOOLS REQUIRED BEFORE MODIFYING ⚠
|
||||
|
|
Загрузка…
Ссылка в новой задаче