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

Unified Diff: fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp

Issue 1424933013: Keep "static" objects per-context rather than per isolate. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month 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
« fpdfsdk/src/jsapi/fxjs_v8.cpp ('K') | « fpdfsdk/src/jsapi/fxjs_v8.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
diff --git a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
index a7baa7be099ed98b017eb94d59a88339ce59c036..6660fccbd8aa0cf7116dbafd0c5d4bc83e8897a6 100644
--- a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
+++ b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp
@@ -32,11 +32,12 @@ class FXJSV8Embeddertest : public EmbedderTest {
v8::Isolate::Scope isolate_scope(m_pIsolate);
v8::HandleScope handle_scope(m_pIsolate);
FXJS_PerIsolateData::SetUp(m_pIsolate);
- FXJS_InitializeRuntime(m_pIsolate, nullptr, m_pPersistentContext);
+ FXJS_InitializeRuntime(m_pIsolate, nullptr, &m_pPersistentContext,
+ &m_StaticObjects);
}
void TearDown() override {
- FXJS_ReleaseRuntime(m_pIsolate, m_pPersistentContext);
+ FXJS_ReleaseRuntime(m_pIsolate, &m_pPersistentContext, &m_StaticObjects);
m_pPersistentContext.Reset();
FXJS_Release();
EmbedderTest::TearDown();
@@ -51,6 +52,7 @@ class FXJSV8Embeddertest : public EmbedderTest {
nonstd::unique_ptr<FXJS_ArrayBufferAllocator> m_pArrayBufferAllocator;
v8::Isolate* m_pIsolate;
v8::Global<v8::Context> m_pPersistentContext;
+ std::vector<v8::Global<v8::Object>*> m_StaticObjects;
};
TEST_F(FXJSV8Embeddertest, Getters) {
« fpdfsdk/src/jsapi/fxjs_v8.cpp ('K') | « fpdfsdk/src/jsapi/fxjs_v8.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698