Make sure to hold on to our JS wrapper after wrapping it so it doesn't get

GC'ed out from under us.  Bug 307279, r=jst, sr=brendan
This commit is contained in:
bzbarsky%mit.edu 2005-09-07 03:12:10 +00:00
Родитель 877de009ae
Коммит 23e4e6f111
1 изменённых файлов: 4 добавлений и 1 удалений

Просмотреть файл

@ -131,7 +131,10 @@ public:
static nsresult WrapNative(JSContext *cx, JSObject *scope,
nsISupports *native, const nsIID& aIID,
jsval *vp);
jsval *vp,
// aHolder keeps the jsval alive while
// there's a ref to it
nsIXPConnectJSObjectHolder** aHolder);
static nsresult ThrowJSException(JSContext *cx, nsresult aResult);
static nsresult InitDOMJSClass(JSContext *cx, JSObject *obj);