mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
Add JS_GetObjectId, void cx->exception in JS_ClearPendingException (127418, r=shaver).
This commit is contained in:
parent
f96cd32219
commit
f5b40a54ca
@ -2058,6 +2058,13 @@ JS_GetConstructor(JSContext *cx, JSObject *proto)
|
||||
return JSVAL_TO_OBJECT(cval);
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSBool)
|
||||
JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp)
|
||||
{
|
||||
*idp = (jsid) obj;
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(JSObject *)
|
||||
JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent)
|
||||
{
|
||||
@ -4048,6 +4055,7 @@ JS_ClearPendingException(JSContext *cx)
|
||||
{
|
||||
#if JS_HAS_EXCEPTIONS
|
||||
cx->throwing = JS_FALSE;
|
||||
cx->exception = JSVAL_VOID;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -907,6 +907,14 @@ JS_SetParent(JSContext *cx, JSObject *obj, JSObject *parent);
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_GetConstructor(JSContext *cx, JSObject *proto);
|
||||
|
||||
/*
|
||||
* Get a unique identifier for obj, good for the lifetime of obj (even if it
|
||||
* is moved by a copying GC). Return false on failure (likely out of memory),
|
||||
* and true with *idp containing the unique id on success.
|
||||
*/
|
||||
extern JS_PUBLIC_API(JSBool)
|
||||
JS_GetObjectId(JSContext *cx, JSObject *obj, jsid *idp);
|
||||
|
||||
extern JS_PUBLIC_API(JSObject *)
|
||||
JS_NewObject(JSContext *cx, JSClass *clasp, JSObject *proto, JSObject *parent);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user