From c72a5cdf8478d6086b6ed2f6bc2067c173c3a7a5 Mon Sep 17 00:00:00 2001 From: "bent.mozilla@gmail.com" Date: Sun, 23 Sep 2007 23:09:56 -0700 Subject: [PATCH] Bug 397311 - Need a JSAutoRequest in xpcJSWeakReference::Init. r=brendan, sr+a=jst. --- js/src/xpconnect/src/xpcJSWeakReference.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/src/xpconnect/src/xpcJSWeakReference.cpp b/js/src/xpconnect/src/xpcJSWeakReference.cpp index 887555aaf8b..175308308c7 100755 --- a/js/src/xpconnect/src/xpcJSWeakReference.cpp +++ b/js/src/xpconnect/src/xpcJSWeakReference.cpp @@ -68,6 +68,8 @@ nsresult xpcJSWeakReference::Init() rv = cc->GetArgvPtr(&argv); NS_ENSURE_SUCCESS(rv, rv); + JSAutoRequest ar(cx); + if (JSVAL_IS_NULL(argv[0])) return NS_ERROR_FAILURE; JSObject *obj;