Add ConvertJSValueTo*String functions that just take a value and hand out a string, without extra complications

This commit is contained in:
JustOff 2019-03-13 20:07:10 +02:00 • committed by Roy Tam
commit e234612456
3 changed files with 34 additions and 8 deletions

View file

@ -5560,7 +5560,7 @@ def getJSToNativeConversionInfo(type, descriptorProvider, failureCode=None,
def getConversionCode(varName):
normalizeCode = ""
if type.isUSVString():
normalizeCode = "NormalizeUSVString(cx, %s);\n" % varName
normalizeCode = "NormalizeUSVString(%s);\n" % varName
conversionCode = fill("""
if (!ConvertJSValueToString(cx, $${val}, ${nullBehavior}, ${undefinedBehavior}, ${varName})) {