mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Remove unused aTriedToWrap argument.
This commit is contained in:
parent
6db57e6f72
commit
25cae74093
18 changed files with 22 additions and 43 deletions
|
@ -2496,18 +2496,15 @@ class CGWrapWithCacheMethod(CGAbstractMethod):
|
||||||
def __init__(self, descriptor):
|
def __init__(self, descriptor):
|
||||||
assert descriptor.interface.hasInterfacePrototypeObject()
|
assert descriptor.interface.hasInterfacePrototypeObject()
|
||||||
args = [Argument('*JSContext', 'aCx'), Argument('*JSObject', 'aScope'),
|
args = [Argument('*JSContext', 'aCx'), Argument('*JSObject', 'aScope'),
|
||||||
Argument('@mut ' + descriptor.concreteType, 'aObject'),
|
Argument('@mut ' + descriptor.concreteType, 'aObject')]
|
||||||
Argument('*mut bool', 'aTriedToWrap')]
|
|
||||||
CGAbstractMethod.__init__(self, descriptor, 'Wrap_', '*JSObject', args)
|
CGAbstractMethod.__init__(self, descriptor, 'Wrap_', '*JSObject', args)
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
if self.descriptor.workers:
|
if self.descriptor.workers:
|
||||||
return """ *aTriedToWrap = true;
|
return """return aObject->GetJSObject();"""
|
||||||
return aObject->GetJSObject();"""
|
|
||||||
|
|
||||||
if not self.descriptor.createGlobal:
|
if not self.descriptor.createGlobal:
|
||||||
return """ *aTriedToWrap = true;
|
return """let mut parent = aObject.GetParentObject(aCx);
|
||||||
let mut parent = aObject.GetParentObject(aCx);
|
|
||||||
let parent = WrapNativeParent(aCx, aScope, parent);
|
let parent = WrapNativeParent(aCx, aScope, parent);
|
||||||
if parent.is_null() {
|
if parent.is_null() {
|
||||||
return ptr::null();
|
return ptr::null();
|
||||||
|
@ -2541,12 +2538,11 @@ class CGWrapMethod(CGAbstractMethod):
|
||||||
# XXX can we wrap if we don't have an interface prototype object?
|
# XXX can we wrap if we don't have an interface prototype object?
|
||||||
assert descriptor.interface.hasInterfacePrototypeObject()
|
assert descriptor.interface.hasInterfacePrototypeObject()
|
||||||
args = [Argument('*JSContext', 'aCx'), Argument('*JSObject', 'aScope'),
|
args = [Argument('*JSContext', 'aCx'), Argument('*JSObject', 'aScope'),
|
||||||
Argument('@mut ' + descriptor.concreteType, 'aObject'),
|
Argument('@mut ' + descriptor.concreteType, 'aObject')]
|
||||||
Argument('*mut bool', 'aTriedToWrap')]
|
|
||||||
CGAbstractMethod.__init__(self, descriptor, 'Wrap', '*JSObject', args, inline=True, pub=True)
|
CGAbstractMethod.__init__(self, descriptor, 'Wrap', '*JSObject', args, inline=True, pub=True)
|
||||||
|
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
return "return Wrap_(aCx, aScope, aObject, aTriedToWrap);"
|
return "return Wrap_(aCx, aScope, aObject);"
|
||||||
|
|
||||||
class CGWrapNonWrapperCacheMethod(CGAbstractMethod):
|
class CGWrapNonWrapperCacheMethod(CGAbstractMethod):
|
||||||
def __init__(self, descriptor):
|
def __init__(self, descriptor):
|
||||||
|
|
|
@ -20,8 +20,7 @@ impl Reflectable for DOMParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
DOMParserBinding::Wrap(cx, scope, self)
|
||||||
DOMParserBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,7 @@ macro_rules! generate_cacheable_wrapper_base(
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
$wrap(cx, scope, self)
|
||||||
$wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -30,8 +30,7 @@ impl Reflectable for Blob {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
BlobBinding::Wrap(cx, scope, self)
|
||||||
BlobBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,8 +69,7 @@ impl Reflectable for ClientRect {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
ClientRectBinding::Wrap(cx, scope, self)
|
||||||
ClientRectBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,7 @@ impl Reflectable for ClientRectList {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
ClientRectListBinding::Wrap(cx, scope, self)
|
||||||
ClientRectListBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -209,8 +209,7 @@ impl Reflectable for Document {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
DocumentBinding::Wrap(cx, scope, self)
|
||||||
DocumentBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,8 +120,7 @@ impl Reflectable for Event {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
EventBinding::Wrap(cx, scope, self)
|
||||||
EventBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,7 @@ impl Reflectable for EventTarget {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
EventTargetBinding::Wrap(cx, scope, self)
|
||||||
EventTargetBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,7 @@ impl Reflectable for FormData {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
FormDataBinding::Wrap(cx, scope, self)
|
||||||
FormDataBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,6 @@ impl Reflectable for HTMLCollection {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
HTMLCollectionBinding::Wrap(cx, scope, self)
|
||||||
HTMLCollectionBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -194,8 +194,7 @@ impl Reflectable for HTMLDocument {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
HTMLDocumentBinding::Wrap(cx, scope, self)
|
||||||
HTMLDocumentBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,8 +152,7 @@ impl Reflectable for MouseEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
MouseEventBinding::Wrap(cx, scope, self)
|
||||||
MouseEventBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,8 +95,7 @@ impl Reflectable for Navigator {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
NavigatorBinding::Wrap(cx, scope, self)
|
||||||
NavigatorBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,6 @@ impl Reflectable for NodeList {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
NodeListBinding::Wrap(cx, scope, self)
|
||||||
NodeListBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,8 +125,7 @@ impl Reflectable for UIEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
UIEventBinding::Wrap(cx, scope, self)
|
||||||
UIEventBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,7 @@ impl Reflectable for ValidityState {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
ValidityStateBinding::Wrap(cx, scope, self)
|
||||||
ValidityStateBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,8 +150,7 @@ impl Reflectable for Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
fn wrap_object_shared(@mut self, cx: *JSContext, scope: *JSObject) -> *JSObject {
|
||||||
let mut unused = false;
|
WindowBinding::Wrap(cx, scope, self)
|
||||||
WindowBinding::Wrap(cx, scope, self, &mut unused)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue