From 2481578533f65265e91fc7462a49d8ca944bc9a4 Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Thu, 21 Oct 2021 15:05:17 +0300 Subject: [PATCH] Add support vs2019 & v8 8.9 --- ASCOfficeOdfFileW/linux/odffilewriterlib_odf.cpp | 7 ------- .../source/OdfFormat/ods_conversion_context.cpp | 7 ------- ASCOfficeOdfFileW/source/utils.cpp | 8 -------- Common/3dParty/v8/v8.pri | 6 +++--- DesktopEditor/doctrenderer/js_internal/v8/v8_base.h | 12 ++++++------ 5 files changed, 9 insertions(+), 31 deletions(-) diff --git a/ASCOfficeOdfFileW/linux/odffilewriterlib_odf.cpp b/ASCOfficeOdfFileW/linux/odffilewriterlib_odf.cpp index 0aa3e9f702..99a4a0bc06 100644 --- a/ASCOfficeOdfFileW/linux/odffilewriterlib_odf.cpp +++ b/ASCOfficeOdfFileW/linux/odffilewriterlib_odf.cpp @@ -30,13 +30,6 @@ * */ -#ifndef min -#define min(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - #include "../source/OdfFormat/office_document.cpp" #include "../source/OdfFormat/office_forms.cpp" #include "../source/OdfFormat/calcext_elements.cpp" diff --git a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp index 49de75711d..ace6a2d89c 100644 --- a/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp +++ b/ASCOfficeOdfFileW/source/OdfFormat/ods_conversion_context.cpp @@ -30,13 +30,6 @@ * */ -//#ifndef min -//#define min(a,b) ((a) < (b) ? (a) : (b)) -//#endif -//#ifndef max -//#define max(a,b) ((a) > (b) ? (a) : (b)) -//#endif - #include #include "ods_conversion_context.h" diff --git a/ASCOfficeOdfFileW/source/utils.cpp b/ASCOfficeOdfFileW/source/utils.cpp index 8049a5221d..0e5b7dc62f 100644 --- a/ASCOfficeOdfFileW/source/utils.cpp +++ b/ASCOfficeOdfFileW/source/utils.cpp @@ -31,16 +31,8 @@ */ #include "utils.h" - #include -#ifndef min -#define min(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - #if defined(_WIN32) || defined(_WIN64) #include #include diff --git a/Common/3dParty/v8/v8.pri b/Common/3dParty/v8/v8.pri index 21d88b5dd3..1615b4a28c 100644 --- a/Common/3dParty/v8/v8.pri +++ b/Common/3dParty/v8/v8.pri @@ -1,10 +1,10 @@ CORE_V8_PATH_OVERRIDE=$$PWD -v8_version_87 { +v8_version_89 { CONFIG += c++14 CONFIG += use_v8_monolith - DEFINES += V8_VERSION_87_PLUS + DEFINES += V8_VERSION_89_PLUS DEFINES += V8_COMPRESS_POINTERS - CORE_V8_PATH_OVERRIDE = $$PWD/../v8_87 + CORE_V8_PATH_OVERRIDE = $$PWD/../v8_89 } CORE_V8_PATH_INCLUDE = $$CORE_V8_PATH_OVERRIDE/v8 diff --git a/DesktopEditor/doctrenderer/js_internal/v8/v8_base.h b/DesktopEditor/doctrenderer/js_internal/v8/v8_base.h index b55308bc53..2f33fcae47 100644 --- a/DesktopEditor/doctrenderer/js_internal/v8/v8_base.h +++ b/DesktopEditor/doctrenderer/js_internal/v8/v8_base.h @@ -12,7 +12,7 @@ #include "libplatform/libplatform.h" #include "src/base/sys-info.h" -#ifdef V8_VERSION_87_PLUS +#ifdef V8_VERSION_89_PLUS #define kV8NormalString v8::NewStringType::kNormal #define kV8ProduceCodeCache v8::ScriptCompiler::kEagerCompile #define V8ContextFirstArg CV8Worker::GetCurrentContext(), @@ -65,7 +65,7 @@ public: class CV8Initializer { private: -#ifdef V8_VERSION_87_PLUS +#ifdef V8_VERSION_89_PLUS std::unique_ptr m_platform; #else v8::Platform* m_platform; @@ -75,7 +75,7 @@ private: public: v8::Platform* getPlatform() { -#ifdef V8_VERSION_87_PLUS +#ifdef V8_VERSION_89_PLUS return m_platform.get(); #else return m_platform; @@ -91,7 +91,7 @@ public: #ifndef V8_OS_XP v8::V8::InitializeICUDefaultLocation(sPrA.c_str()); v8::V8::InitializeExternalStartupData(sPrA.c_str()); - #ifdef V8_VERSION_87_PLUS + #ifdef V8_VERSION_89_PLUS m_platform = v8::platform::NewDefaultPlatform(); v8::V8::InitializePlatform(m_platform.get()); #else @@ -110,7 +110,7 @@ public: { v8::V8::Dispose(); v8::V8::ShutdownPlatform(); - #ifndef V8_VERSION_87_PLUS + #ifndef V8_VERSION_89_PLUS delete m_platform; #endif if (m_pAllocator) @@ -329,7 +329,7 @@ namespace NSJSBase virtual bool toBool() { -#ifdef V8_VERSION_87_PLUS +#ifdef V8_VERSION_89_PLUS return value.IsEmpty() ? false : value->BooleanValue(V8IsolateOneArg); #else return value.IsEmpty() ? false : value->BooleanValue(V8ContextOneArg).V8ToChecked();