| Index: third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
|
| diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
|
| index 2506af4e00842c49be6d5ccd8afc48e7940f5f76..52986bec48af7ae0352f5c2eab867e492227ea1d 100644
|
| --- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
|
| +++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
|
| @@ -88,18 +88,26 @@ public:
|
| void recordAttach(const String& handle)
|
| {
|
| MutexLocker locker(m_loggingMutex);
|
| - m_result.append("A reader is attached to " + handle + " on " + currentThreadName() + ".\n");
|
| + m_result.append("A reader is attached to ");
|
| + m_result.append(handle);
|
| + m_result.append(" on ");
|
| + m_result.append(currentThreadName());
|
| + m_result.append(".\n");
|
| }
|
| void recordDetach(const String& handle)
|
| {
|
| MutexLocker locker(m_loggingMutex);
|
| - m_result.append("A reader is detached from " + handle + " on " + currentThreadName() + ".\n");
|
| + m_result.append("A reader is detached from ");
|
| + m_result.append(handle);
|
| + m_result.append(" on ");
|
| + m_result.append(currentThreadName());
|
| + m_result.append(".\n");
|
| }
|
|
|
| - const String& result()
|
| + String result()
|
| {
|
| MutexLocker locker(m_loggingMutex);
|
| - return m_result;
|
| + return m_result.toString();
|
| }
|
|
|
| void registerThreadHolder(ThreadHolder* holder)
|
| @@ -144,7 +152,7 @@ public:
|
|
|
| // Protects |m_result|.
|
| Mutex m_loggingMutex;
|
| - String m_result;
|
| + StringBuilder m_result;
|
|
|
| // Protects |m_holder|.
|
| Mutex m_holderMutex;
|
| @@ -216,7 +224,7 @@ public:
|
|
|
| void resetReader() { m_reader = nullptr; }
|
| void signalDone() { m_waitableEvent->signal(); }
|
| - const String& result() { return m_context->result(); }
|
| + String result() { return m_context->result(); }
|
| void postTaskToReadingThread(const WebTraceLocation& location, std::unique_ptr<CrossThreadClosure> task)
|
| {
|
| m_context->postTaskToReadingThread(location, std::move(task));
|
|
|