mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-21 20:03:08 +09:00
Fix a crash in IndexedDB.
This commit is contained in:
parent
f40a82f098
commit
cfc50f18c4
10 changed files with 102 additions and 39 deletions
|
|
@ -2010,6 +2010,28 @@ JS_GetOwnUCPropertyDescriptor(JSContext* cx, HandleObject obj, const char16_t* n
|
|||
return JS_GetOwnPropertyDescriptorById(cx, obj, id, desc);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(bool)
|
||||
JS_GetOwnElement(JSContext* cx, JS::HandleObject obj, uint32_t index, JS::MutableHandleValue vp)
|
||||
{
|
||||
RootedId id(cx);
|
||||
if (!IndexToId(cx, index, &id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Rooted<PropertyDescriptor> desc(cx);
|
||||
if (!JS_GetOwnPropertyDescriptorById(cx, obj, id, &desc)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (desc.object() && desc.isDataDescriptor()) {
|
||||
vp.set(desc.value());
|
||||
} else {
|
||||
vp.setUndefined();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(bool)
|
||||
JS_GetPropertyDescriptorById(JSContext* cx, HandleObject obj, HandleId id,
|
||||
MutableHandle<PropertyDescriptor> desc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue