Skip to content

Commit

Permalink
feat(js): open js profiler (#3489)
Browse files Browse the repository at this point in the history
* feat(js): open js profiler

* chore(js): open js profiler

* chore(js): open js profiler

* chore(js): open js profiler

* chore(js): open js profiler

* chore(js): open js profiler
  • Loading branch information
zealotchen0 authored Sep 6, 2023
1 parent f285fc7 commit 890400a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions driver/js/src/vm/v8/v8_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ V8VM::V8VM(const std::shared_ptr<V8VMInitParam>& param) : VM(param) {
#endif
FOOTSTONE_DLOG(INFO) << "Initialize";
v8::V8::Initialize();
#ifdef ENABLE_INSPECTOR
auto trace = reinterpret_cast<v8::platform::tracing::TracingController*>(platform->GetTracingController());
devtools::DevtoolsDataSource::OnGlobalTracingControlGenerate(trace);
#endif
}
}
create_params_.array_buffer_allocator = v8::ArrayBuffer::Allocator::NewDefaultAllocator();
Expand Down
1 change: 1 addition & 0 deletions framework/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ android {
arguments (
"-DCMAKE_BUILD_TYPE=Debug",
"-DMODULES=${getAllModules().join(';')}",
"-DENABLE_INSPECTOR=$ENABLE_INSPECTOR",
*mergeCppDefinitions()
)

Expand Down
5 changes: 5 additions & 0 deletions framework/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,8 @@ PUBLISH_ARTIFACT_ID=release
# Specifies maven publish group ID
#
PUBLISH_GROUP_ID=com.tencent.hippy

#
# Specifies DEVTOOL INSPECTOR OPEN OR NOT
#
ENABLE_INSPECTOR=true

0 comments on commit 890400a

Please sign in to comment.