diff --git a/framework/android/connector/driver/js/src/main/cpp/src/js_driver_jni.cc b/framework/android/connector/driver/js/src/main/cpp/src/js_driver_jni.cc index 9a62d7ce31f..6f296734c58 100644 --- a/framework/android/connector/driver/js/src/main/cpp/src/js_driver_jni.cc +++ b/framework/android/connector/driver/js/src/main/cpp/src/js_driver_jni.cc @@ -214,10 +214,11 @@ void OnFirstPaintEnd(JNIEnv* j_env, jobject j_object, jint j_scope_id, jlong tim return; } auto entry = scope->GetPerformance()->PerformanceNavigation("hippyInit"); - entry->SetHippyRunApplicationEnd(dom_manager->GetDomStartTimePoint(j_root_id)); - entry->SetHippyDomStart(dom_manager->GetDomStartTimePoint(j_root_id)); - entry->SetHippyDomEnd(dom_manager->GetDomEndTimePoint(j_root_id)); - entry->SetHippyFirstFrameStart(dom_manager->GetDomEndTimePoint(j_root_id)); + auto rootId = footstone::checked_numeric_cast(j_root_id); + entry->SetHippyRunApplicationEnd(dom_manager->GetDomStartTimePoint(rootId)); + entry->SetHippyDomStart(dom_manager->GetDomStartTimePoint(rootId)); + entry->SetHippyDomEnd(dom_manager->GetDomEndTimePoint(rootId)); + entry->SetHippyFirstFrameStart(dom_manager->GetDomEndTimePoint(rootId)); entry->SetHippyFirstFrameEnd(footstone::TimePoint::FromEpochDelta(footstone::TimeDelta::FromMilliseconds(time))); }; runner->PostTask(std::move(task)); diff --git a/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java b/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java index 445407158aa..769a3cff1b1 100644 --- a/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java +++ b/framework/android/src/main/java/com/tencent/mtt/hippy/HippyEngineManagerImpl.java @@ -235,7 +235,7 @@ protected void onDestroyEngine() { @Override public void onFirstPaint(int rootId) { - mEngineContext.getJsDriver().recordFirstPaintEndTime(System.currentTimeMillis(), rootId)); + mEngineContext.getJsDriver().recordFirstPaintEndTime(System.currentTimeMillis(), rootId); mEngineContext.getMonitor().addPoint(TimeMonitor.MONITOR_GROUP_PAINT, TimeMonitor.MONITOR_POINT_FIRST_CONTENTFUL_PAINT); mGlobalConfigs.getEngineMonitorAdapter().onFirstPaintCompleted(mEngineContext.getComponentName());