WorkerId changed to type UUID.

This commit is contained in:
Kunal Mohan 2019-12-09 23:42:00 +05:30
parent 5c56e661ca
commit d5475fbc9f
No known key found for this signature in database
GPG key ID: 2B475A4524237BAC
9 changed files with 19 additions and 18 deletions

View file

@ -16,10 +16,12 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::navigationpreloadmanager::NavigationPreloadManager;
use crate::dom::serviceworker::ServiceWorker;
use crate::dom::workerglobalscope::prepare_workerscope_init;
use devtools_traits::WorkerId;
use dom_struct::dom_struct;
use script_traits::{ScopeThings, WorkerScriptLoadOrigin};
use servo_url::ServoUrl;
use std::cell::Cell;
use uuid::Uuid;
#[dom_struct]
pub struct ServiceWorkerRegistration {
@ -111,7 +113,7 @@ impl ServiceWorkerRegistration {
pipeline_id: Some(global.pipeline_id()),
};
let worker_id = global.get_next_worker_id();
let worker_id = WorkerId(Uuid::new_v4());
let devtools_chan = global.devtools_chan().cloned();
let init = prepare_workerscope_init(&global, None);
ScopeThings {