OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "web/SuspendableScriptExecutor.h" | 5 #include "web/SuspendableScriptExecutor.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptController.h" | 7 #include "bindings/core/v8/ScriptController.h" |
8 #include "bindings/core/v8/ScriptSourceCode.h" | 8 #include "bindings/core/v8/ScriptSourceCode.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/frame/LocalFrame.h" | 10 #include "core/frame/LocalFrame.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 { | 43 { |
44 } | 44 } |
45 | 45 |
46 void SuspendableScriptExecutor::fired() | 46 void SuspendableScriptExecutor::fired() |
47 { | 47 { |
48 executeAndDestroySelf(); | 48 executeAndDestroySelf(); |
49 } | 49 } |
50 | 50 |
51 void SuspendableScriptExecutor::run() | 51 void SuspendableScriptExecutor::run() |
52 { | 52 { |
53 ExecutionContext* context = executionContext(); | 53 ExecutionContext* context = getExecutionContext(); |
54 ASSERT(context); | 54 ASSERT(context); |
55 if (!context->activeDOMObjectsAreSuspended()) { | 55 if (!context->activeDOMObjectsAreSuspended()) { |
56 suspendIfNeeded(); | 56 suspendIfNeeded(); |
57 executeAndDestroySelf(); | 57 executeAndDestroySelf(); |
58 return; | 58 return; |
59 } | 59 } |
60 startOneShot(0, BLINK_FROM_HERE); | 60 startOneShot(0, BLINK_FROM_HERE); |
61 suspendIfNeeded(); | 61 suspendIfNeeded(); |
62 } | 62 } |
63 | 63 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 } | 96 } |
97 | 97 |
98 DEFINE_TRACE(SuspendableScriptExecutor) | 98 DEFINE_TRACE(SuspendableScriptExecutor) |
99 { | 99 { |
100 visitor->trace(m_frame); | 100 visitor->trace(m_frame); |
101 visitor->trace(m_sources); | 101 visitor->trace(m_sources); |
102 SuspendableTimer::trace(visitor); | 102 SuspendableTimer::trace(visitor); |
103 } | 103 } |
104 | 104 |
105 } // namespace blink | 105 } // namespace blink |
OLD | NEW |