summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_isolatetracker.cpp
diff options
context:
space:
mode:
authordan sinclair <dsinclair@chromium.org>2017-12-04 15:42:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-04 15:42:15 +0000
commit53190d99102c9b3a5e0a8751e2f4f957d7736ccf (patch)
treea2709328fa393286a6c98504d5e00b949b62ad48 /fxjs/cfxjse_isolatetracker.cpp
parentf8f19dc2c1b66fbcc2be837c324cab3df0ff3671 (diff)
downloadpdfium-53190d99102c9b3a5e0a8751e2f4f957d7736ccf.tar.xz
Remove XFA isolate tracker
We don't add anything to the tracker lists so we can remove the tracker. The only thing the Initialize and Finialize methods are doing now is to trigger a v8::V8::Dispose which should happen automatically at exit anyway. Change-Id: I1f783ae5a1df3df63fb067ab30310791b6c44929 Reviewed-on: https://pdfium-review.googlesource.com/20192 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_isolatetracker.cpp')
-rw-r--r--fxjs/cfxjse_isolatetracker.cpp42
1 files changed, 0 insertions, 42 deletions
diff --git a/fxjs/cfxjse_isolatetracker.cpp b/fxjs/cfxjse_isolatetracker.cpp
deleted file mode 100644
index 0dd4158714..0000000000
--- a/fxjs/cfxjse_isolatetracker.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2016 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"
-
-#include <algorithm>
-#include <utility>
-
-CFXJSE_IsolateTracker::CFXJSE_IsolateTracker() {}
-
-CFXJSE_IsolateTracker::~CFXJSE_IsolateTracker() {}
-
-void CFXJSE_IsolateTracker::Append(
- v8::Isolate* pIsolate,
- std::unique_ptr<v8::ArrayBuffer::Allocator> alloc) {
- m_OwnedIsolates.push_back(pIsolate);
- m_AllocatorMap[pIsolate] = std::move(alloc);
-}
-
-void CFXJSE_IsolateTracker::Remove(
- v8::Isolate* pIsolate,
- CFXJSE_IsolateTracker::DisposeCallback lpfnDisposeCallback) {
- auto it = std::find(m_OwnedIsolates.begin(), m_OwnedIsolates.end(), pIsolate);
- bool bFound = it != m_OwnedIsolates.end();
- if (bFound)
- m_OwnedIsolates.erase(it);
- lpfnDisposeCallback(pIsolate, bFound);
-
- m_AllocatorMap.erase(pIsolate);
-}
-
-void CFXJSE_IsolateTracker::RemoveAll(
- CFXJSE_IsolateTracker::DisposeCallback lpfnDisposeCallback) {
- for (v8::Isolate* pIsolate : m_OwnedIsolates)
- lpfnDisposeCallback(pIsolate, true);
-
- m_OwnedIsolates.clear();
- m_AllocatorMap.clear();
-}