summaryrefslogtreecommitdiff
path: root/testing/js_embedder_test.cpp
diff options
context:
space:
mode:
authorjochen <jochen@chromium.org>2016-05-31 12:07:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-31 12:07:40 -0700
commit38a1f0a14bf17512f89bb5c7ed82847ba46456fa (patch)
tree831f78a86a4775f09862fbefb8fc40107ccde8c6 /testing/js_embedder_test.cpp
parent48d91dd174933b4881fb500b76fb2e3ecbc7f548 (diff)
downloadpdfium-38a1f0a14bf17512f89bb5c7ed82847ba46456fa.tar.xz
Fix V8 isolate setup in embedder tests and roll V8 to 055bfa7.
R=thestig@chromium.org BUG= Review-Url: https://codereview.chromium.org/2019383002
Diffstat (limited to 'testing/js_embedder_test.cpp')
-rw-r--r--testing/js_embedder_test.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/testing/js_embedder_test.cpp b/testing/js_embedder_test.cpp
index ffa647d073..4815cd54a3 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() {