summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_runtimedata.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-16 21:35:06 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-16 21:35:06 +0000
commit98b356a36bc9291a4f222d092afeeea0d5b5f379 (patch)
tree71fbda3964df30ef354afd36e3a9aba32978f762 /fxjs/cfxjse_runtimedata.cpp
parent31781107f6bda92e732fed805f62e8512bc78149 (diff)
downloadpdfium-98b356a36bc9291a4f222d092afeeea0d5b5f379.tar.xz
Use UnownedPtr<> to v8::Isolates.
Isolates are long-lived, but this may catch a few things. Introduce CFX_V8IsolateDeleter for unique_ptr<v8::Isolate> 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 <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_runtimedata.cpp')
-rw-r--r--fxjs/cfxjse_runtimedata.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fxjs/cfxjse_runtimedata.cpp b/fxjs/cfxjse_runtimedata.cpp
index 540bcb084e..9db172dacd 100644
--- a/fxjs/cfxjse_runtimedata.cpp
+++ b/fxjs/cfxjse_runtimedata.cpp
@@ -11,15 +11,13 @@
#include "fxjs/cfxjs_engine.h"
#include "fxjs/cfxjse_isolatetracker.h"
-CFXJSE_RuntimeData::CFXJSE_RuntimeData(v8::Isolate* pIsolate)
- : m_pIsolate(pIsolate) {}
+CFXJSE_RuntimeData::CFXJSE_RuntimeData() = default;
-CFXJSE_RuntimeData::~CFXJSE_RuntimeData() {}
+CFXJSE_RuntimeData::~CFXJSE_RuntimeData() = default;
std::unique_ptr<CFXJSE_RuntimeData> CFXJSE_RuntimeData::Create(
v8::Isolate* pIsolate) {
- std::unique_ptr<CFXJSE_RuntimeData> pRuntimeData(
- new CFXJSE_RuntimeData(pIsolate));
+ std::unique_ptr<CFXJSE_RuntimeData> pRuntimeData(new CFXJSE_RuntimeData());
CFXJSE_ScopeUtil_IsolateHandle scope(pIsolate);
v8::Local<v8::FunctionTemplate> hFuncTemplate =