From 2a7c72118f7894293c2d863797761074f7caa8ae Mon Sep 17 00:00:00 2001 From: Tooru Fujisawa Date: Tue, 18 Oct 2016 21:43:30 +0900 Subject: [PATCH] Bug 1306669 - Root an object that lives across ffi_call. r=jonco --- js/src/ctypes/CTypes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index 601a9eee1f1a..0facd0009e5b 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -8465,7 +8465,7 @@ CDataFinalizer::Methods::Dispose(JSContext* cx, unsigned argc, Value* vp) Value valType = JS_GetReservedSlot(obj, SLOT_DATAFINALIZER_VALTYPE); MOZ_ASSERT(valType.isObject()); - JSObject* objCTypes = CType::GetGlobalCTypes(cx, &valType.toObject()); + RootedObject objCTypes(cx, CType::GetGlobalCTypes(cx, &valType.toObject())); if (!objCTypes) return false;