mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1225392 part 1. Expose JSAPI for getting %IteratorPrototype%. r=efaust
This commit is contained in:
parent
590798cde2
commit
e7f84b2995
@ -1220,6 +1220,14 @@ JS_GetErrorPrototype(JSContext* cx)
|
||||
return GlobalObject::getOrCreateCustomErrorPrototype(cx, global, JSEXN_ERR);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject*)
|
||||
JS_GetIteratorPrototype(JSContext* cx)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
Rooted<GlobalObject*> global(cx, cx->global());
|
||||
return GlobalObject::getOrCreateIteratorPrototype(cx, global);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject*)
|
||||
JS_GetGlobalForObject(JSContext* cx, JSObject* obj)
|
||||
{
|
||||
|
@ -1503,6 +1503,13 @@ JS_GetArrayPrototype(JSContext* cx, JS::HandleObject forObj);
|
||||
extern JS_PUBLIC_API(JSObject*)
|
||||
JS_GetErrorPrototype(JSContext* cx);
|
||||
|
||||
/**
|
||||
* Returns the %IteratorPrototype% object that all built-in iterator prototype
|
||||
* chains go through for the global object of the current compartment of cx.
|
||||
*/
|
||||
extern JS_PUBLIC_API(JSObject*)
|
||||
JS_GetIteratorPrototype(JSContext* cx);
|
||||
|
||||
extern JS_PUBLIC_API(JSObject*)
|
||||
JS_GetGlobalForObject(JSContext* cx, JSObject* obj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user