summaryrefslogtreecommitdiff
path: root/testing/js_embedder_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'testing/js_embedder_test.h')
-rw-r--r--testing/js_embedder_test.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/testing/js_embedder_test.h b/testing/js_embedder_test.h
index 44245e3024..089670e25b 100644
--- a/testing/js_embedder_test.h
+++ b/testing/js_embedder_test.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "core/fxcrt/unowned_ptr.h"
#include "fxjs/cfxjs_engine.h"
#include "testing/embedder_test.h"
@@ -18,13 +19,13 @@ class JSEmbedderTest : public EmbedderTest {
void SetUp() override;
void TearDown() override;
- v8::Isolate* isolate();
+ v8::Isolate* isolate() const { return m_pIsolate.get(); }
+ CFXJS_Engine* engine() const { return m_Engine.get(); }
v8::Local<v8::Context> GetV8Context();
- CFXJS_Engine* engine() { return m_Engine.get(); }
private:
std::unique_ptr<CFX_V8ArrayBufferAllocator> m_pArrayBufferAllocator;
- v8::Isolate* m_pIsolate = nullptr;
+ std::unique_ptr<v8::Isolate, CFX_V8IsolateDeleter> m_pIsolate;
std::unique_ptr<CFXJS_Engine> m_Engine;
};