зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1765913 - Stop using jsm extension for non-JSM files in osfile. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D144941
This commit is contained in:
Родитель
3d9050fbb5
Коммит
0697e3d5c9
|
@ -9,7 +9,7 @@ EXTRA_JS_MODULES.osfile += [
|
|||
"osfile_async_worker.js",
|
||||
"osfile_native.jsm",
|
||||
"osfile_shared_allthreads.jsm",
|
||||
"osfile_shared_front.jsm",
|
||||
"osfile_shared_front.js",
|
||||
"ospath.jsm",
|
||||
"ospath_unix.jsm",
|
||||
"ospath_win.jsm",
|
||||
|
@ -18,12 +18,12 @@ EXTRA_JS_MODULES.osfile += [
|
|||
if CONFIG["OS_TARGET"] == "WINNT":
|
||||
EXTRA_JS_MODULES.osfile += [
|
||||
"osfile_win_allthreads.jsm",
|
||||
"osfile_win_back.jsm",
|
||||
"osfile_win_front.jsm",
|
||||
"osfile_win_back.js",
|
||||
"osfile_win_front.js",
|
||||
]
|
||||
else:
|
||||
EXTRA_JS_MODULES.osfile += [
|
||||
"osfile_unix_allthreads.jsm",
|
||||
"osfile_unix_back.jsm",
|
||||
"osfile_unix_front.jsm",
|
||||
"osfile_unix_back.js",
|
||||
"osfile_unix_front.js",
|
||||
]
|
||||
|
|
|
@ -13,9 +13,7 @@
|
|||
/* global OS */
|
||||
|
||||
if (typeof Components != "undefined") {
|
||||
throw new Error(
|
||||
"osfile_shared_front.jsm cannot be used from the main thread"
|
||||
);
|
||||
throw new Error("osfile_shared_front.js cannot be used from the main thread");
|
||||
}
|
||||
(function(exports) {
|
||||
var SharedAll = require("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
|
|
@ -8,13 +8,13 @@
|
|||
// eslint-disable-next-line no-lone-blocks
|
||||
{
|
||||
if (typeof Components != "undefined") {
|
||||
// We do not wish osfile_unix_back.jsm to be used directly as a main thread
|
||||
// We do not wish osfile_unix_back.js to be used directly as a main thread
|
||||
// module yet. When time comes, it will be loaded by a combination of
|
||||
// a main thread front-end/worker thread implementation that makes sure
|
||||
// that we are not executing synchronous IO code in the main thread.
|
||||
|
||||
throw new Error(
|
||||
"osfile_unix_back.jsm cannot be used from the main thread yet"
|
||||
"osfile_unix_back.js cannot be used from the main thread yet"
|
||||
);
|
||||
}
|
||||
(function(exports) {
|
|
@ -15,17 +15,17 @@
|
|||
// eslint-disable-next-line no-lone-blocks
|
||||
{
|
||||
if (typeof Components != "undefined") {
|
||||
// We do not wish osfile_unix_front.jsm to be used directly as a main thread
|
||||
// We do not wish osfile_unix_front.js to be used directly as a main thread
|
||||
// module yet.
|
||||
|
||||
throw new Error(
|
||||
"osfile_unix_front.jsm cannot be used from the main thread yet"
|
||||
"osfile_unix_front.js cannot be used from the main thread yet"
|
||||
);
|
||||
}
|
||||
(function(exports) {
|
||||
"use strict";
|
||||
|
||||
// exports.OS.Unix is created by osfile_unix_back.jsm
|
||||
// exports.OS.Unix is created by osfile_unix_back.js
|
||||
if (exports.OS && exports.OS.File) {
|
||||
return; // Avoid double-initialization
|
||||
}
|
|
@ -24,12 +24,14 @@
|
|||
// eslint-disable-next-line no-lone-blocks
|
||||
{
|
||||
if (typeof Components != "undefined") {
|
||||
// We do not wish osfile_win.jsm to be used directly as a main thread
|
||||
// We do not wish osfile_win_back.js to be used directly as a main thread
|
||||
// module yet. When time comes, it will be loaded by a combination of
|
||||
// a main thread front-end/worker thread implementation that makes sure
|
||||
// that we are not executing synchronous IO code in the main thread.
|
||||
|
||||
throw new Error("osfile_win.jsm cannot be used from the main thread yet");
|
||||
throw new Error(
|
||||
"osfile_win_back.js cannot be used from the main thread yet"
|
||||
);
|
||||
}
|
||||
|
||||
(function(exports) {
|
|
@ -15,17 +15,17 @@
|
|||
// eslint-disable-next-line no-lone-blocks
|
||||
{
|
||||
if (typeof Components != "undefined") {
|
||||
// We do not wish osfile_win_front.jsm to be used directly as a main thread
|
||||
// We do not wish osfile_win_front.js to be used directly as a main thread
|
||||
// module yet.
|
||||
throw new Error(
|
||||
"osfile_win_front.jsm cannot be used from the main thread yet"
|
||||
"osfile_win_front.js cannot be used from the main thread yet"
|
||||
);
|
||||
}
|
||||
|
||||
(function(exports) {
|
||||
"use strict";
|
||||
|
||||
// exports.OS.Win is created by osfile_win_back.jsm
|
||||
// exports.OS.Win is created by osfile_win_back.js
|
||||
if (exports.OS && exports.OS.File) {
|
||||
return; // Avoid double-initialization
|
||||
}
|
|
@ -26,15 +26,15 @@ if (typeof Components != "undefined") {
|
|||
// what looks like a nested event loop bug (see bug 794091).
|
||||
if (SharedAll.Constants.Win) {
|
||||
importScripts(
|
||||
"resource://gre/modules/osfile/osfile_win_back.jsm",
|
||||
"resource://gre/modules/osfile/osfile_shared_front.jsm",
|
||||
"resource://gre/modules/osfile/osfile_win_front.jsm"
|
||||
"resource://gre/modules/osfile/osfile_win_back.js",
|
||||
"resource://gre/modules/osfile/osfile_shared_front.js",
|
||||
"resource://gre/modules/osfile/osfile_win_front.js"
|
||||
);
|
||||
} else {
|
||||
importScripts(
|
||||
"resource://gre/modules/osfile/osfile_unix_back.jsm",
|
||||
"resource://gre/modules/osfile/osfile_shared_front.jsm",
|
||||
"resource://gre/modules/osfile/osfile_unix_front.jsm"
|
||||
"resource://gre/modules/osfile/osfile_unix_back.js",
|
||||
"resource://gre/modules/osfile/osfile_shared_front.js",
|
||||
"resource://gre/modules/osfile/osfile_unix_front.js"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче