mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 767930. Add support for typed array return values (as just JSObject*) in WebIDL bindings. r=peterv
This commit is contained in:
parent
c8cd9213e7
commit
50289e9c67
@ -2670,7 +2670,7 @@ if (!%(resultStr)s) {
|
||||
# NB: setValue(..., True) calls JS_WrapValue(), so is fallible
|
||||
return (setValue(result, True), False)
|
||||
|
||||
if type.isObject():
|
||||
if type.isObject() or type.isSpiderMonkeyInterface():
|
||||
# See comments in WrapNewBindingObject explaining why we need
|
||||
# to wrap here.
|
||||
if type.nullable():
|
||||
@ -2794,7 +2794,7 @@ def getRetvalDeclarationForType(returnType, descriptorProvider,
|
||||
return CGGeneric("JSObject*"), False
|
||||
if returnType.tag() is IDLType.Tags.any:
|
||||
return CGGeneric("JS::Value"), False
|
||||
if returnType.isObject():
|
||||
if returnType.isObject() or returnType.isSpiderMonkeyInterface():
|
||||
return CGGeneric("JSObject*"), False
|
||||
if returnType.isSequence():
|
||||
nullable = returnType.nullable()
|
||||
|
@ -330,6 +330,7 @@ public:
|
||||
void PassUint8ClampedArray(Uint8ClampedArray&, ErrorResult&);
|
||||
void PassFloat32Array(Float32Array&, ErrorResult&);
|
||||
void PassFloat64Array(Float64Array&, ErrorResult&);
|
||||
JSObject* ReceiveUint8Array(ErrorResult&);
|
||||
|
||||
// String types
|
||||
void PassString(const nsAString&, ErrorResult&);
|
||||
|
@ -228,6 +228,7 @@ interface TestInterface {
|
||||
void passUint8ClampedArray(Uint8ClampedArray arg);
|
||||
void passFloat32Array(Float32Array arg);
|
||||
void passFloat64Array(Float64Array arg);
|
||||
Uint8Array receiveUint8Array();
|
||||
|
||||
// String types
|
||||
void passString(DOMString arg);
|
||||
|
Loading…
Reference in New Issue
Block a user