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

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

Issue 2735973006: Bindings: Separate WorldIdConstants into WorldTypes and WorldId (Closed)
Patch Set: rebase 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(),
75 DOMWrapperWorld::WorldType::Testing));
74 } 76 }
75 if (m_initializationPolicy >= WithExecutionContext) { 77 if (m_initializationPolicy >= WithExecutionContext) {
76 m_executionContext = new NullExecutionContext(); 78 m_executionContext = new NullExecutionContext();
77 } 79 }
78 m_waitableEvent->signal(); 80 m_waitableEvent->signal();
79 } 81 }
80 82
81 void DataConsumerHandleTestUtil::Thread::shutdown() { 83 void DataConsumerHandleTestUtil::Thread::shutdown() {
82 m_executionContext = nullptr; 84 m_executionContext = nullptr;
83 if (m_scriptState) { 85 if (m_scriptState) {
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 std::move(m_onFinishedReading)); 336 std::move(m_onFinishedReading));
335 (*onFinishedReading)(std::move(result)); 337 (*onFinishedReading)(std::move(result));
336 } 338 }
337 339
338 std::unique_ptr<WebDataConsumerHandle> 340 std::unique_ptr<WebDataConsumerHandle>
339 DataConsumerHandleTestUtil::createWaitingDataConsumerHandle() { 341 DataConsumerHandleTestUtil::createWaitingDataConsumerHandle() {
340 return WTF::wrapUnique(new WaitingHandle); 342 return WTF::wrapUnique(new WaitingHandle);
341 } 343 }
342 344
343 } // namespace blink 345 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/xml/DocumentXMLTreeViewer.cpp ('k') | third_party/WebKit/Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698