diff options
author | Peter <peter.hall@algomi.com> | 2016-02-28 00:33:11 +0000 |
---|---|---|
committer | Peter <peter.hall@algomi.com> | 2016-03-03 20:21:48 +0000 |
commit | 3e78b54d46fba83e2233e7087c196ee5097c320e (patch) | |
tree | 77aeae27afd024abb907a7dff70bf15b08cbdac9 /components/script/dom/bindings/codegen | |
parent | 875f1e92ccafebc8ddebc722f430e5037007b9dc (diff) | |
download | servo-3e78b54d46fba83e2233e7087c196ee5097c320e.tar.gz servo-3e78b54d46fba83e2233e7087c196ee5097c320e.zip |
Fixed compile error in generated code, when webidl constructors have same number of args
Edited test webidl to show issue, and fix
Diffstat (limited to 'components/script/dom/bindings/codegen')
-rw-r--r-- | components/script/dom/bindings/codegen/CodegenRust.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/script/dom/bindings/codegen/CodegenRust.py b/components/script/dom/bindings/codegen/CodegenRust.py index cefb3b23e15..a650cd17fd1 100644 --- a/components/script/dom/bindings/codegen/CodegenRust.py +++ b/components/script/dom/bindings/codegen/CodegenRust.py @@ -433,7 +433,7 @@ class CGMethodCall(CGThing): # XXXbz Now we're supposed to check for distinguishingArg being # an array or a platform object that supports indexed # properties... skip that last for now. It's a bit of a pain. - pickFirstSignature("%s.get().isObject() && IsArrayLike(cx, &%s.get().toObject())" % + pickFirstSignature("%s.get().is_object() && is_array_like(cx, %s)" % (distinguishingArg, distinguishingArg), lambda s: (s[1][distinguishingIndex].type.isArray() or @@ -442,7 +442,7 @@ class CGMethodCall(CGThing): # Check for Date objects # XXXbz Do we need to worry about security wrappers around the Date? - pickFirstSignature("%s.get().isObject() && JS_ObjectIsDate(cx, &%s.get().toObject())" % + pickFirstSignature("%s.get().is_object() && JS_ObjectIsDate(cx, &%s.get().to_object())" % (distinguishingArg, distinguishingArg), lambda s: (s[1][distinguishingIndex].type.isDate() or s[1][distinguishingIndex].type.isObject())) @@ -5391,7 +5391,8 @@ class CGBindingRoot(CGThing): 'dom::bindings::callback::{CallbackContainer,CallbackInterface,CallbackFunction}', 'dom::bindings::callback::{CallSetup,ExceptionHandling}', 'dom::bindings::callback::wrap_call_this_object', - 'dom::bindings::conversions::{ConversionBehavior, DOM_OBJECT_SLOT, IDLInterface}', + 'dom::bindings::conversions::{ConversionBehavior, DOM_OBJECT_SLOT}', + 'dom::bindings::conversions::{IDLInterface, is_array_like}', 'dom::bindings::conversions::{FromJSValConvertible, StringificationBehavior}', 'dom::bindings::conversions::{ToJSValConvertible, jsid_to_str, native_from_handlevalue}', 'dom::bindings::conversions::{native_from_object, private_from_object, root_from_object}', |