Use CGIndenter for CGProxyUnwrap.definition_body.

This commit is contained in:
Ms2ger 2014-06-21 13:57:54 +02:00
parent 5affa73aa1
commit df552fca5d

View file

@ -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):