diff options
author | marmeladema <xademax@gmail.com> | 2019-07-22 01:09:24 +0100 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-07-24 08:24:50 +0100 |
commit | 2c5d0a6ebc39ad263e2bbe623e357a11b4cec5aa (patch) | |
tree | c1c93f26ab047bb010d1781511a750a302cc5636 /components/script/dom/bindings/codegen | |
parent | 808fa65aef163879b82baddc4af0a5445f806c81 (diff) | |
download | servo-2c5d0a6ebc39ad263e2bbe623e357a11b4cec5aa.tar.gz servo-2c5d0a6ebc39ad263e2bbe623e357a11b4cec5aa.zip |
Convert CGTraitInterface to use safe JSContext instead of raw JSContext
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index 70da52b765e..343b8e6596d 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -3332,7 +3332,7 @@ class CGCallGenerator(CGThing): needsCx = needCx(returnType, (a for (a, _) in arguments), True) if "cx" not in argsPre and needsCx: - args.prepend(CGGeneric("*cx")) + args.prepend(CGGeneric("cx")) if nativeMethodName in descriptor.inCompartmentMethods: args.append(CGGeneric("InCompartment::in_compartment(&AlreadyInCompartment::assert_for_cx(*cx))")) @@ -5649,7 +5649,7 @@ class CGInterfaceTrait(CGThing): def attribute_arguments(needCx, argument=None, inCompartment=False): if needCx: - yield "cx", "*mut JSContext" + yield "cx", "SafeJSContext" if argument: yield "value", argument_type(descriptor, argument) @@ -6720,7 +6720,7 @@ def argument_type(descriptorProvider, ty, optional=False, defaultValue=None, var def method_arguments(descriptorProvider, returnType, arguments, passJSBits=True, trailing=None, inCompartment=False): if needCx(returnType, arguments, passJSBits): - yield "cx", "*mut JSContext" + yield "cx", "SafeJSContext" for argument in arguments: ty = argument_type(descriptorProvider, argument.type, argument.optional, |