diff options
Diffstat (limited to 'components/script/dom/gpuvalidationerror.rs')
-rw-r--r-- | components/script/dom/gpuvalidationerror.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/components/script/dom/gpuvalidationerror.rs b/components/script/dom/gpuvalidationerror.rs index 4b0b6ec1627..e1456b510a6 100644 --- a/components/script/dom/gpuvalidationerror.rs +++ b/components/script/dom/gpuvalidationerror.rs @@ -3,11 +3,12 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ use crate::dom::bindings::codegen::Bindings::GPUValidationErrorBinding::GPUValidationErrorMethods; -use crate::dom::bindings::reflector::{reflect_dom_object, Reflector}; +use crate::dom::bindings::reflector::{reflect_dom_object2, Reflector}; use crate::dom::bindings::root::DomRoot; use crate::dom::bindings::str::DOMString; use crate::dom::globalscope::GlobalScope; use dom_struct::dom_struct; +use js::rust::HandleObject; #[dom_struct] pub struct GPUValidationError { @@ -24,13 +25,17 @@ impl GPUValidationError { } pub fn new(global: &GlobalScope, message: DOMString) -> DomRoot<Self> { - reflect_dom_object(Box::new(GPUValidationError::new_inherited(message)), global) + Self::new_with_proto(global, None, message) + } + + fn new_with_proto(global: &GlobalScope, proto: Option<HandleObject>, message: DOMString) -> DomRoot<Self> { + reflect_dom_object2(Box::new(GPUValidationError::new_inherited(message)), global, proto) } /// https://gpuweb.github.io/gpuweb/#dom-gpuvalidationerror-gpuvalidationerror #[allow(non_snake_case)] - pub fn Constructor(global: &GlobalScope, message: DOMString) -> DomRoot<Self> { - GPUValidationError::new(global, message) + pub fn Constructor(global: &GlobalScope, proto: Option<HandleObject>, message: DOMString) -> DomRoot<Self> { + GPUValidationError::new_with_proto(global, proto, message) } } |