mirror of
https://github.com/servo/servo.git
synced 2025-08-04 05:00:08 +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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue