Bug 1675409 - Migrated NetworkMarkerPayload to Markers 2.0 API - r=gregtatum,necko-reviewers,julienw

While migrating, profiler_add_network_marker was optimized to avoid some string allocations.

Differential Revision: https://phabricator.services.mozilla.com/D96040
This commit is contained in:
Gerald Squelart
2020-11-17 11:57:23 +00:00
parent 05b3685fc6
commit ad472c16e9
9 changed files with 212 additions and 149 deletions

View File

@@ -2458,7 +2458,7 @@ nsresult XMLHttpRequestMainThread::CreateChannel() {
rv = httpChannel->SetRequestMethod(mRequestMethod);
NS_ENSURE_SUCCESS(rv, rv);
httpChannel->SetSource(profiler_get_backtrace());
httpChannel->SetSource(profiler_capture_backtrace());
// Set the initiator type
nsCOMPtr<nsITimedChannel> timedChannel(do_QueryInterface(httpChannel));
@@ -3240,7 +3240,8 @@ void XMLHttpRequestMainThread::SetOriginStack(
mOriginStack = std::move(aOriginStack);
}
void XMLHttpRequestMainThread::SetSource(UniqueProfilerBacktrace aSource) {
void XMLHttpRequestMainThread::SetSource(
UniquePtr<ProfileChunkedBuffer> aSource) {
if (!mChannel) {
return;
}