mirror of
https://github.com/servo/servo.git
synced 2025-07-26 00:30:22 +01:00
Rename CreateDOMGlobal to create_dom_global.
This commit is contained in:
parent
d0627a2592
commit
d752cdc44f
2 changed files with 4 additions and 3 deletions
|
@ -1811,7 +1811,7 @@ assert!(!obj.is_null());\
|
||||||
""" % (descriptor.name, parent)
|
""" % (descriptor.name, parent)
|
||||||
else:
|
else:
|
||||||
if descriptor.isGlobal():
|
if descriptor.isGlobal():
|
||||||
create += "let obj = CreateDOMGlobal(aCx, &Class.base as *const js::Class as *const JSClass);\n"
|
create += "let obj = create_dom_global(aCx, &Class.base as *const js::Class as *const JSClass);\n"
|
||||||
else:
|
else:
|
||||||
create += ("let obj = with_compartment(aCx, proto, || {\n"
|
create += ("let obj = with_compartment(aCx, proto, || {\n"
|
||||||
" JS_NewObject(aCx, &Class.base as *const js::Class as *const JSClass, &*proto, &*%s)\n"
|
" JS_NewObject(aCx, &Class.base as *const js::Class as *const JSClass, &*proto, &*%s)\n"
|
||||||
|
@ -4548,7 +4548,7 @@ class CGBindingRoot(CGThing):
|
||||||
'dom::bindings::js::{JS, JSRef, Root, RootedReference, Temporary}',
|
'dom::bindings::js::{JS, JSRef, Root, RootedReference, Temporary}',
|
||||||
'dom::bindings::js::{OptionalRootable, OptionalRootedRootable, ResultRootable}',
|
'dom::bindings::js::{OptionalRootable, OptionalRootedRootable, ResultRootable}',
|
||||||
'dom::bindings::js::{OptionalRootedReference, OptionalOptionalRootedRootable}',
|
'dom::bindings::js::{OptionalRootedReference, OptionalOptionalRootedRootable}',
|
||||||
'dom::bindings::utils::{CreateDOMGlobal, do_create_interface_objects}',
|
'dom::bindings::utils::{create_dom_global, do_create_interface_objects}',
|
||||||
'dom::bindings::utils::ConstantSpec',
|
'dom::bindings::utils::ConstantSpec',
|
||||||
'dom::bindings::utils::{DOMClass}',
|
'dom::bindings::utils::{DOMClass}',
|
||||||
'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}',
|
'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}',
|
||||||
|
|
|
@ -560,7 +560,8 @@ pub fn has_property_on_prototype(cx: *mut JSContext, proxy: *mut JSObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create a DOM global object with the given class.
|
/// Create a DOM global object with the given class.
|
||||||
pub fn CreateDOMGlobal(cx: *mut JSContext, class: *const JSClass) -> *mut JSObject {
|
pub fn create_dom_global(cx: *mut JSContext, class: *const JSClass)
|
||||||
|
-> *mut JSObject {
|
||||||
unsafe {
|
unsafe {
|
||||||
let obj = JS_NewGlobalObject(cx, class, ptr::null_mut());
|
let obj = JS_NewGlobalObject(cx, class, ptr::null_mut());
|
||||||
if obj.is_null() {
|
if obj.is_null() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue