mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 872043. Add an API for getting the canonical Array.prototype for a global. r=waldo
This commit is contained in:
parent
365dc4222a
commit
90921b63a0
@ -2242,6 +2242,14 @@ JS_GetFunctionPrototype(JSContext *cx, JSObject *forObj)
|
||||
return forObj->global().getOrCreateFunctionPrototype(cx);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetArrayPrototype(JSContext *cx, JSObject *forObj)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
assertSameCompartment(cx, forObj);
|
||||
return forObj->global().getOrCreateArrayPrototype(cx);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetGlobalForObject(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
|
@ -2159,6 +2159,13 @@ JS_GetFunctionPrototype(JSContext *cx, JSObject *forObj);
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetObjectPrototype(JSContext *cx, JSObject *forObj);
|
||||
|
||||
/*
|
||||
* Returns the original value of |Array.prototype| from the global object in
|
||||
* which |forObj| was created.
|
||||
*/
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetArrayPrototype(JSContext *cx, JSObject *forObj);
|
||||
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetGlobalForObject(JSContext *cx, JSObject *obj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user