mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
script creates methods taking '*mut JSContext' unsafe
rebase + marked the necessary new code as unsafe
This commit is contained in:
parent
9fd6f0acd5
commit
b372e7c98f
28 changed files with 274 additions and 226 deletions
|
@ -80,8 +80,9 @@ impl ServiceWorkerMethods for ServiceWorker {
|
|||
USVString(self.script_url.borrow().clone())
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
// https://w3c.github.io/ServiceWorker/#service-worker-postmessage
|
||||
fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
|
||||
unsafe fn PostMessage(&self, cx: *mut JSContext, message: HandleValue) -> ErrorResult {
|
||||
// Step 1
|
||||
if let ServiceWorkerState::Redundant = self.state.get() {
|
||||
return Err(Error::InvalidState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue