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

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

Issue 1314333002: [Fetch API] Fix ScriptState leak in Fetch API unittests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "config.h" 5 #include "config.h"
6 #include "modules/fetch/DataConsumerHandleTestUtil.h" 6 #include "modules/fetch/DataConsumerHandleTestUtil.h"
7 7
8 #include "bindings/core/v8/DOMWrapperWorld.h" 8 #include "bindings/core/v8/DOMWrapperWorld.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 if (m_initializationPolicy >= WithExecutionContext) { 38 if (m_initializationPolicy >= WithExecutionContext) {
39 m_executionContext = adoptRefWillBeNoop(new NullExecutionContext()); 39 m_executionContext = adoptRefWillBeNoop(new NullExecutionContext());
40 } 40 }
41 m_waitableEvent->signal(); 41 m_waitableEvent->signal();
42 } 42 }
43 43
44 void DataConsumerHandleTestUtil::Thread::shutdown() 44 void DataConsumerHandleTestUtil::Thread::shutdown()
45 { 45 {
46 m_executionContext = nullptr; 46 m_executionContext = nullptr;
47 if (m_scriptState) {
48 m_scriptState->disposePerContextData();
49 }
47 m_scriptState = nullptr; 50 m_scriptState = nullptr;
48 m_thread->shutdown(); 51 m_thread->shutdown();
49 if (m_isolateHolder) { 52 if (m_isolateHolder) {
50 isolate()->Exit(); 53 isolate()->Exit();
51 m_isolateHolder = nullptr; 54 m_isolateHolder = nullptr;
52 } 55 }
53 m_waitableEvent->signal(); 56 m_waitableEvent->signal();
54 } 57 }
55 58
56 class DataConsumerHandleTestUtil::ReplayingHandle::ReaderImpl final : public Rea der { 59 class DataConsumerHandleTestUtil::ReplayingHandle::ReaderImpl final : public Rea der {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 m_reader = nullptr; 298 m_reader = nullptr;
296 } 299 }
297 300
298 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(Pass OwnPtr<HandleReadResult> result) 301 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(Pass OwnPtr<HandleReadResult> result)
299 { 302 {
300 ASSERT(m_onFinishedReading); 303 ASSERT(m_onFinishedReading);
301 (*m_onFinishedReading.release())(result); 304 (*m_onFinishedReading.release())(result);
302 } 305 }
303 306
304 } // namespace blink 307 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698