summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/JS_Runtime.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-10 15:07:08 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-10 15:07:08 -0800
commit7d4c74d1b96d82681d49519c129262a1568e87d4 (patch)
treef1417bd69f8960f072b3fef8309ff092a8380605 /fpdfsdk/src/javascript/JS_Runtime.h
parent46960a43145ab978ca3c90cb6133bb3d5600ad1d (diff)
downloadpdfium-7d4c74d1b96d82681d49519c129262a1568e87d4.tar.xz
Keep "static" objects per-context rather than per isolate.
Every time we initialize a new v8::Context, we make a new set of pre-existing native objects, and overwrite the v8::Global handles to those in the previous set. Thus, we may be theoretically releasing some v8::Globals early. R=jochen@chromium.org Review URL: https://codereview.chromium.org/1424933013 .
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Runtime.h')
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.h b/fpdfsdk/src/javascript/JS_Runtime.h
index 4a55c2e9e6..1bdd8e6fdd 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.h
+++ b/fpdfsdk/src/javascript/JS_Runtime.h
@@ -9,6 +9,7 @@
#include <set>
#include <utility>
+#include <vector>
#include "../../include/javascript/IJavaScript.h"
#include "../../include/jsapi/fxjs_v8.h"
@@ -71,6 +72,7 @@ class CJS_Runtime : public IJS_Runtime {
v8::Isolate* m_isolate;
bool m_isolateManaged;
v8::Global<v8::Context> m_context;
+ std::vector<v8::Global<v8::Object>*> m_StaticObjects;
std::set<Observer*> m_observers;
};