From 82999fa9d685638561efc6df2c8370c7e7f47676 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 16 Jul 2018 22:17:46 +0000 Subject: Make JSGetObject() return UnownedPtr. This a convenient place to assert that the callback that is about to be invoked on the object doesn't destroy the object at any point during its execution. Change-Id: Iacb9d4e01603cc6bf316b00fdd062955c903ca5c Reviewed-on: https://pdfium-review.googlesource.com/37970 Commit-Queue: Tom Sepez Reviewed-by: Lei Zhang --- fxjs/cjs_runtime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fxjs/cjs_runtime.cpp') diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp index 634c48be74..9329a483f4 100644 --- a/fxjs/cjs_runtime.cpp +++ b/fxjs/cjs_runtime.cpp @@ -162,7 +162,7 @@ void CJS_Runtime::SetFormFillEnvToDocument() { if (pThis.IsEmpty()) return; - CJS_Document* pJSDocument = JSGetObject(pThis); + auto pJSDocument = JSGetObject(pThis); if (!pJSDocument) return; -- cgit v1.2.3