mirror of
https://github.com/Tencent/Hippy.git
synced 2026-10-29 06:06:52 +08:00
chore(android): change inspector flag name
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<V8InspectorClientImpl> 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<V8InspectorClientImpl>(scope);
|
||||
@@ -509,7 +509,7 @@ void DestroyInstance(JNIEnv* j_env,
|
||||
std::shared_ptr<JavaScriptTask> task = std::make_shared<JavaScriptTask>();
|
||||
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());
|
||||
|
||||
@@ -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<V8InspectorClientImpl> 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<const char16_t*>(&buffer_data_[0]),
|
||||
buffer_data_.length() / sizeof(char16_t));
|
||||
global_inspector->SendMessageToV8(
|
||||
|
||||
Reference in New Issue
Block a user