From 9bf1c97e9269816e93304c0a5df699cbaf35996c Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 6 Dec 2005 04:48:19 +0000 Subject: [PATCH] Make sure to keep memberval alive while we use it. Bug 318969, r=mrbkap, sr=jst --- js/src/xpconnect/src/XPCNativeWrapper.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/src/xpconnect/src/XPCNativeWrapper.cpp b/js/src/xpconnect/src/XPCNativeWrapper.cpp index 927a8e532d5..e041b8194e6 100644 --- a/js/src/xpconnect/src/XPCNativeWrapper.cpp +++ b/js/src/xpconnect/src/XPCNativeWrapper.cpp @@ -820,6 +820,9 @@ XPC_NW_NewResolve(JSContext *cx, JSObject *obj, jsval id, uintN flags, return ThrowException(NS_ERROR_XPC_BAD_CONVERT_JS, cx); } + // Make sure memberval doesn't go away while we mess with it. + AUTO_MARK_JSVAL(ccx, memberval); + JSString *str = JSVAL_TO_STRING(id); if (!str) { return ThrowException(NS_ERROR_UNEXPECTED, cx);