mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
Use CGIndenter for CGProxyUnwrap.definition_body.
This commit is contained in:
parent
5affa73aa1
commit
df552fca5d
1 changed files with 6 additions and 6 deletions
|
@ -3394,12 +3394,12 @@ class CGProxyUnwrap(CGAbstractMethod):
|
|||
CGAbstractMethod.__init__(self, descriptor, "UnwrapProxy", '*' + descriptor.concreteType, args, alwaysInline=True)
|
||||
|
||||
def definition_body(self):
|
||||
return CGGeneric(""" /*if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
|
||||
obj = js::UnwrapObject(obj);
|
||||
}*/
|
||||
//MOZ_ASSERT(IsProxy(obj));
|
||||
let box_ = GetProxyPrivate(obj).to_private() as *%s;
|
||||
return box_;""" % self.descriptor.concreteType)
|
||||
return CGIndenter(CGGeneric("""/*if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
|
||||
obj = js::UnwrapObject(obj);
|
||||
}*/
|
||||
//MOZ_ASSERT(IsProxy(obj));
|
||||
let box_ = GetProxyPrivate(obj).to_private() as *%s;
|
||||
return box_;""" % self.descriptor.concreteType))
|
||||
|
||||
class CGDOMJSProxyHandler_getOwnPropertyDescriptor(CGAbstractExternMethod):
|
||||
def __init__(self, descriptor):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue