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

Side by Side Diff: third_party/WebKit/Source/modules/worklet/Worklet.cpp

Issue 1839913002: Implement PaintWorkletGlobalScope#registerPaint() for the CSS Paint API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase + remove WillBe types. Created 4 years, 8 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/worklet/Worklet.h" 5 #include "modules/worklet/Worklet.h"
6 6
7 #include "bindings/core/v8/ScriptPromiseResolver.h" 7 #include "bindings/core/v8/ScriptPromiseResolver.h"
8 #include "bindings/core/v8/ScriptSourceCode.h" 8 #include "bindings/core/v8/ScriptSourceCode.h"
9 #include "bindings/core/v8/V8Binding.h" 9 #include "bindings/core/v8/V8Binding.h"
10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 10 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 ASSERT(index != kNotFound); 73 ASSERT(index != kNotFound);
74 ASSERT(m_resolvers[index] == resolver); 74 ASSERT(m_resolvers[index] == resolver);
75 75
76 m_scriptLoaders.remove(index); 76 m_scriptLoaders.remove(index);
77 m_resolvers.remove(index); 77 m_resolvers.remove(index);
78 } 78 }
79 79
80 void Worklet::stop() 80 void Worklet::stop()
81 { 81 {
82 workletGlobalScope()->scriptController()->willScheduleExecutionTermination() ; 82 workletGlobalScope()->dispose();
83 83
84 for (auto scriptLoader : m_scriptLoaders) { 84 for (auto scriptLoader : m_scriptLoaders) {
85 scriptLoader->cancel(); 85 scriptLoader->cancel();
86 } 86 }
87 } 87 }
88 88
89 DEFINE_TRACE(Worklet) 89 DEFINE_TRACE(Worklet)
90 { 90 {
91 visitor->trace(m_resolvers); 91 visitor->trace(m_resolvers);
92 ActiveDOMObject::trace(visitor); 92 ActiveDOMObject::trace(visitor);
93 } 93 }
94 94
95 } // namespace blink 95 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/modules.gypi ('k') | third_party/WebKit/Source/modules/worklet/WorkletGlobalScope.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698