diff options
Diffstat (limited to 'dom/workers/loader/WorkerModuleLoader.cpp')
-rw-r--r-- | dom/workers/loader/WorkerModuleLoader.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dom/workers/loader/WorkerModuleLoader.cpp b/dom/workers/loader/WorkerModuleLoader.cpp index da340c89bd..d76c61c31f 100644 --- a/dom/workers/loader/WorkerModuleLoader.cpp +++ b/dom/workers/loader/WorkerModuleLoader.cpp @@ -147,6 +147,15 @@ already_AddRefed<ModuleLoadRequest> WorkerModuleLoader::CreateDynamicImport( return request.forget(); } +bool WorkerModuleLoader::IsDynamicImportSupported() { + WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate(); + if (workerPrivate->IsServiceWorker()) { + return false; + } + + return true; +} + bool WorkerModuleLoader::CanStartLoad(ModuleLoadRequest* aRequest, nsresult* aRvOut) { return true; |