Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/compatible_with_trouter_1
Browse files Browse the repository at this point in the history
  • Loading branch information
open-hippy authored Sep 4, 2023
2 parents 0419c6b + be822e3 commit 3089128
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions driver/js/include/driver/scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,10 @@ class Scope : public std::enable_shared_from_this<Scope> {
auto task = [weak_this, uri, start, end]() {
DEFINE_AND_CHECK_SELF(Scope)
auto entry = self->GetPerformance()->PerformanceResource(uri);
entry->SetLoadSourceStart(start);
entry->SetLoadSourceEnd(end);
if (entry) {
entry->SetLoadSourceStart(start);
entry->SetLoadSourceEnd(end);
}
};
runner->PostTask(std::move(task));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,10 @@ void OnResourceLoadEnd(JNIEnv* j_env, jobject j_object, jint j_scope_id, jstring
auto scope = weak_scope.lock();
if (scope) {
auto entry = scope->GetPerformance()->PerformanceResource(uri);
entry->SetLoadSourceStart(footstone::TimePoint::FromEpochDelta(footstone::TimeDelta::FromMilliseconds(j_start_time)));
entry->SetLoadSourceEnd(footstone::TimePoint::FromEpochDelta(footstone::TimeDelta::FromMilliseconds(j_end_time)));
if (entry) {
entry->SetLoadSourceStart(footstone::TimePoint::FromEpochDelta(footstone::TimeDelta::FromMilliseconds(j_start_time)));
entry->SetLoadSourceEnd(footstone::TimePoint::FromEpochDelta(footstone::TimeDelta::FromMilliseconds(j_end_time)));
}
}
};
runner->PostTask(std::move(task));
Expand Down

0 comments on commit 3089128

Please sign in to comment.