Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Side by Side Diff: fxjs/cfxjse_isolatetracker.cpp

Issue 2136213002: Rename fxjse/ to fxjs/ update files to match class names. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Similarity level.... Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #include "fxjs/cfxjse_isolatetracker.h"
8
9 #include <algorithm>
10
11 CFXJSE_IsolateTracker::CFXJSE_IsolateTracker() {}
12
13 CFXJSE_IsolateTracker::~CFXJSE_IsolateTracker() {}
14
15 void CFXJSE_IsolateTracker::Append(v8::Isolate* pIsolate) {
16 m_OwnedIsolates.push_back(pIsolate);
17 }
18
19 void CFXJSE_IsolateTracker::Remove(
20 v8::Isolate* pIsolate,
21 CFXJSE_IsolateTracker::DisposeCallback lpfnDisposeCallback) {
22 auto it = std::find(m_OwnedIsolates.begin(), m_OwnedIsolates.end(), pIsolate);
23 bool bFound = it != m_OwnedIsolates.end();
24 if (bFound)
25 m_OwnedIsolates.erase(it);
26 lpfnDisposeCallback(pIsolate, bFound);
27 }
28
29 void CFXJSE_IsolateTracker::RemoveAll(
30 CFXJSE_IsolateTracker::DisposeCallback lpfnDisposeCallback) {
31 for (v8::Isolate* pIsolate : m_OwnedIsolates)
32 lpfnDisposeCallback(pIsolate, true);
33
34 m_OwnedIsolates.clear();
35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698