diff --git a/doric-Qt/doric/doric.pro.user b/doric-Qt/doric/doric.pro.user index 3f716abb..b8b41865 100644 --- a/doric-Qt/doric/doric.pro.user +++ b/doric-Qt/doric/doric.pro.user @@ -1,6 +1,6 @@ - + EnvironmentId @@ -523,6 +523,7 @@ true false true + C:/Users/maverick/Workspace/Doric/doric-Qt/build-doric-Desktop_Qt_6_0_1_MinGW_64_bit-Debug 1 diff --git a/doric-Qt/doric/engine/DoricJSEngine.cpp b/doric-Qt/doric/engine/DoricJSEngine.cpp index fe1aae56..8a4e3777 100644 --- a/doric-Qt/doric/engine/DoricJSEngine.cpp +++ b/doric-Qt/doric/engine/DoricJSEngine.cpp @@ -102,6 +102,7 @@ QJSValue DoricJSEngine::invokeDoricMethod(QString method, void DoricJSEngine::loadBuiltinJS(QString assetName) { QString script = DoricUtils::readAssetFile("/doric", assetName); QString result = mJSE->loadJS(script, "Assets://" + assetName); + qDebug() << result; } QString DoricJSEngine::packageContextScript(QString contextId, diff --git a/doric-Qt/doric/engine/DoricNativeJSE.h b/doric-Qt/doric/engine/DoricNativeJSE.h index f09734ae..29de8405 100644 --- a/doric-Qt/doric/engine/DoricNativeJSE.h +++ b/doric-Qt/doric/engine/DoricNativeJSE.h @@ -2,13 +2,13 @@ #define NATIVE_JSE_H #include "DoricInterfaceJSE.h" -#include "native/NativeExecutor.h" +//#include "native/NativeExecutor.h" #include "v8/V8Executor.h" class DoricNativeJSE : public DoricInterfaceJSE { private: V8Executor *v8Executor; - NativeExecutor *nativeExecutor; +// NativeExecutor *nativeExecutor; public: DoricNativeJSE(); diff --git a/doric-Qt/doric/engine/v8/V8Executor.cpp b/doric-Qt/doric/engine/v8/V8Executor.cpp index abf6e9eb..debf92f7 100644 --- a/doric-Qt/doric/engine/v8/V8Executor.cpp +++ b/doric-Qt/doric/engine/v8/V8Executor.cpp @@ -1,10 +1,7 @@ #include "V8Executor.h" #include "JSValueHelper.h" -#include - -V8Executor::V8Executor() { - std::unique_ptr platform = v8::platform::NewDefaultPlatform(); +V8Executor::V8Executor() : platform(v8::platform::NewDefaultPlatform()) { v8::V8::InitializePlatform(platform.get()); v8::V8::Initialize(); diff --git a/doric-Qt/doric/engine/v8/V8Executor.h b/doric-Qt/doric/engine/v8/V8Executor.h index 18a32e22..f5413023 100644 --- a/doric-Qt/doric/engine/v8/V8Executor.h +++ b/doric-Qt/doric/engine/v8/V8Executor.h @@ -10,6 +10,7 @@ class V8Executor { private: + std::unique_ptr platform; v8::Isolate::CreateParams create_params; v8::Isolate *m_isolate; v8::Isolate::Scope *m_isolate_scope;