OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |