mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 818379. Make sure interface objects have a 'length' property even if they're not real function objects. r=peterv
This commit is contained in:
parent
b3a1d6f000
commit
a7a70f4dc6
@ -271,6 +271,11 @@ CreateInterfaceObject(JSContext* cx, JSObject* global,
|
||||
}
|
||||
js::SetFunctionNativeReserved(toStringObj, TOSTRING_NAME_RESERVED_SLOT,
|
||||
STRING_TO_JSVAL(str));
|
||||
|
||||
if (!JS_DefineProperty(cx, constructor, "length", JS::Int32Value(ctorNargs),
|
||||
nullptr, nullptr, JSPROP_READONLY | JSPROP_PERMANENT)) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (properties) {
|
||||
|
Loading…
Reference in New Issue
Block a user