mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Auto merge of #23309 - CYBAI:update-workers, r=nox
Support WorkerOptions for Worker I'd like to start working on updating SW related codes and I found it will have some algorithms related to module workers. And I found parts of the spec update is related to [fetch a module worker script graph](https://html.spec.whatwg.org/multipage/#fetch-a-module-worker-script-tree), maybe it's worth being a separate PR? --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix part of #23308 - [ ] There are tests for these changes OR - [ ] These changes do not require tests because ___ <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23309) <!-- Reviewable:end -->
This commit is contained in:
commit
965f57e3f8
11 changed files with 57 additions and 22 deletions
|
@ -7,6 +7,7 @@ use crate::dom::abstractworker::WorkerScriptMsg;
|
|||
use crate::dom::abstractworkerglobalscope::{run_worker_event_loop, WorkerEventLoopMethods};
|
||||
use crate::dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding;
|
||||
use crate::dom::bindings::codegen::Bindings::ServiceWorkerGlobalScopeBinding::ServiceWorkerGlobalScopeMethods;
|
||||
use crate::dom::bindings::codegen::Bindings::WorkerBinding::WorkerType;
|
||||
use crate::dom::bindings::inheritance::Castable;
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
use crate::dom::bindings::root::{DomRoot, RootCollection, ThreadLocalStackRoots};
|
||||
|
@ -203,6 +204,8 @@ impl ServiceWorkerGlobalScope {
|
|||
ServiceWorkerGlobalScope {
|
||||
workerglobalscope: WorkerGlobalScope::new_inherited(
|
||||
init,
|
||||
DOMString::new(),
|
||||
WorkerType::Classic, // FIXME(cybai): Should be provided from `Run Service Worker`
|
||||
worker_url,
|
||||
runtime,
|
||||
from_devtools_receiver,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue