| 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 "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 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 if (m_initializationPolicy >= ScriptExecution) { | 28 if (m_initializationPolicy >= ScriptExecution) { |
| 29 m_isolateHolder = adoptPtr(new gin::IsolateHolder()); | 29 m_isolateHolder = adoptPtr(new gin::IsolateHolder()); |
| 30 isolate()->Enter(); | 30 isolate()->Enter(); |
| 31 } | 31 } |
| 32 m_thread->initialize(); | 32 m_thread->initialize(); |
| 33 if (m_initializationPolicy >= ScriptExecution) { | 33 if (m_initializationPolicy >= ScriptExecution) { |
| 34 v8::HandleScope handleScope(isolate()); | 34 v8::HandleScope handleScope(isolate()); |
| 35 m_scriptState = ScriptState::create(v8::Context::New(isolate()), DOMWrap
perWorld::create(isolate())); | 35 m_scriptState = ScriptState::create(v8::Context::New(isolate()), DOMWrap
perWorld::create(isolate())); |
| 36 } | 36 } |
| 37 if (m_initializationPolicy >= WithExecutionContext) { | 37 if (m_initializationPolicy >= WithExecutionContext) { |
| 38 m_executionContext = adoptRefWillBeNoop(new NullExecutionContext()); | 38 m_executionContext = new NullExecutionContext(); |
| 39 } | 39 } |
| 40 m_waitableEvent->signal(); | 40 m_waitableEvent->signal(); |
| 41 } | 41 } |
| 42 | 42 |
| 43 void DataConsumerHandleTestUtil::Thread::shutdown() | 43 void DataConsumerHandleTestUtil::Thread::shutdown() |
| 44 { | 44 { |
| 45 m_executionContext = nullptr; | 45 m_executionContext = nullptr; |
| 46 if (m_scriptState) { | 46 if (m_scriptState) { |
| 47 m_scriptState->disposePerContextData(); | 47 m_scriptState->disposePerContextData(); |
| 48 } | 48 } |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 m_reader = nullptr; | 288 m_reader = nullptr; |
| 289 } | 289 } |
| 290 | 290 |
| 291 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(Pass
OwnPtr<HandleReadResult> result) | 291 void DataConsumerHandleTestUtil::HandleTwoPhaseReader::runOnFinishedReading(Pass
OwnPtr<HandleReadResult> result) |
| 292 { | 292 { |
| 293 ASSERT(m_onFinishedReading); | 293 ASSERT(m_onFinishedReading); |
| 294 (*m_onFinishedReading.release())(result); | 294 (*m_onFinishedReading.release())(result); |
| 295 } | 295 } |
| 296 | 296 |
| 297 } // namespace blink | 297 } // namespace blink |
| OLD | NEW |