mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 749535 - Part 3: Remove JS_Is*Array() from Paris Binding argument unwrapping. (r=bz)
This commit is contained in:
parent
4f1dd6602a
commit
a58ac0611e
@ -1972,19 +1972,13 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||
"arraybuffer views because making sure all the "
|
||||
"objects are properly rooted is hard")
|
||||
name = type.name
|
||||
if type.isArrayBuffer():
|
||||
jsname = "ArrayBufferObject"
|
||||
elif type.isArrayBufferView():
|
||||
jsname = "ArrayBufferViewObject"
|
||||
else:
|
||||
jsname = type.name
|
||||
|
||||
# By default, we use a Maybe<> to hold our typed array. And in the optional
|
||||
# non-nullable case we want to pass Optional<TypedArray> to consumers, not
|
||||
# Optional<NonNull<TypedArray> >, so jump though some hoops to do that.
|
||||
holderType = "Maybe<%s>" % name
|
||||
constructLoc = "${holderName}"
|
||||
constructMethod = "construct"
|
||||
constructInternal = "ref"
|
||||
if type.nullable():
|
||||
if isOptional:
|
||||
declType = "const Optional<" + name + "*>"
|
||||
@ -1997,15 +1991,16 @@ for (uint32_t i = 0; i < length; ++i) {
|
||||
holderType = None
|
||||
constructLoc = "(const_cast<Optional<" + name + ">& >(${declName}))"
|
||||
constructMethod = "Construct"
|
||||
constructInternal = "Value"
|
||||
else:
|
||||
declType = "NonNull<" + name + ">"
|
||||
template = (
|
||||
"if (!JS_Is%s(&${val}.toObject(), cx)) {\n"
|
||||
"%s.%s(cx, &${val}.toObject());\n"
|
||||
"if (!%s.%s().inited()) {\n"
|
||||
"%s" # No newline here because onFailure() handles that
|
||||
"}\n"
|
||||
"%s.%s(cx, &${val}.toObject());\n" %
|
||||
(jsname, CGIndenter(onFailure(failureCode, descriptorProvider.workers)).define(),
|
||||
constructLoc, constructMethod))
|
||||
"}\n" %
|
||||
(constructLoc, constructMethod, constructLoc, constructInternal,
|
||||
CGIndenter(onFailure(failureCode, descriptorProvider.workers)).define()))
|
||||
nullableTarget = ""
|
||||
if type.nullable():
|
||||
if isOptional:
|
||||
|
Loading…
Reference in New Issue
Block a user