diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-01-17 15:57:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-17 15:57:30 -0500 |
commit | fb95f9df9cab44afd66eae809af164637bd8f00a (patch) | |
tree | 45ab882b624d2ae2d3fdb017405b3f74989de683 /components/script/dom/bindings/codegen/CodegenRust.py | |
parent | 866fd55ded6ded98b49862a29951d746a7846f64 (diff) | |
parent | 367014a4ea5b3fff5e4f33df199db0fdb7a95925 (diff) | |
download | servo-fb95f9df9cab44afd66eae809af164637bd8f00a.tar.gz servo-fb95f9df9cab44afd66eae809af164637bd8f00a.zip |
Auto merge of #22353 - jdm:runtime-parent, r=nox
Update rust-mozjs
These changes adjust our uses of the rust-mozjs APIs to accommodate the changes in https://github.com/servo/rust-mozjs/pull/450.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #22342.
- [x] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22353)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/bindings/codegen/CodegenRust.py')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index e82beb913bc..e7399d66307 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -2592,7 +2592,7 @@ class CGConstructorEnabled(CGAbstractMethod): return CGList((CGGeneric(cond) for cond in conditions), " &&\n") -def CreateBindingJSObject(descriptor, parent=None): +def CreateBindingJSObject(descriptor): assert not descriptor.isGlobal() create = "let raw = Box::into_raw(object);\nlet _rt = RootedTraceable::new(&*raw);\n" if descriptor.proxy: @@ -2601,12 +2601,11 @@ let handler = RegisterBindings::PROXY_HANDLERS[PrototypeList::Proxies::%s as usi rooted!(in(cx) let private = PrivateValue(raw as *const libc::c_void)); let obj = NewProxyObject(cx, handler, Handle::from_raw(UndefinedHandleValue), - proto.get(), %s.get(), - ptr::null_mut(), ptr::null_mut()); + proto.get()); assert!(!obj.is_null()); SetProxyReservedSlot(obj, 0, &private.get()); rooted!(in(cx) let obj = obj);\ -""" % (descriptor.name, parent) +""" % (descriptor.name) else: create += ("rooted!(in(cx) let obj = JS_NewObjectWithGivenProto(\n" " cx, &Class.base as *const JSClass, proto.handle()));\n" @@ -2699,7 +2698,7 @@ class CGWrapMethod(CGAbstractMethod): def definition_body(self): unforgeable = CopyUnforgeablePropertiesToInstance(self.descriptor) - create = CreateBindingJSObject(self.descriptor, "scope") + create = CreateBindingJSObject(self.descriptor) return CGGeneric("""\ let scope = scope.reflector().get_jsobject(); assert!(!scope.get().is_null()); |