mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement Blob URL's DOM interfaces
This commit is contained in:
parent
5a0c98afb2
commit
4d3379392d
17 changed files with 146 additions and 97 deletions
|
@ -147,7 +147,10 @@ impl WorkerMethods for Worker {
|
|||
fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
|
||||
let data = try!(StructuredCloneData::write(cx, message));
|
||||
let address = Trusted::new(self);
|
||||
self.sender.send((address, WorkerScriptMsg::DOMMessage(data))).unwrap();
|
||||
|
||||
// NOTE: step 9 of https://html.spec.whatwg.org/multipage/#dom-messageport-postmessage
|
||||
// indicates that a nonexistent communication channel should result in a silent error.
|
||||
let _ = self.sender.send((address, WorkerScriptMsg::DOMMessage(data)));
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue