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

Side by Side Diff: testing/js_embedder_test.h

Issue 2245863002: Push v8::Isolate into CFXJS_Engine class (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Null isolate before letting CFXJS_Engine dtor invoked Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « fxjs/include/fxjs_v8.h ('k') | testing/js_embedder_test.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 PDFium Authors. All rights reserved. 1 // Copyright 2015 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TESTING_JS_EMBEDDER_TEST_H_ 5 #ifndef TESTING_JS_EMBEDDER_TEST_H_
6 #define TESTING_JS_EMBEDDER_TEST_H_ 6 #define TESTING_JS_EMBEDDER_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "fxjs/include/fxjs_v8.h" 11 #include "fxjs/include/fxjs_v8.h"
12 #include "testing/embedder_test.h" 12 #include "testing/embedder_test.h"
13 13
14 class JSEmbedderTest : public EmbedderTest { 14 class JSEmbedderTest : public EmbedderTest {
15 public: 15 public:
16 JSEmbedderTest(); 16 JSEmbedderTest();
17 ~JSEmbedderTest() override; 17 ~JSEmbedderTest() override;
18 18
19 void SetUp() override; 19 void SetUp() override;
20 void TearDown() override; 20 void TearDown() override;
21 21
22 v8::Isolate* isolate(); 22 v8::Isolate* isolate();
23 v8::Local<v8::Context> GetV8Context(); 23 v8::Local<v8::Context> GetV8Context();
24 CFXJS_Engine* engine() { return m_Engine.get(); }
24 25
25 private: 26 private:
26 std::unique_ptr<FXJS_ArrayBufferAllocator> m_pArrayBufferAllocator; 27 std::unique_ptr<FXJS_ArrayBufferAllocator> m_pArrayBufferAllocator;
27 v8::Isolate* m_pIsolate; 28 v8::Isolate* m_pIsolate;
28 v8::Global<v8::Context> m_pPersistentContext; 29 std::unique_ptr<CFXJS_Engine> m_Engine;
29 std::vector<v8::Global<v8::Object>*> m_StaticObjects;
30 }; 30 };
31 31
32 #endif // TESTING_JS_EMBEDDER_TEST_H_ 32 #endif // TESTING_JS_EMBEDDER_TEST_H_
OLDNEW
« no previous file with comments | « fxjs/include/fxjs_v8.h ('k') | testing/js_embedder_test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698