mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Do not pass short-lived buffers as labels to Dart_TimelineEvent (#8166)
Dart no longer makes a copy of the label string when recording events. See https://github.com/flutter/engine/pull/8152
This commit is contained in:
parent
e514f0bd18
commit
403337ebb8
@ -205,12 +205,12 @@ void TraceEventFlowEnd0(TraceArg category_group, TraceArg name, TraceIDArg id);
|
||||
|
||||
class ScopedInstantEnd {
|
||||
public:
|
||||
ScopedInstantEnd(std::string str) : label_(std::move(str)) {}
|
||||
ScopedInstantEnd(const char* str) : label_(str) {}
|
||||
|
||||
~ScopedInstantEnd() { TraceEventEnd(label_.c_str()); }
|
||||
~ScopedInstantEnd() { TraceEventEnd(label_); }
|
||||
|
||||
private:
|
||||
const std::string label_;
|
||||
const char* label_;
|
||||
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(ScopedInstantEnd);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user