make structured clone an enum

This commit is contained in:
Rahul Sharma 2016-09-07 11:25:03 +05:30
parent 9dcb7348a2
commit 314dedb96f
6 changed files with 51 additions and 56 deletions

View file

@ -95,10 +95,9 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer {
return Err(Error::Type("Scope URL contains forbidden characters".to_owned()));
}
let scope_str = scope.as_str().to_owned();
let worker_registration = ServiceWorkerRegistration::new(self.global().r(),
script_url,
scope_str.clone(),
scope.clone(),
self);
ScriptThread::set_registration(scope, &*worker_registration, self.global().r().pipeline());
Ok(worker_registration)