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

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: 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 | « DEPS ('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..95499de813ba9eceb9b4996e27ef808bff9c1b1a 100644
--- a/testing/js_embedder_test.cpp
+++ b/testing/js_embedder_test.cpp
@@ -5,17 +5,17 @@
#include "testing/js_embedder_test.h"
JSEmbedderTest::JSEmbedderTest()
- : m_pArrayBufferAllocator(new FXJS_ArrayBufferAllocator) {
- v8::Isolate::CreateParams params;
- params.array_buffer_allocator = m_pArrayBufferAllocator.get();
- m_pIsolate = v8::Isolate::New(params);
-}
+ : m_pArrayBufferAllocator(new FXJS_ArrayBufferAllocator),
+ m_pIsolate(nullptr) {}
JSEmbedderTest::~JSEmbedderTest() {
- m_pIsolate->Dispose();
}
void JSEmbedderTest::SetUp() {
+ v8::Isolate::CreateParams params;
+ params.array_buffer_allocator = m_pArrayBufferAllocator.get();
+ m_pIsolate = v8::Isolate::New(params);
Lei Zhang 2016/05/30 20:19:20 Is this going to leak?
+
EmbedderTest::SetExternalIsolate(m_pIsolate);
EmbedderTest::SetUp();
@@ -34,6 +34,7 @@ void JSEmbedderTest::TearDown() {
m_pPersistentContext.Reset();
FXJS_Release();
EmbedderTest::TearDown();
+ m_pIsolate = nullptr;
}
v8::Isolate* JSEmbedderTest::isolate() {
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698