From 0e3c54c1911ba2c3bf305ee04f04fcd9bf2fc2fe Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 25 Sep 2017 23:30:24 +0200 Subject: Rename dom::bindings::js to dom::bindings::root --- components/script/dom/xmlhttprequestupload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index 02a54001388..e390caa5a05 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -3,8 +3,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; -use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; +use dom::bindings::root::Root; use dom::globalscope::GlobalScope; use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget; use dom_struct::dom_struct; -- cgit v1.2.3 From f87c2a8d7616112ca924e30292db2d244cf87eec Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 26 Sep 2017 01:53:40 +0200 Subject: Rename Root to DomRoot In a later PR, DomRoot will become a type alias of Root>, where Root will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned. --- components/script/dom/xmlhttprequestupload.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index e390caa5a05..7c6a1a4f513 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -4,7 +4,7 @@ use dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; use dom::bindings::reflector::reflect_dom_object; -use dom::bindings::root::Root; +use dom::bindings::root::DomRoot; use dom::globalscope::GlobalScope; use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget; use dom_struct::dom_struct; @@ -20,7 +20,7 @@ impl XMLHttpRequestUpload { eventtarget: XMLHttpRequestEventTarget::new_inherited(), } } - pub fn new(global: &GlobalScope) -> Root { + pub fn new(global: &GlobalScope) -> DomRoot { reflect_dom_object(box XMLHttpRequestUpload::new_inherited(), global, XMLHttpRequestUploadBinding::Wrap) -- cgit v1.2.3 From aa15dc269f41503d81ad44cd7e85d69e6f4aeac7 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Mon, 16 Oct 2017 14:35:30 +0200 Subject: Remove use of unstable box syntax. http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl Box { #[inline(always)] pub fn new(x: T) -> Box { box x } } ``` With inlining, it should compile to the same as box syntax. --- components/script/dom/xmlhttprequestupload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index 7c6a1a4f513..83a7f1d0e77 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -21,7 +21,7 @@ impl XMLHttpRequestUpload { } } pub fn new(global: &GlobalScope) -> DomRoot { - reflect_dom_object(box XMLHttpRequestUpload::new_inherited(), + reflect_dom_object(Box::new(XMLHttpRequestUpload::new_inherited()), global, XMLHttpRequestUploadBinding::Wrap) } -- cgit v1.2.3 From c37a345dc9f4dda6ea29c42f96f6c7201c42cbac Mon Sep 17 00:00:00 2001 From: chansuke Date: Tue, 18 Sep 2018 23:24:15 +0900 Subject: Format script component --- components/script/dom/xmlhttprequestupload.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index 83a7f1d0e77..af377aa7eee 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -11,7 +11,7 @@ use dom_struct::dom_struct; #[dom_struct] pub struct XMLHttpRequestUpload { - eventtarget: XMLHttpRequestEventTarget + eventtarget: XMLHttpRequestEventTarget, } impl XMLHttpRequestUpload { @@ -21,8 +21,10 @@ impl XMLHttpRequestUpload { } } pub fn new(global: &GlobalScope) -> DomRoot { - reflect_dom_object(Box::new(XMLHttpRequestUpload::new_inherited()), - global, - XMLHttpRequestUploadBinding::Wrap) + reflect_dom_object( + Box::new(XMLHttpRequestUpload::new_inherited()), + global, + XMLHttpRequestUploadBinding::Wrap, + ) } } -- cgit v1.2.3 From 45f7199eee82c66637ec68287eafa40a651001c4 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 1 Nov 2018 23:45:06 +0100 Subject: `cargo fix --edition` --- components/script/dom/xmlhttprequestupload.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index af377aa7eee..53ef853a2cf 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -2,11 +2,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -use dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; -use dom::bindings::reflector::reflect_dom_object; -use dom::bindings::root::DomRoot; -use dom::globalscope::GlobalScope; -use dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget; +use crate::dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; +use crate::dom::bindings::reflector::reflect_dom_object; +use crate::dom::bindings::root::DomRoot; +use crate::dom::globalscope::GlobalScope; +use crate::dom::xmlhttprequesteventtarget::XMLHttpRequestEventTarget; use dom_struct::dom_struct; #[dom_struct] -- cgit v1.2.3 From a1a14459c141afc6ac6771b8a6c9ca374537edf2 Mon Sep 17 00:00:00 2001 From: Jan Andre Ikenmeyer Date: Mon, 19 Nov 2018 14:47:12 +0100 Subject: Update MPL license to https (part 3) --- components/script/dom/xmlhttprequestupload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index 53ef853a2cf..dba70490d21 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -1,6 +1,6 @@ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; use crate::dom::bindings::reflector::reflect_dom_object; -- cgit v1.2.3 From 3ea6d87bcc37167464e856949a4b9b77d0e9318a Mon Sep 17 00:00:00 2001 From: YUAN LYU Date: Fri, 20 Mar 2020 22:14:18 -0400 Subject: Add trait DomObjectWrap to provide WRAP function --- components/script/dom/xmlhttprequestupload.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'components/script/dom/xmlhttprequestupload.rs') diff --git a/components/script/dom/xmlhttprequestupload.rs b/components/script/dom/xmlhttprequestupload.rs index dba70490d21..7e7b5893395 100644 --- a/components/script/dom/xmlhttprequestupload.rs +++ b/components/script/dom/xmlhttprequestupload.rs @@ -2,7 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -use crate::dom::bindings::codegen::Bindings::XMLHttpRequestUploadBinding; use crate::dom::bindings::reflector::reflect_dom_object; use crate::dom::bindings::root::DomRoot; use crate::dom::globalscope::GlobalScope; @@ -21,10 +20,6 @@ impl XMLHttpRequestUpload { } } pub fn new(global: &GlobalScope) -> DomRoot { - reflect_dom_object( - Box::new(XMLHttpRequestUpload::new_inherited()), - global, - XMLHttpRequestUploadBinding::Wrap, - ) + reflect_dom_object(Box::new(XMLHttpRequestUpload::new_inherited()), global) } } -- cgit v1.2.3