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

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

Issue 2735973006: Bindings: Separate WorldIdConstants into WorldTypes and WorldId (Closed)
Patch Set: Created 3 years, 9 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 "public/platform/WebScheduler.h" 8 #include "public/platform/WebScheduler.h"
9 #include "wtf/PtrUtil.h" 9 #include "wtf/PtrUtil.h"
10 #include <memory> 10 #include <memory>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 WTF::makeUnique<gin::IsolateHolder>(Platform::current() 62 WTF::makeUnique<gin::IsolateHolder>(Platform::current()
63 ->currentThread() 63 ->currentThread()
64 ->scheduler() 64 ->scheduler()
65 ->loadingTaskRunner() 65 ->loadingTaskRunner()
66 ->toSingleThreadTaskRunner()); 66 ->toSingleThreadTaskRunner());
67 isolate()->Enter(); 67 isolate()->Enter();
68 } 68 }
69 m_thread->initialize(); 69 m_thread->initialize();
70 if (m_initializationPolicy >= ScriptExecution) { 70 if (m_initializationPolicy >= ScriptExecution) {
71 v8::HandleScope handleScope(isolate()); 71 v8::HandleScope handleScope(isolate());
72 m_scriptState = ScriptState::create(v8::Context::New(isolate()), 72 m_scriptState = ScriptState::create(
73 DOMWrapperWorld::create(isolate())); 73 v8::Context::New(isolate()),
74 DOMWrapperWorld::create(isolate(), WorldType::Unknown));
74 } 75 }
75 if (m_initializationPolicy >= WithExecutionContext) { 76 if (m_initializationPolicy >= WithExecutionContext) {
76 m_executionContext = new NullExecutionContext(); 77 m_executionContext = new NullExecutionContext();
77 } 78 }
78 m_waitableEvent->signal(); 79 m_waitableEvent->signal();
79 } 80 }
80 81
81 void DataConsumerHandleTestUtil::Thread::shutdown() { 82 void DataConsumerHandleTestUtil::Thread::shutdown() {
82 m_executionContext = nullptr; 83 m_executionContext = nullptr;
83 if (m_scriptState) { 84 if (m_scriptState) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 std::move(m_onFinishedReading)); 335 std::move(m_onFinishedReading));
335 (*onFinishedReading)(std::move(result)); 336 (*onFinishedReading)(std::move(result));
336 } 337 }
337 338
338 std::unique_ptr<WebDataConsumerHandle> 339 std::unique_ptr<WebDataConsumerHandle>
339 DataConsumerHandleTestUtil::createWaitingDataConsumerHandle() { 340 DataConsumerHandleTestUtil::createWaitingDataConsumerHandle() {
340 return WTF::wrapUnique(new WaitingHandle); 341 return WTF::wrapUnique(new WaitingHandle);
341 } 342 }
342 343
343 } // namespace blink 344 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698