diff --git a/android/sdk/src/main/jni/include/bridge/runtime.h b/android/sdk/src/main/jni/include/bridge/runtime.h index eb93c2c40..180f592c8 100644 --- a/android/sdk/src/main/jni/include/bridge/runtime.h +++ b/android/sdk/src/main/jni/include/bridge/runtime.h @@ -29,7 +29,7 @@ #include "core/core.h" #include "jni/scoped_java_ref.h" -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR #include "inspector/v8_inspector_client_impl.h" #endif diff --git a/android/sdk/src/main/jni/include/hippy.h b/android/sdk/src/main/jni/include/hippy.h index 1f7c35a20..7a5e2a258 100644 --- a/android/sdk/src/main/jni/include/hippy.h +++ b/android/sdk/src/main/jni/include/hippy.h @@ -33,7 +33,7 @@ #include "jni/jni_utils.h" #include "jni/scoped_java_ref.h" #include "loader/adr_loader.h" -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR #include "inspector/v8_channel_impl.h" #include "inspector/v8_inspector_client_impl.h" #endif diff --git a/android/sdk/src/main/jni/src/bridge/entry.cc b/android/sdk/src/main/jni/src/bridge/entry.cc index d4212a1fa..66252400a 100644 --- a/android/sdk/src/main/jni/src/bridge/entry.cc +++ b/android/sdk/src/main/jni/src/bridge/entry.cc @@ -74,7 +74,7 @@ using RegisterFunction = hippy::base::RegisterFunction; using Ctx = hippy::napi::Ctx; using StringViewUtils = hippy::base::StringViewUtils; using HippyFile = hippy::base::HippyFile; -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR using V8InspectorClientImpl = hippy::inspector::V8InspectorClientImpl; std::shared_ptr global_inspector = nullptr; #endif @@ -409,7 +409,7 @@ jlong InitInstance(JNIEnv* j_env, TDF_BASE_DLOG(ERROR) << "register hippyCallNatives, scope error"; return; } -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR if (runtime->IsDebug()) { if (!global_inspector) { global_inspector = std::make_shared(scope); @@ -509,7 +509,7 @@ void DestroyInstance(JNIEnv* j_env, std::shared_ptr task = std::make_shared(); task->callback = [runtime, runtime_id] { TDF_BASE_LOG(INFO) << "js destroy begin, runtime_id " << runtime_id; -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR if (runtime->IsDebug()) { global_inspector->DestroyContext(); global_inspector->Reset(nullptr, runtime->GetBridge()); diff --git a/android/sdk/src/main/jni/src/bridge/java2js.cc b/android/sdk/src/main/jni/src/bridge/java2js.cc index 264ae019e..483fa8f92 100644 --- a/android/sdk/src/main/jni/src/bridge/java2js.cc +++ b/android/sdk/src/main/jni/src/bridge/java2js.cc @@ -54,7 +54,7 @@ using bytes = std::string; using Ctx = hippy::napi::Ctx; using CtxValue = hippy::napi::CtxValue; using StringViewUtils = hippy::base::StringViewUtils; -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR using V8InspectorClientImpl = hippy::inspector::V8InspectorClientImpl; extern std::shared_ptr global_inspector; #endif @@ -112,7 +112,7 @@ void CallFunction(JNIEnv* j_env, unicode_string_view::Encoding::Utf16); if (runtime->IsDebug() && !action_name.utf16_value().compare(u"onWebsocketMsg")) { -#ifdef V8_HAS_INSPECTOR +#ifdef ENABLE_INSPECTOR std::u16string str(reinterpret_cast(&buffer_data_[0]), buffer_data_.length() / sizeof(char16_t)); global_inspector->SendMessageToV8(