From 57e097750846bf3ffc3e4e2ef9e78be8a82c69de Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 5 Feb 2018 18:52:09 +0000 Subject: Use unique pointer in CFXJS_PerObjectData. Also use the actual type information, not void* and remove casts. Template function not required to wrap virtual dtors. Change-Id: I9397cae136c3c395a368a1ef0ce8162d9b586076 Reviewed-on: https://pdfium-review.googlesource.com/25290 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fxjs/JS_Define.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fxjs/JS_Define.cpp') diff --git a/fxjs/JS_Define.cpp b/fxjs/JS_Define.cpp index 171e05c66e..744cb7dd77 100644 --- a/fxjs/JS_Define.cpp +++ b/fxjs/JS_Define.cpp @@ -167,6 +167,10 @@ int DateFromTime(double t) { } // namespace +void JSDestructor(CFXJS_Engine* pEngine, v8::Local obj) { + pEngine->SetObjectPrivate(obj, nullptr); +} + double JS_GetDateTime() { if (!FSDK_IsSandBoxPolicyEnabled(FPDF_POLICY_MACHINETIME_ACCESS)) return 0; -- cgit v1.2.3