aboutsummaryrefslogtreecommitdiffstats
path: root/components/script
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-01-03 16:29:49 -0800
committerManish Goregaokar <manishsmail@gmail.com>2019-01-04 15:05:07 -0800
commit611dc4bc70bf654ab52d9d88f29247c82b142c22 (patch)
tree7bc93e672a4d62ca7ab4eb28b2de68f3faeb9064 /components/script
parent6df1c6d7e71794fda5dd7c49c538baa27bdcb1cb (diff)
downloadservo-611dc4bc70bf654ab52d9d88f29247c82b142c22.tar.gz
servo-611dc4bc70bf654ab52d9d88f29247c82b142c22.zip
Remove now-unnecessary must_root and allow(unrooted_must_root) annotations
Diffstat (limited to 'components/script')
-rw-r--r--components/script/dom/audiocontext.rs2
-rw-r--r--components/script/dom/baseaudiocontext.rs5
-rw-r--r--components/script/dom/bindings/refcounted.rs1
-rw-r--r--components/script/dom/bluetooth.rs3
-rw-r--r--components/script/dom/bluetoothdevice.rs1
-rw-r--r--components/script/dom/bluetoothremotegattcharacteristic.rs6
-rw-r--r--components/script/dom/bluetoothremotegattdescriptor.rs2
-rw-r--r--components/script/dom/bluetoothremotegattserver.rs3
-rw-r--r--components/script/dom/bluetoothremotegattservice.rs4
-rw-r--r--components/script/dom/customelementregistry.rs1
-rw-r--r--components/script/dom/document.rs3
-rw-r--r--components/script/dom/element.rs1
-rw-r--r--components/script/dom/htmlmediaelement.rs3
-rw-r--r--components/script/dom/navigationpreloadmanager.rs4
-rw-r--r--components/script/dom/navigator.rs1
-rw-r--r--components/script/dom/offlineaudiocontext.rs1
-rw-r--r--components/script/dom/permissions.rs4
-rw-r--r--components/script/dom/promise.rs2
-rw-r--r--components/script/dom/promiserejectionevent.rs1
-rw-r--r--components/script/dom/request.rs5
-rw-r--r--components/script/dom/response.rs5
-rw-r--r--components/script/dom/serviceworkercontainer.rs2
-rw-r--r--components/script/dom/testbinding.rs2
-rw-r--r--components/script/dom/testworklet.rs1
-rw-r--r--components/script/dom/vrdisplay.rs2
-rw-r--r--components/script/dom/window.rs1
-rw-r--r--components/script/dom/worklet.rs1
-rw-r--r--components/script/dom/xr.rs2
28 files changed, 2 insertions, 67 deletions
diff --git a/components/script/dom/audiocontext.rs b/components/script/dom/audiocontext.rs
index fbe6b5e34f5..0d980a8f729 100644
--- a/components/script/dom/audiocontext.rs
+++ b/components/script/dom/audiocontext.rs
@@ -107,7 +107,6 @@ impl AudioContextMethods for AudioContext {
}
// https://webaudio.github.io/web-audio-api/#dom-audiocontext-suspend
- #[allow(unrooted_must_root)]
fn Suspend(&self) -> Rc<Promise> {
// Step 1.
let promise = Promise::new(&self.global());
@@ -169,7 +168,6 @@ impl AudioContextMethods for AudioContext {
}
// https://webaudio.github.io/web-audio-api/#dom-audiocontext-close
- #[allow(unrooted_must_root)]
fn Close(&self) -> Rc<Promise> {
// Step 1.
let promise = Promise::new(&self.global());
diff --git a/components/script/dom/baseaudiocontext.rs b/components/script/dom/baseaudiocontext.rs
index 2417de5435c..697b152ee69 100644
--- a/components/script/dom/baseaudiocontext.rs
+++ b/components/script/dom/baseaudiocontext.rs
@@ -62,7 +62,6 @@ pub enum BaseAudioContextOptions {
OfflineAudioContext(OfflineAudioContextOptions),
}
-#[must_root]
#[derive(JSTraceable)]
struct DecodeResolver {
pub promise: Rc<Promise>,
@@ -147,7 +146,6 @@ impl BaseAudioContext {
self.state.get() == AudioContextState::Suspended
}
- #[allow(unrooted_must_root)]
fn push_pending_resume_promise(&self, promise: &Rc<Promise>) {
self.pending_resume_promises
.borrow_mut()
@@ -164,7 +162,6 @@ impl BaseAudioContext {
/// Each call to this method must be followed by a call to
/// `fulfill_in_flight_resume_promises`, to actually fulfill the promises
/// which were taken and moved to the in-flight queue.
- #[allow(unrooted_must_root)]
fn take_pending_resume_promises(&self, result: ErrorResult) {
let pending_resume_promises =
mem::replace(&mut *self.pending_resume_promises.borrow_mut(), vec![]);
@@ -271,7 +268,6 @@ impl BaseAudioContextMethods for BaseAudioContext {
}
/// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-resume
- #[allow(unrooted_must_root)]
fn Resume(&self) -> Rc<Promise> {
// Step 1.
let promise = Promise::new(&self.global());
@@ -397,7 +393,6 @@ impl BaseAudioContextMethods for BaseAudioContext {
}
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-decodeaudiodata
- #[allow(unrooted_must_root)]
fn DecodeAudioData(
&self,
audio_data: CustomAutoRooterGuard<ArrayBuffer>,
diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs
index f6d1e3a700c..8636f910121 100644
--- a/components/script/dom/bindings/refcounted.rs
+++ b/components/script/dom/bindings/refcounted.rs
@@ -91,7 +91,6 @@ impl TrustedPromise {
/// Obtain a usable DOM Promise from a pinned `TrustedPromise` value. Fails if used on
/// a different thread than the original value from which this `TrustedPromise` was
/// obtained.
- #[allow(unrooted_must_root)]
pub fn root(self) -> Rc<Promise> {
LIVE_REFERENCES.with(|ref r| {
let r = r.borrow();
diff --git a/components/script/dom/bluetooth.rs b/components/script/dom/bluetooth.rs
index 0e96e8488b5..4b541d4b60a 100644
--- a/components/script/dom/bluetooth.rs
+++ b/components/script/dom/bluetooth.rs
@@ -277,7 +277,6 @@ pub fn response_async<T: AsyncBluetoothListener + DomObject + 'static>(
action_sender
}
-#[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#getgattchildren
pub fn get_gatt_children<T, F>(
attribute: &T,
@@ -530,7 +529,6 @@ impl From<BluetoothError> for Error {
}
impl BluetoothMethods for Bluetooth {
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetooth-requestdevice
fn RequestDevice(&self, option: &RequestDeviceOptions) -> Rc<Promise> {
let p = Promise::new(&self.global());
@@ -549,7 +547,6 @@ impl BluetoothMethods for Bluetooth {
return p;
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetooth-getavailability
fn GetAvailability(&self) -> Rc<Promise> {
let p = Promise::new(&self.global());
diff --git a/components/script/dom/bluetoothdevice.rs b/components/script/dom/bluetoothdevice.rs
index 10d351232bc..8e65b1b6723 100644
--- a/components/script/dom/bluetoothdevice.rs
+++ b/components/script/dom/bluetoothdevice.rs
@@ -276,7 +276,6 @@ impl BluetoothDeviceMethods for BluetoothDevice {
None
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothdevice-watchadvertisements
fn WatchAdvertisements(&self) -> Rc<Promise> {
let p = Promise::new(&self.global());
diff --git a/components/script/dom/bluetoothremotegattcharacteristic.rs b/components/script/dom/bluetoothremotegattcharacteristic.rs
index 6c2e1f012d3..7e355749811 100644
--- a/components/script/dom/bluetoothremotegattcharacteristic.rs
+++ b/components/script/dom/bluetoothremotegattcharacteristic.rs
@@ -102,7 +102,6 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
self.uuid.clone()
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-getdescriptor
fn GetDescriptor(&self, descriptor: BluetoothDescriptorUUID) -> Rc<Promise> {
get_gatt_children(
@@ -116,7 +115,6 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
)
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-getdescriptors
fn GetDescriptors(&self, descriptor: Option<BluetoothDescriptorUUID>) -> Rc<Promise> {
get_gatt_children(
@@ -135,7 +133,6 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
self.value.borrow().clone()
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-readvalue
fn ReadValue(&self) -> Rc<Promise> {
let p = Promise::new(&self.global());
@@ -169,7 +166,6 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
return p;
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-writevalue
fn WriteValue(&self, value: ArrayBufferViewOrArrayBuffer) -> Rc<Promise> {
let p = Promise::new(&self.global());
@@ -221,7 +217,6 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
return p;
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-startnotifications
fn StartNotifications(&self) -> Rc<Promise> {
let p = Promise::new(&self.global());
@@ -259,7 +254,6 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
return p;
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-stopnotifications
fn StopNotifications(&self) -> Rc<Promise> {
let p = Promise::new(&self.global());
diff --git a/components/script/dom/bluetoothremotegattdescriptor.rs b/components/script/dom/bluetoothremotegattdescriptor.rs
index 83482a77c90..983ee355de4 100644
--- a/components/script/dom/bluetoothremotegattdescriptor.rs
+++ b/components/script/dom/bluetoothremotegattdescriptor.rs
@@ -92,7 +92,6 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
self.value.borrow().clone()
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-readvalue
fn ReadValue(&self) -> Rc<Promise> {
let p = Promise::new(&self.global());
@@ -125,7 +124,6 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
return p;
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattdescriptor-writevalue
fn WriteValue(&self, value: ArrayBufferViewOrArrayBuffer) -> Rc<Promise> {
let p = Promise::new(&self.global());
diff --git a/components/script/dom/bluetoothremotegattserver.rs b/components/script/dom/bluetoothremotegattserver.rs
index c0ebeef0955..62810f04091 100644
--- a/components/script/dom/bluetoothremotegattserver.rs
+++ b/components/script/dom/bluetoothremotegattserver.rs
@@ -68,7 +68,6 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
self.connected.get()
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-connect
fn Connect(&self) -> Rc<Promise> {
// Step 1.
@@ -109,7 +108,6 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
self.Device().garbage_collect_the_connection()
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-getprimaryservice
fn GetPrimaryService(&self, service: BluetoothServiceUUID) -> Rc<Promise> {
// Step 1 - 2.
@@ -124,7 +122,6 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
)
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattserver-getprimaryservices
fn GetPrimaryServices(&self, service: Option<BluetoothServiceUUID>) -> Rc<Promise> {
// Step 1 - 2.
diff --git a/components/script/dom/bluetoothremotegattservice.rs b/components/script/dom/bluetoothremotegattservice.rs
index adcf30c7645..20bd96ebf24 100644
--- a/components/script/dom/bluetoothremotegattservice.rs
+++ b/components/script/dom/bluetoothremotegattservice.rs
@@ -82,7 +82,6 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
self.uuid.clone()
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-getcharacteristic
fn GetCharacteristic(&self, characteristic: BluetoothCharacteristicUUID) -> Rc<Promise> {
get_gatt_children(
@@ -96,7 +95,6 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
)
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-getcharacteristics
fn GetCharacteristics(
&self,
@@ -113,7 +111,6 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
)
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-getincludedservice
fn GetIncludedService(&self, service: BluetoothServiceUUID) -> Rc<Promise> {
get_gatt_children(
@@ -127,7 +124,6 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
)
}
- #[allow(unrooted_must_root)]
// https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattservice-getincludedservices
fn GetIncludedServices(&self, service: Option<BluetoothServiceUUID>) -> Rc<Promise> {
get_gatt_children(
diff --git a/components/script/dom/customelementregistry.rs b/components/script/dom/customelementregistry.rs
index 8fe88ba8f94..4080731a534 100644
--- a/components/script/dom/customelementregistry.rs
+++ b/components/script/dom/customelementregistry.rs
@@ -399,7 +399,6 @@ impl CustomElementRegistryMethods for CustomElementRegistry {
}
/// <https://html.spec.whatwg.org/multipage/#dom-customelementregistry-whendefined>
- #[allow(unrooted_must_root)]
fn WhenDefined(&self, name: DOMString) -> Rc<Promise> {
let global_scope = self.window.upcast::<GlobalScope>();
let name = LocalName::from(&*name);
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs
index 48e43f80590..f5132d1de29 100644
--- a/components/script/dom/document.rs
+++ b/components/script/dom/document.rs
@@ -3139,7 +3139,6 @@ impl Document {
}
// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
- #[allow(unrooted_must_root)]
pub fn enter_fullscreen(&self, pending: &Element) -> Rc<Promise> {
// Step 1
let promise = Promise::new(self.global().r());
@@ -3198,7 +3197,6 @@ impl Document {
}
// https://fullscreen.spec.whatwg.org/#exit-fullscreen
- #[allow(unrooted_must_root)]
pub fn exit_fullscreen(&self) -> Rc<Promise> {
let global = self.global();
// Step 1
@@ -4561,7 +4559,6 @@ impl DocumentMethods for Document {
self.fullscreen_element.get()
}
- #[allow(unrooted_must_root)]
// https://fullscreen.spec.whatwg.org/#dom-document-exitfullscreen
fn ExitFullscreen(&self) -> Rc<Promise> {
self.exit_fullscreen()
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index 4cff642f57f..91cc8939590 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -2565,7 +2565,6 @@ impl ElementMethods for Element {
}
// https://fullscreen.spec.whatwg.org/#dom-element-requestfullscreen
- #[allow(unrooted_must_root)]
fn RequestFullscreen(&self) -> Rc<Promise> {
let doc = document_from_node(self);
doc.enter_fullscreen(self)
diff --git a/components/script/dom/htmlmediaelement.rs b/components/script/dom/htmlmediaelement.rs
index 62a24fffede..0bb5dffe9f0 100644
--- a/components/script/dom/htmlmediaelement.rs
+++ b/components/script/dom/htmlmediaelement.rs
@@ -1022,7 +1022,6 @@ impl HTMLMediaElement {
}
/// Appends a promise to the list of pending play promises.
- #[allow(unrooted_must_root)]
fn push_pending_play_promise(&self, promise: &Rc<Promise>) {
self.pending_play_promises
.borrow_mut()
@@ -1039,7 +1038,6 @@ impl HTMLMediaElement {
/// Each call to this method must be followed by a call to
/// `fulfill_in_flight_play_promises`, to actually fulfill the promises
/// which were taken and moved to the in-flight queue.
- #[allow(unrooted_must_root)]
fn take_pending_play_promises(&self, result: ErrorResult) {
let pending_play_promises =
mem::replace(&mut *self.pending_play_promises.borrow_mut(), vec![]);
@@ -1375,7 +1373,6 @@ impl HTMLMediaElementMethods for HTMLMediaElement {
}
// https://html.spec.whatwg.org/multipage/#dom-media-play
- #[allow(unrooted_must_root)]
fn Play(&self) -> Rc<Promise> {
let promise = Promise::new(&self.global());
self.play(&promise);
diff --git a/components/script/dom/navigationpreloadmanager.rs b/components/script/dom/navigationpreloadmanager.rs
index f955f6af9eb..5eca51a5226 100644
--- a/components/script/dom/navigationpreloadmanager.rs
+++ b/components/script/dom/navigationpreloadmanager.rs
@@ -42,7 +42,6 @@ impl NavigationPreloadManager {
}
impl NavigationPreloadManagerMethods for NavigationPreloadManager {
- #[allow(unrooted_must_root)]
// https://w3c.github.io/ServiceWorker/#navigation-preload-manager-enable
fn Enable(&self) -> Rc<Promise> {
let promise = Promise::new(&*self.global());
@@ -65,7 +64,6 @@ impl NavigationPreloadManagerMethods for NavigationPreloadManager {
promise
}
- #[allow(unrooted_must_root)]
// https://w3c.github.io/ServiceWorker/#navigation-preload-manager-disable
fn Disable(&self) -> Rc<Promise> {
let promise = Promise::new(&*self.global());
@@ -88,7 +86,6 @@ impl NavigationPreloadManagerMethods for NavigationPreloadManager {
promise
}
- #[allow(unrooted_must_root)]
// https://w3c.github.io/ServiceWorker/#navigation-preload-manager-setheadervalue
fn SetHeaderValue(&self, value: ByteString) -> Rc<Promise> {
let promise = Promise::new(&*self.global());
@@ -111,7 +108,6 @@ impl NavigationPreloadManagerMethods for NavigationPreloadManager {
promise
}
- #[allow(unrooted_must_root)]
// https://w3c.github.io/ServiceWorker/#navigation-preload-manager-getstate
fn GetState(&self) -> Rc<Promise> {
let promise = Promise::new(&*self.global());
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs
index aa49701709a..1d60759f1d7 100644
--- a/components/script/dom/navigator.rs
+++ b/components/script/dom/navigator.rs
@@ -147,7 +147,6 @@ impl NavigatorMethods for Navigator {
}
// https://w3c.github.io/webvr/spec/1.1/#navigator-getvrdisplays-attribute
- #[allow(unrooted_must_root)]
fn GetVRDisplays(&self) -> Rc<Promise> {
let promise = Promise::new(&self.global());
let displays = self.Xr().get_displays();
diff --git a/components/script/dom/offlineaudiocontext.rs b/components/script/dom/offlineaudiocontext.rs
index f77d26efeb8..b17b0ff73d8 100644
--- a/components/script/dom/offlineaudiocontext.rs
+++ b/components/script/dom/offlineaudiocontext.rs
@@ -113,7 +113,6 @@ impl OfflineAudioContextMethods for OfflineAudioContext {
}
// https://webaudio.github.io/web-audio-api/#dom-offlineaudiocontext-startrendering
- #[allow(unrooted_must_root)]
fn StartRendering(&self) -> Rc<Promise> {
let promise = Promise::new(&self.global());
if self.rendering_started.get() {
diff --git a/components/script/dom/permissions.rs b/components/script/dom/permissions.rs
index dfd52e1b503..713e48425e4 100644
--- a/components/script/dom/permissions.rs
+++ b/components/script/dom/permissions.rs
@@ -84,7 +84,6 @@ impl Permissions {
)
}
- #[allow(unrooted_must_root)]
// https://w3c.github.io/permissions/#dom-permissions-query
// https://w3c.github.io/permissions/#dom-permissions-request
// https://w3c.github.io/permissions/#dom-permissions-revoke
@@ -197,21 +196,18 @@ impl Permissions {
}
impl PermissionsMethods for Permissions {
- #[allow(unrooted_must_root)]
#[allow(unsafe_code)]
// https://w3c.github.io/permissions/#dom-permissions-query
unsafe fn Query(&self, cx: *mut JSContext, permissionDesc: *mut JSObject) -> Rc<Promise> {
self.manipulate(Operation::Query, cx, permissionDesc, None)
}
- #[allow(unrooted_must_root)]
#[allow(unsafe_code)]
// https://w3c.github.io/permissions/#dom-permissions-request
unsafe fn Request(&self, cx: *mut JSContext, permissionDesc: *mut JSObject) -> Rc<Promise> {
self.manipulate(Operation::Request, cx, permissionDesc, None)
}
- #[allow(unrooted_must_root)]
#[allow(unsafe_code)]
// https://w3c.github.io/permissions/#dom-permissions-revoke
unsafe fn Revoke(&self, cx: *mut JSContext, permissionDesc: *mut JSObject) -> Rc<Promise> {
diff --git a/components/script/dom/promise.rs b/components/script/dom/promise.rs
index 1de065f992e..734c440f414 100644
--- a/components/script/dom/promise.rs
+++ b/components/script/dom/promise.rs
@@ -89,7 +89,7 @@ impl Promise {
}
}
- #[allow(unsafe_code, unrooted_must_root)]
+ #[allow(unsafe_code)]
pub fn duplicate(&self) -> Rc<Promise> {
let cx = self.global().get_cx();
unsafe { Promise::new_with_js_promise(self.reflector().get_jsobject(), cx) }
diff --git a/components/script/dom/promiserejectionevent.rs b/components/script/dom/promiserejectionevent.rs
index c224d8f77e8..4d69b63f564 100644
--- a/components/script/dom/promiserejectionevent.rs
+++ b/components/script/dom/promiserejectionevent.rs
@@ -95,7 +95,6 @@ impl PromiseRejectionEvent {
}
impl PromiseRejectionEventMethods for PromiseRejectionEvent {
- #[allow(unrooted_must_root)]
// https://html.spec.whatwg.org/multipage/#dom-promiserejectionevent-promise
fn Promise(&self) -> Rc<Promise> {
self.promise.clone()
diff --git a/components/script/dom/request.rs b/components/script/dom/request.rs
index 4a7ae2482a4..647845d6835 100644
--- a/components/script/dom/request.rs
+++ b/components/script/dom/request.rs
@@ -620,31 +620,26 @@ impl RequestMethods for Request {
Request::clone_from(self)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-text
fn Text(&self) -> Rc<Promise> {
consume_body(self, BodyType::Text)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-blob
fn Blob(&self) -> Rc<Promise> {
consume_body(self, BodyType::Blob)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-formdata
fn FormData(&self) -> Rc<Promise> {
consume_body(self, BodyType::FormData)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-json
fn Json(&self) -> Rc<Promise> {
consume_body(self, BodyType::Json)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-arraybuffer
fn ArrayBuffer(&self) -> Rc<Promise> {
consume_body(self, BodyType::ArrayBuffer)
diff --git a/components/script/dom/response.rs b/components/script/dom/response.rs
index fb010258c39..7dfa24439fc 100644
--- a/components/script/dom/response.rs
+++ b/components/script/dom/response.rs
@@ -362,31 +362,26 @@ impl ResponseMethods for Response {
self.body_used.get()
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-text
fn Text(&self) -> Rc<Promise> {
consume_body(self, BodyType::Text)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-blob
fn Blob(&self) -> Rc<Promise> {
consume_body(self, BodyType::Blob)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-formdata
fn FormData(&self) -> Rc<Promise> {
consume_body(self, BodyType::FormData)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-json
fn Json(&self) -> Rc<Promise> {
consume_body(self, BodyType::Json)
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#dom-body-arraybuffer
fn ArrayBuffer(&self) -> Rc<Promise> {
consume_body(self, BodyType::ArrayBuffer)
diff --git a/components/script/dom/serviceworkercontainer.rs b/components/script/dom/serviceworkercontainer.rs
index c44d140d88b..9ddd5a37922 100644
--- a/components/script/dom/serviceworkercontainer.rs
+++ b/components/script/dom/serviceworkercontainer.rs
@@ -51,9 +51,9 @@ impl ServiceWorkerContainerMethods for ServiceWorkerContainer {
self.client.get_controller()
}
+ #[allow(unrooted_must_root)] // Job is unrooted
/// https://w3c.github.io/ServiceWorker/#service-worker-container-register-method and - A
/// https://w3c.github.io/ServiceWorker/#start-register-algorithm - B
- #[allow(unrooted_must_root)] // Job is unrooted
fn Register(&self, script_url: USVString, options: &RegistrationOptions) -> Rc<Promise> {
// A: Step 1
let promise = Promise::new(&*self.global());
diff --git a/components/script/dom/testbinding.rs b/components/script/dom/testbinding.rs
index 26408cb80b9..14b607d790d 100644
--- a/components/script/dom/testbinding.rs
+++ b/components/script/dom/testbinding.rs
@@ -1006,7 +1006,6 @@ impl TestBindingMethods for TestBinding {
);
}
- #[allow(unrooted_must_root)]
fn PromiseNativeHandler(
&self,
resolve: Option<Rc<SimpleCallback>>,
@@ -1041,7 +1040,6 @@ impl TestBindingMethods for TestBinding {
}
}
- #[allow(unrooted_must_root)]
fn PromiseAttribute(&self) -> Rc<Promise> {
Promise::new(&self.global())
}
diff --git a/components/script/dom/testworklet.rs b/components/script/dom/testworklet.rs
index a30c4658ac1..849ee8272ff 100644
--- a/components/script/dom/testworklet.rs
+++ b/components/script/dom/testworklet.rs
@@ -51,7 +51,6 @@ impl TestWorklet {
}
impl TestWorkletMethods for TestWorklet {
- #[allow(unrooted_must_root)]
fn AddModule(&self, moduleURL: USVString, options: &WorkletOptions) -> Rc<Promise> {
self.worklet.AddModule(moduleURL, options)
}
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs
index 048157a0ba7..896bd0d4f81 100644
--- a/components/script/dom/vrdisplay.rs
+++ b/components/script/dom/vrdisplay.rs
@@ -307,7 +307,6 @@ impl VRDisplayMethods for VRDisplay {
}
}
- #[allow(unrooted_must_root)]
// https://w3c.github.io/webvr/#dom-vrdisplay-requestpresent
fn RequestPresent(&self, layers: Vec<VRLayer>) -> Rc<Promise> {
let promise = Promise::new(&self.global());
@@ -380,7 +379,6 @@ impl VRDisplayMethods for VRDisplay {
promise
}
- #[allow(unrooted_must_root)]
// https://w3c.github.io/webvr/#dom-vrdisplay-exitpresent
fn ExitPresent(&self) -> Rc<Promise> {
let promise = Promise::new(&self.global());
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index ee637e39ebf..2993a95456a 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -1138,7 +1138,6 @@ impl WindowMethods for Window {
mql
}
- #[allow(unrooted_must_root)]
// https://fetch.spec.whatwg.org/#fetch-method
fn Fetch(
&self,
diff --git a/components/script/dom/worklet.rs b/components/script/dom/worklet.rs
index 691a3275499..ac17d99d3aa 100644
--- a/components/script/dom/worklet.rs
+++ b/components/script/dom/worklet.rs
@@ -109,7 +109,6 @@ impl Worklet {
}
impl WorkletMethods for Worklet {
- #[allow(unrooted_must_root)]
/// <https://drafts.css-houdini.org/worklets/#dom-worklet-addmodule>
fn AddModule(&self, module_url: USVString, options: &WorkletOptions) -> Rc<Promise> {
// Step 1.
diff --git a/components/script/dom/xr.rs b/components/script/dom/xr.rs
index 98d018eb0f9..dae63a4baca 100644
--- a/components/script/dom/xr.rs
+++ b/components/script/dom/xr.rs
@@ -57,7 +57,6 @@ impl Drop for XR {
}
impl XRMethods for XR {
- #[allow(unrooted_must_root)]
/// https://immersive-web.github.io/webxr/#dom-xr-supportssessionmode
fn SupportsSessionMode(&self, mode: XRSessionMode) -> Rc<Promise> {
// XXXManishearth this should select an XR device first
@@ -72,7 +71,6 @@ impl XRMethods for XR {
promise
}
- #[allow(unrooted_must_root)]
/// https://immersive-web.github.io/webxr/#dom-xr-requestsession
fn RequestSession(&self, options: &XRSessionCreationOptions) -> Rc<Promise> {
let promise = Promise::new(&self.global());