зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1511470
- part 2 - reduce copying of profile data in ProfilerChild; r=mstange
This case is exactly the same as the previous commit: we can just adopt the newly-generated profile into the outgoing nsCString.
This commit is contained in:
Родитель
e1d14adf40
Коммит
47b90c968b
|
@ -70,7 +70,8 @@ static nsCString CollectProfileOrEmptyString(bool aIsShuttingDown) {
|
|||
UniquePtr<char[]> profile =
|
||||
profiler_get_profile(/* aSinceTime */ 0, aIsShuttingDown);
|
||||
if (profile) {
|
||||
profileCString = nsCString(profile.get(), strlen(profile.get()));
|
||||
size_t len = strlen(profile.get());
|
||||
profileCString.Adopt(profile.release(), len);
|
||||
} else {
|
||||
profileCString = EmptyCString();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче