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