summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_isolatetracker.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-01-23 00:43:09 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-23 00:43:09 +0000
commit4d4731c620ea1fa95c07f8855f84d28c78090119 (patch)
treee5ff43b53647bed28faf1e1abad2fd984b5aced4 /fxjs/cfxjse_isolatetracker.cpp
parentdd6cfdcbb5621df0ed297b2d5f31617abfd5a220 (diff)
downloadpdfium-4d4731c620ea1fa95c07f8855f84d28c78090119.tar.xz
Tidy fxjs/cfxjse_isolatetracker.h
Move constructors to .cpp file. Remove unused member and its accessor method. Remove unused system includes. IsolateHandleRootContext is-a IsolateHandle (not has-a). Change-Id: Ifcba44f3ea7ad963fee731c24b2e79c5a8124539 Reviewed-on: https://pdfium-review.googlesource.com/23171 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_isolatetracker.cpp')
-rw-r--r--fxjs/cfxjse_isolatetracker.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/fxjs/cfxjse_isolatetracker.cpp b/fxjs/cfxjse_isolatetracker.cpp
new file mode 100644
index 0000000000..2a66a74a8b
--- /dev/null
+++ b/fxjs/cfxjse_isolatetracker.cpp
@@ -0,0 +1,23 @@
+// Copyright 2018 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#include "fxjs/cfxjse_isolatetracker.h"
+
+CFXJSE_ScopeUtil_IsolateHandle::CFXJSE_ScopeUtil_IsolateHandle(
+ v8::Isolate* pIsolate)
+ : m_iscope(pIsolate), m_hscope(pIsolate) {}
+
+CFXJSE_ScopeUtil_IsolateHandle::~CFXJSE_ScopeUtil_IsolateHandle() = default;
+
+CFXJSE_ScopeUtil_IsolateHandleRootContext::
+ CFXJSE_ScopeUtil_IsolateHandleRootContext(v8::Isolate* pIsolate)
+ : CFXJSE_ScopeUtil_IsolateHandle(pIsolate),
+ m_cscope(v8::Local<v8::Context>::New(
+ pIsolate,
+ CFXJSE_RuntimeData::Get(pIsolate)->m_hRootContext)) {}
+
+CFXJSE_ScopeUtil_IsolateHandleRootContext::
+ ~CFXJSE_ScopeUtil_IsolateHandleRootContext() = default;