mirror of
https://github.com/servo/servo.git
synced 2025-06-12 02:14:41 +00:00
Use 'exceptionCode' when converting to DOMString.
This change allows us to use the code even in cases where we return a Result type rather than a JSBool. Interface, primitive and union types already get this right.
This commit is contained in:
parent
58efe0bf75
commit
8e596d142e
1 changed files with 2 additions and 2 deletions
|
@ -670,8 +670,8 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
|
|||
conversionCode = (
|
||||
"match FromJSValConvertible::from_jsval(cx, ${val}, %s) {\n"
|
||||
" Ok(strval) => ${declName} = %s,\n"
|
||||
" Err(_) => return 0,\n"
|
||||
"}" % (nullBehavior, strval))
|
||||
" Err(_) => { %s },\n"
|
||||
"}" % (nullBehavior, strval, exceptionCode))
|
||||
|
||||
if defaultValue is None:
|
||||
return conversionCode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue