diff options
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 6 | ||||
-rw-r--r-- | components/script/dom/bindings/proxyhandler.rs | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 680fba1471b..db06ad603fb 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -2088,7 +2088,7 @@ class CGDefineProxyHandler(CGAbstractMethod): return CGAbstractMethod.define(self) def definition_body(self): - customDefineProperty = 'defineProperty_' + customDefineProperty = 'proxyhandler::define_property' if self.descriptor.operations['IndexedSetter'] or self.descriptor.operations['NamedSetter']: customDefineProperty = 'defineProperty' @@ -3764,7 +3764,7 @@ class CGDOMJSProxyHandler_defineProperty(CGAbstractExternMethod): " }\n" + " return true;\n" "}\n") % (self.descriptor.name) - return set + """return proxyhandler::defineProperty_(%s);""" % ", ".join(a.name for a in self.args) + return set + """return proxyhandler::define_property(%s);""" % ", ".join(a.name for a in self.args) def definition_body(self): return CGGeneric(self.getBody()) @@ -4580,7 +4580,7 @@ class CGBindingRoot(CGThing): 'dom::bindings::error::throw_dom_exception', 'dom::bindings::error::throw_type_error', 'dom::bindings::proxyhandler', - 'dom::bindings::proxyhandler::{_obj_toString, defineProperty_}', + 'dom::bindings::proxyhandler::{_obj_toString}', 'dom::bindings::proxyhandler::{FillPropertyDescriptor, GetExpandoObject}', 'dom::bindings::proxyhandler::{delete_, get_property_descriptor}', 'dom::bindings::proxyhandler::{getOwnPropertyNames_, enumerate_}', diff --git a/components/script/dom/bindings/proxyhandler.rs b/components/script/dom/bindings/proxyhandler.rs index fcf2de62aa4..186e2ef3591 100644 --- a/components/script/dom/bindings/proxyhandler.rs +++ b/components/script/dom/bindings/proxyhandler.rs @@ -55,8 +55,9 @@ pub unsafe extern fn get_property_descriptor(cx: *mut JSContext, } /// Defines an expando on the given `proxy`. -pub unsafe extern fn defineProperty_(cx: *mut JSContext, proxy: *mut JSObject, id: jsid, - desc: *mut JSPropertyDescriptor) -> bool { +pub unsafe extern fn define_property(cx: *mut JSContext, proxy: *mut JSObject, + id: jsid, desc: *mut JSPropertyDescriptor) + -> bool { static JSMSG_GETTER_ONLY: libc::c_uint = 160; //FIXME: Workaround for https://github.com/mozilla/rust/issues/13385 |