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

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

Issue 1477023003: Refactor the Heap into ThreadHeap to prepare for per thread heaps Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 8
9 namespace blink { 9 namespace blink {
10 10
11 DataConsumerHandleTestUtil::Thread::Thread(const char* name, InitializationPolic y initializationPolicy) 11 DataConsumerHandleTestUtil::Thread::Thread(const char* name, InitializationPolic y initializationPolicy)
12 : m_thread(WebThreadSupportingGC::create(name)) 12 : m_thread(WebThreadSupportingGC::create(name, ThreadState::PerThreadHeapDis abled))
13 , m_initializationPolicy(initializationPolicy) 13 , m_initializationPolicy(initializationPolicy)
14 , m_waitableEvent(adoptPtr(Platform::current()->createWaitableEvent())) 14 , m_waitableEvent(adoptPtr(Platform::current()->createWaitableEvent()))
15 { 15 {
16 m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Thread::initial ize, AllowCrossThreadAccess(this)))); 16 m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Thread::initial ize, AllowCrossThreadAccess(this))));
17 m_waitableEvent->wait(); 17 m_waitableEvent->wait();
18 } 18 }
19 19
20 DataConsumerHandleTestUtil::Thread::~Thread() 20 DataConsumerHandleTestUtil::Thread::~Thread()
21 { 21 {
22 m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Thread::shutdow n, AllowCrossThreadAccess(this)))); 22 m_thread->postTask(BLINK_FROM_HERE, new Task(threadSafeBind(&Thread::shutdow n, AllowCrossThreadAccess(this))));
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 m_reader = nullptr; 298 m_reader = nullptr;
299 } 299 }
300 300
301 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(Pass OwnPtr<HandleReadResult> result) 301 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(Pass OwnPtr<HandleReadResult> result)
302 { 302 {
303 ASSERT(m_onFinishedReading); 303 ASSERT(m_onFinishedReading);
304 (*m_onFinishedReading.release())(result); 304 (*m_onFinishedReading.release())(result);
305 } 305 }
306 306
307 } // namespace blink 307 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698