diff options
author | bors-servo <release+servo@mozilla.com> | 2014-05-30 13:16:09 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-05-30 13:16:09 -0400 |
commit | da896b8299620ad31bcdc84d931ecdcb3efd6979 (patch) | |
tree | 69befa39099f9e3f40d894847464a4f12ca854b2 /src/components/script/dom/bindings/codegen/CodegenRust.py | |
parent | 39e3c64ead997b3a8c6be6e188aad27fcbe3220b (diff) | |
parent | 106627e6eb1bba39216cfc88dffe2b6f0f4b95e4 (diff) | |
download | servo-da896b8299620ad31bcdc84d931ecdcb3efd6979.tar.gz servo-da896b8299620ad31bcdc84d931ecdcb3efd6979.zip |
auto merge of #2515 : saneyuki/servo/raw, r=jdm
Fix #2511
@jdm r?
Diffstat (limited to 'src/components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | src/components/script/dom/bindings/codegen/CodegenRust.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/components/script/dom/bindings/codegen/CodegenRust.py b/src/components/script/dom/bindings/codegen/CodegenRust.py index fb66afa5a42..76b775b35a6 100644 --- a/src/components/script/dom/bindings/codegen/CodegenRust.py +++ b/src/components/script/dom/bindings/codegen/CodegenRust.py @@ -1757,7 +1757,7 @@ class CGAbstractMethod(CGThing): assert(False) # Override me! def CreateBindingJSObject(descriptor, parent=None): - create = " let mut raw: JS<%s> = JS::from_raw(&mut *aObject);\n" % descriptor.concreteType + create = " let mut raw: JS<%s> = JS::from_raw(&*aObject);\n" % descriptor.concreteType if descriptor.proxy: assert not descriptor.createGlobal create += """ @@ -2435,7 +2435,7 @@ class CGSpecializedMethod(CGAbstractExternMethod): self.method = method name = method.identifier.name args = [Argument('*mut JSContext', 'cx'), Argument('JSHandleObject', '_obj'), - Argument('*mut %s' % descriptor.concreteType, 'this'), + Argument('*%s' % descriptor.concreteType, 'this'), Argument('libc::c_uint', 'argc'), Argument('*mut JSVal', 'vp')] CGAbstractExternMethod.__init__(self, descriptor, name, 'JSBool', args) @@ -2480,7 +2480,7 @@ class CGSpecializedGetter(CGAbstractExternMethod): name = 'get_' + attr.identifier.name args = [ Argument('*mut JSContext', 'cx'), Argument('JSHandleObject', '_obj'), - Argument('*mut %s' % descriptor.concreteType, 'this'), + Argument('*%s' % descriptor.concreteType, 'this'), Argument('*mut JSVal', 'vp') ] CGAbstractExternMethod.__init__(self, descriptor, name, "JSBool", args) @@ -2536,7 +2536,7 @@ class CGSpecializedSetter(CGAbstractExternMethod): name = 'set_' + attr.identifier.name args = [ Argument('*mut JSContext', 'cx'), Argument('JSHandleObject', '_obj'), - Argument('*mut %s' % descriptor.concreteType, 'this'), + Argument('*%s' % descriptor.concreteType, 'this'), Argument('*mut JSVal', 'argv')] CGAbstractExternMethod.__init__(self, descriptor, name, "JSBool", args) @@ -3448,14 +3448,14 @@ class CGProxyNamedSetter(CGProxySpecialOperation): class CGProxyUnwrap(CGAbstractMethod): def __init__(self, descriptor): args = [Argument('*mut JSObject', 'obj')] - CGAbstractMethod.__init__(self, descriptor, "UnwrapProxy", '*mut ' + descriptor.concreteType, args, alwaysInline=True) + CGAbstractMethod.__init__(self, descriptor, "UnwrapProxy", '*' + descriptor.concreteType, args, alwaysInline=True) def definition_body(self): return """ /*if (xpc::WrapperFactory::IsXrayWrapper(obj)) { obj = js::UnwrapObject(obj); }*/ //MOZ_ASSERT(IsProxy(obj)); - let box_: *mut %s = cast::transmute(GetProxyPrivate(obj).to_private()); + let box_ = GetProxyPrivate(obj).to_private() as *%s; return box_;""" % (self.descriptor.concreteType) class CGDOMJSProxyHandler_getOwnPropertyDescriptor(CGAbstractExternMethod): @@ -3781,7 +3781,7 @@ class CGAbstractClassHook(CGAbstractExternMethod): def definition_body_prologue(self): return """ - let this: *mut %s = unwrap::<%s>(obj); + let this: *%s = unwrap::<%s>(obj); """ % (self.descriptor.concreteType, self.descriptor.concreteType) def definition_body(self): |