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

Unified Diff: testing/js_embedder_test.cpp

Issue 2019383002: Fix V8 isolate setup in embedder tests and roll V8 to 055bfa7. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: updates Created 4 years, 7 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 | « testing/embedder_test.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/js_embedder_test.cpp
diff --git a/testing/js_embedder_test.cpp b/testing/js_embedder_test.cpp
index ffa647d0730d6b25cc7b659816d0318d185058d2..4815cd54a3fa2e5eb4e65f839ee35028e560de75 100644
--- a/testing/js_embedder_test.cpp
+++ b/testing/js_embedder_test.cpp
@@ -5,17 +5,16 @@
#include "testing/js_embedder_test.h"
JSEmbedderTest::JSEmbedderTest()
- : m_pArrayBufferAllocator(new FXJS_ArrayBufferAllocator) {
+ : m_pArrayBufferAllocator(new FXJS_ArrayBufferAllocator),
+ m_pIsolate(nullptr) {}
+
+JSEmbedderTest::~JSEmbedderTest() {}
+
+void JSEmbedderTest::SetUp() {
v8::Isolate::CreateParams params;
params.array_buffer_allocator = m_pArrayBufferAllocator.get();
m_pIsolate = v8::Isolate::New(params);
-}
-JSEmbedderTest::~JSEmbedderTest() {
- m_pIsolate->Dispose();
-}
-
-void JSEmbedderTest::SetUp() {
EmbedderTest::SetExternalIsolate(m_pIsolate);
EmbedderTest::SetUp();
@@ -34,6 +33,8 @@ void JSEmbedderTest::TearDown() {
m_pPersistentContext.Reset();
FXJS_Release();
EmbedderTest::TearDown();
+ m_pIsolate->Dispose();
+ m_pIsolate = nullptr;
}
v8::Isolate* JSEmbedderTest::isolate() {
« no previous file with comments | « testing/embedder_test.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698