mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 18:26:15 +00:00
Bug 794091 - Reorganize OS.File importScripts to avoid talos hangs. r=froydnj
This commit is contained in:
parent
a17e1d1673
commit
fa73294e7c
@ -10,9 +10,26 @@ if (typeof Components != "undefined") {
|
|||||||
this.EXPORTED_SYMBOLS = ["OS"];
|
this.EXPORTED_SYMBOLS = ["OS"];
|
||||||
Components.utils.import("resource://gre/modules/osfile/osfile_async_front.jsm", this);
|
Components.utils.import("resource://gre/modules/osfile/osfile_async_front.jsm", this);
|
||||||
} else {
|
} else {
|
||||||
|
// At this stage, we need to import all sources at once to avoid
|
||||||
|
// a unique failure on tbpl + talos that seems caused by a
|
||||||
|
// what looks like a nested event loop bug (see bug 794091).
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
importScripts("resource://gre/modules/osfile/osfile_win_front.jsm");
|
importScripts(
|
||||||
|
"resource://gre/modules/osfile/osfile_shared_allthreads.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_win_allthreads.jsm",
|
||||||
|
"resource://gre/modules/osfile/ospath_win_back.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_win_back.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_shared_front.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_win_front.jsm"
|
||||||
|
);
|
||||||
#else
|
#else
|
||||||
importScripts("resource://gre/modules/osfile/osfile_unix_front.jsm");
|
importScripts(
|
||||||
|
"resource://gre/modules/osfile/osfile_shared_allthreads.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_unix_allthreads.jsm",
|
||||||
|
"resource://gre/modules/osfile/ospath_unix_back.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_unix_back.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_shared_front.jsm",
|
||||||
|
"resource://gre/modules/osfile/osfile_unix_front.jsm"
|
||||||
|
);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
@ -22,9 +22,6 @@ if (typeof Components != "undefined") {
|
|||||||
this.EXPORTED_SYMBOLS = ["OS"];
|
this.EXPORTED_SYMBOLS = ["OS"];
|
||||||
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
||||||
Components.utils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", this);
|
Components.utils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", this);
|
||||||
} else {
|
|
||||||
// File is included from a chrome worker
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(function(exports) {
|
(function(exports) {
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
throw new Error("osfile_unix_back.jsm cannot be used from the main thread yet");
|
throw new Error("osfile_unix_back.jsm cannot be used from the main thread yet");
|
||||||
}
|
}
|
||||||
importScripts("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_unix_allthreads.jsm");
|
|
||||||
(function(exports) {
|
(function(exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
if (!exports.OS) {
|
if (!exports.OS) {
|
||||||
|
@ -16,9 +16,6 @@
|
|||||||
|
|
||||||
throw new Error("osfile_unix_front.jsm cannot be used from the main thread yet");
|
throw new Error("osfile_unix_front.jsm cannot be used from the main thread yet");
|
||||||
}
|
}
|
||||||
importScripts("resource://gre/modules/osfile/osfile_unix_back.jsm");
|
|
||||||
importScripts("resource://gre/modules/osfile/ospath_unix_back.jsm");
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_shared_front.jsm");
|
|
||||||
(function(exports) {
|
(function(exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -22,9 +22,6 @@ if (typeof Components != "undefined") {
|
|||||||
this.EXPORTED_SYMBOLS = ["OS"];
|
this.EXPORTED_SYMBOLS = ["OS"];
|
||||||
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
Components.utils.import("resource://gre/modules/ctypes.jsm");
|
||||||
Components.utils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", this);
|
Components.utils.import("resource://gre/modules/osfile/osfile_shared_allthreads.jsm", this);
|
||||||
} else {
|
|
||||||
// File is included from a chrome worker
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(function(exports) {
|
(function(exports) {
|
||||||
|
@ -28,8 +28,6 @@
|
|||||||
|
|
||||||
throw new Error("osfile_win.jsm cannot be used from the main thread yet");
|
throw new Error("osfile_win.jsm cannot be used from the main thread yet");
|
||||||
}
|
}
|
||||||
importScripts("resource://gre/modules/osfile/osfile_shared_allthreads.jsm");
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_win_allthreads.jsm");
|
|
||||||
|
|
||||||
(function(exports) {
|
(function(exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
@ -16,10 +16,6 @@
|
|||||||
throw new Error("osfile_win_front.jsm cannot be used from the main thread yet");
|
throw new Error("osfile_win_front.jsm cannot be used from the main thread yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_win_back.jsm");
|
|
||||||
importScripts("resource://gre/modules/osfile/ospath_win_back.jsm");
|
|
||||||
importScripts("resource://gre/modules/osfile/osfile_shared_front.jsm");
|
|
||||||
|
|
||||||
(function(exports) {
|
(function(exports) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user