From 98b356a36bc9291a4f222d092afeeea0d5b5f379 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 16 Jul 2018 21:35:06 +0000 Subject: Use UnownedPtr<> to v8::Isolates. Isolates are long-lived, but this may catch a few things. Introduce CFX_V8IsolateDeleter for unique_ptr usage. Fix Dispose()/SetIsolate(nullptr) ordering in cjs_runtime.cpp Remove one unused isolate member. Flip protected -> private in one place. Change-Id: I26cdd120f799192e93b0d9d04dcde8f348dc21f3 Reviewed-on: https://pdfium-review.googlesource.com/37931 Reviewed-by: Lei Zhang Commit-Queue: Tom Sepez --- fxjs/cfxjse_runtimedata.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fxjs/cfxjse_runtimedata.h') diff --git a/fxjs/cfxjse_runtimedata.h b/fxjs/cfxjse_runtimedata.h index 292fe26ae3..fd4cbd7c4e 100644 --- a/fxjs/cfxjse_runtimedata.h +++ b/fxjs/cfxjse_runtimedata.h @@ -9,6 +9,7 @@ #include +#include "core/fxcrt/unowned_ptr.h" #include "v8/include/v8.h" class CFXJSE_RuntimeList; @@ -19,12 +20,11 @@ class CFXJSE_RuntimeData { static CFXJSE_RuntimeData* Get(v8::Isolate* pIsolate); - v8::Isolate* m_pIsolate; v8::Global m_hRootContextGlobalTemplate; v8::Global m_hRootContext; protected: - explicit CFXJSE_RuntimeData(v8::Isolate* pIsolate); + CFXJSE_RuntimeData(); static std::unique_ptr Create(v8::Isolate* pIsolate); -- cgit v1.2.3