Auto merge of #8986 - GuillaumeGomez:patch-2, r=nox

Fix invalid returned value for dictionary types

part of #8882

cc @nox

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8986)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-15 22:57:58 +05:30
commit 432087c0ea
2 changed files with 3 additions and 2 deletions

View file

@ -1016,8 +1016,8 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
declType = CGGeneric(typeName)
template = ("match %s::new(cx, ${val}) {\n"
" Ok(dictionary) => dictionary,\n"
" Err(_) => return false,\n"
"}" % typeName)
" Err(_) => { %s },\n"
"}" % (typeName, exceptionCode))
return handleOptional(template, declType, handleDefaultNull("%s::empty(cx)" % typeName))

View file

@ -28,6 +28,7 @@ dictionary TestDictionary {
Blob interfaceValue;
any anyValue;
object objectValue;
TestDictionaryDefaults dict;
};
dictionary TestDictionaryDefaults {