From df552fca5d685da57aa5b8824fb02ece4c3928f5 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Sat, 21 Jun 2014 13:57:54 +0200 Subject: [PATCH] Use CGIndenter for CGProxyUnwrap.definition_body. --- .../script/dom/bindings/codegen/CodegenRust.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py index 07c9366b0c6..7adadce6d14 100644 --- a/src/components/script/dom/bindings/codegen/CodegenRust.py +++ b/src/components/script/dom/bindings/codegen/CodegenRust.py @@ -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):