Skip to content

Commit

Permalink
Fixed codegen error regarding Uint8ClampedArray
Browse files Browse the repository at this point in the history
  • Loading branch information
ebalint committed Dec 16, 2014
1 parent fb5c1be commit 3036c8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 2 additions & 3 deletions components/script/dom/bindings/codegen/CodegenRust.py
Expand Up @@ -4020,8 +4020,7 @@ def members():
elif m.isAttr() and not m.isStatic():
name = CGSpecializedGetter.makeNativeName(descriptor, m)
infallible = 'infallible' in descriptor.getExtendedAttributes(m, getter=True)
needCx = typeNeedsCx(m.type)
yield name, attribute_arguments(needCx), return_type(descriptor, m.type, infallible)
yield name, attribute_arguments(typeNeedsCx(m.type, True)), return_type(descriptor, m.type, infallible)

if not m.readonly:
name = CGSpecializedSetter.makeNativeName(descriptor, m)
Expand All @@ -4030,7 +4029,7 @@ def members():
rettype = "()"
else:
rettype = "ErrorResult"
yield name, attribute_arguments(needCx, m.type), rettype
yield name, attribute_arguments(typeNeedsCx(m.type, False), m.type), rettype

if descriptor.proxy:
for name, operation in descriptor.operations.iteritems():
Expand Down
3 changes: 2 additions & 1 deletion components/script/dom/testbinding.rs
Expand Up @@ -17,7 +17,7 @@ use dom::bindings::utils::{Reflector, Reflectable};
use dom::blob::Blob;
use servo_util::str::DOMString;

use js::jsapi::JSContext;
use js::jsapi::{JSContext, JSObject};
use js::jsval::{JSVal, NullValue};

#[dom_struct]
Expand Down Expand Up @@ -64,6 +64,7 @@ impl<'a> TestBindingMethods for JSRef<'a, TestBinding> {
fn SetUnionAttribute(self, _: HTMLElementOrLong) {}
fn Union2Attribute(self) -> EventOrString { eString("".to_string()) }
fn SetUnion2Attribute(self, _: EventOrString) {}
fn ArrayAttribute(self, _: *mut JSContext) -> *mut JSObject { NullValue().to_object_or_null() }
fn AnyAttribute(self, _: *mut JSContext) -> JSVal { NullValue() }
fn SetAnyAttribute(self, _: *mut JSContext, _: JSVal) {}

Expand Down
1 change: 1 addition & 0 deletions components/script/dom/webidls/TestBinding.webidl
Expand Up @@ -71,6 +71,7 @@ interface TestBinding {
attribute Blob interfaceAttribute;
attribute (HTMLElement or long) unionAttribute;
attribute (Event or DOMString) union2Attribute;
readonly attribute Uint8ClampedArray arrayAttribute;
attribute any anyAttribute;

attribute boolean? booleanAttributeNullable;
Expand Down

5 comments on commit 3036c8d

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from Ms2ger
at ebalint@3036c8d

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging ebalint/servo/codegen = 3036c8d into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ebalint/servo/codegen = 3036c8d merged ok, testing candidate = 38a4e71

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 38a4e71

Please sign in to comment.