Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(416)

Side by Side Diff: third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp

Issue 2355193002: Use enum for per thread heap enabled flag (Closed)
Patch Set: fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/fetch/DataConsumerHandleTestUtil.h" 5 #include "modules/fetch/DataConsumerHandleTestUtil.h"
6 6
7 #include "bindings/core/v8/DOMWrapperWorld.h" 7 #include "bindings/core/v8/DOMWrapperWorld.h"
8 #include "wtf/PtrUtil.h" 8 #include "wtf/PtrUtil.h"
9 #include <memory> 9 #include <memory>
10 10
11 namespace blink { 11 namespace blink {
12 12
13 DataConsumerHandleTestUtil::Thread::Thread(const char* name, InitializationPolic y initializationPolicy) 13 DataConsumerHandleTestUtil::Thread::Thread(const char* name, InitializationPolic y initializationPolicy)
14 : m_thread(WebThreadSupportingGC::create(name)) 14 : m_thread(WebThreadSupportingGC::create(name, BlinkGC::MainThreadHeapMode))
15 , m_initializationPolicy(initializationPolicy) 15 , m_initializationPolicy(initializationPolicy)
16 , m_waitableEvent(wrapUnique(new WaitableEvent())) 16 , m_waitableEvent(wrapUnique(new WaitableEvent()))
17 { 17 {
18 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&Thread::initialize, cro ssThreadUnretained(this))); 18 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&Thread::initialize, cro ssThreadUnretained(this)));
19 m_waitableEvent->wait(); 19 m_waitableEvent->wait();
20 } 20 }
21 21
22 DataConsumerHandleTestUtil::Thread::~Thread() 22 DataConsumerHandleTestUtil::Thread::~Thread()
23 { 23 {
24 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&Thread::shutdown, cross ThreadUnretained(this))); 24 m_thread->postTask(BLINK_FROM_HERE, crossThreadBind(&Thread::shutdown, cross ThreadUnretained(this)));
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 } 292 }
293 293
294 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(std: :unique_ptr<HandleReadResult> result) 294 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(std: :unique_ptr<HandleReadResult> result)
295 { 295 {
296 DCHECK(m_onFinishedReading); 296 DCHECK(m_onFinishedReading);
297 std::unique_ptr<OnFinishedReading> onFinishedReading(std::move(m_onFinishedR eading)); 297 std::unique_ptr<OnFinishedReading> onFinishedReading(std::move(m_onFinishedR eading));
298 (*onFinishedReading)(std::move(result)); 298 (*onFinishedReading)(std::move(result));
299 } 299 }
300 300
301 } // namespace blink 301 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698