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