mirror of
https://github.com/servo/servo
synced 2026-04-30 11:27:28 +02:00
Fix invalid returned value for dictionary types
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user