зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1198982: Don't fail the SW load for an importScripts failure. r=bkelly
This commit is contained in:
Родитель
f64a2b8739
Коммит
517ebc93c6
|
@ -1727,7 +1727,10 @@ ScriptExecutorRunnable::WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
|
|||
if (NS_FAILED(loadInfo.mLoadResult)) {
|
||||
scriptloader::ReportLoadError(aCx, loadInfo.mURL, loadInfo.mLoadResult,
|
||||
false);
|
||||
aWorkerPrivate->MaybeDispatchLoadFailedRunnable();
|
||||
// Top level scripts only!
|
||||
if (mIsWorkerScript) {
|
||||
aWorkerPrivate->MaybeDispatchLoadFailedRunnable();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,12 @@ function callByScript() {
|
|||
importScripts(['importscript.sjs']);
|
||||
importScripts(['importscript.sjs']);
|
||||
|
||||
try {
|
||||
importScripts(['there-is-nothing-here.js']);
|
||||
} catch (ex) {
|
||||
// Importing a non-existent script should not abort the SW load, bug 1198982.
|
||||
}
|
||||
|
||||
onmessage = function(e) {
|
||||
self.clients.matchAll().then(function(res) {
|
||||
if (!res.length) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче