fix allocator loss when exec large script

This commit is contained in:
王劲鹏
2021-03-31 16:25:11 +08:00
committed by osborn
parent 8bb7fdb66b
commit f6f25f6344
5 changed files with 7 additions and 7 deletions

View File

@@ -1,10 +1,7 @@
#include "V8Executor.h"
#include "JSValueHelper.h"
#include <QThread>
V8Executor::V8Executor() {
std::unique_ptr<v8::Platform> platform = v8::platform::NewDefaultPlatform();
V8Executor::V8Executor() : platform(v8::platform::NewDefaultPlatform()) {
v8::V8::InitializePlatform(platform.get());
v8::V8::Initialize();

View File

@@ -10,6 +10,7 @@
class V8Executor {
private:
std::unique_ptr<v8::Platform> platform;
v8::Isolate::CreateParams create_params;
v8::Isolate *m_isolate;
v8::Isolate::Scope *m_isolate_scope;