mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 997285 part 1. Add JS_GetErrorPrototype to JSAPI. r=jorendorff
This commit is contained in:
parent
7507eb3dea
commit
89c2ab2765
@ -1384,6 +1384,14 @@ JS_GetArrayPrototype(JSContext *cx, HandleObject forObj)
|
||||
return GlobalObject::getOrCreateArrayPrototype(cx, global);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetErrorPrototype(JSContext *cx)
|
||||
{
|
||||
CHECK_REQUEST(cx);
|
||||
Rooted<GlobalObject*> global(cx, cx->global());
|
||||
return GlobalObject::getOrCreateCustomErrorPrototype(cx, global, JSEXN_ERR);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_GetGlobalForObject(JSContext *cx, JSObject *obj)
|
||||
{
|
||||
|
@ -1826,6 +1826,13 @@ JS_GetObjectPrototype(JSContext *cx, JS::HandleObject forObj);
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetArrayPrototype(JSContext *cx, JS::HandleObject forObj);
|
||||
|
||||
/*
|
||||
* Returns the original value of |Error.prototype| from the global
|
||||
* object of the current compartment of cx.
|
||||
*/
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetErrorPrototype(JSContext *cx);
|
||||
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetGlobalForObject(JSContext *cx, JSObject *obj);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user