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

Unified Diff: fxjs/cfxjse_isolatetracker.h

Issue 2254123004: Fix leaked array buffer allocators of isolates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comment Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fxjs/cfxjse_isolatetracker.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fxjs/cfxjse_isolatetracker.h
diff --git a/fxjs/cfxjse_isolatetracker.h b/fxjs/cfxjse_isolatetracker.h
index 7558416a141facdcb6da3a0d7ccdac9855545fa4..5340d9b5c0a62d336e9778692ae82e05bd104444 100644
--- a/fxjs/cfxjse_isolatetracker.h
+++ b/fxjs/cfxjse_isolatetracker.h
@@ -7,6 +7,8 @@
#ifndef FXJS_CFXJSE_ISOLATETRACKER_H_
#define FXJS_CFXJSE_ISOLATETRACKER_H_
+#include <map>
+#include <memory>
#include <vector>
#include "v8/include/v8.h"
@@ -57,7 +59,8 @@ class CFXJSE_IsolateTracker {
CFXJSE_IsolateTracker();
~CFXJSE_IsolateTracker();
- void Append(v8::Isolate* pIsolate);
+ void Append(v8::Isolate* pIsolate,
+ std::unique_ptr<v8::ArrayBuffer::Allocator> alloc);
void Remove(v8::Isolate* pIsolate, DisposeCallback lpfnDisposeCallback);
void RemoveAll(DisposeCallback lpfnDisposeCallback);
@@ -65,6 +68,8 @@ class CFXJSE_IsolateTracker {
protected:
std::vector<v8::Isolate*> m_OwnedIsolates;
+ std::map<v8::Isolate*, std::unique_ptr<v8::ArrayBuffer::Allocator>>
+ m_AllocatorMap;
};
#endif // FXJS_CFXJSE_ISOLATETRACKER_H_
« no previous file with comments | « no previous file | fxjs/cfxjse_isolatetracker.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698