OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> | 3 * Copyright (C) 2008 Matt Lilek <webkit@mattlilek.com> |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 12 matching lines...) Expand all Loading... |
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #include "core/inspector/DevToolsHost.h" | 30 #include "core/inspector/DevToolsHost.h" |
31 | 31 |
32 #include "bindings/core/v8/ScriptState.h" | 32 #include "bindings/core/v8/ScriptState.h" |
33 #include "bindings/core/v8/V8RecursionScope.h" | |
34 #include "bindings/core/v8/V8ScriptRunner.h" | 33 #include "bindings/core/v8/V8ScriptRunner.h" |
35 #include "core/clipboard/Pasteboard.h" | 34 #include "core/clipboard/Pasteboard.h" |
36 #include "core/dom/ExecutionContext.h" | 35 #include "core/dom/ExecutionContext.h" |
37 #include "core/events/Event.h" | 36 #include "core/events/Event.h" |
38 #include "core/events/EventTarget.h" | 37 #include "core/events/EventTarget.h" |
39 #include "core/fetch/ResourceFetcher.h" | 38 #include "core/fetch/ResourceFetcher.h" |
40 #include "core/frame/FrameView.h" | 39 #include "core/frame/FrameView.h" |
41 #include "core/frame/LocalDOMWindow.h" | 40 #include "core/frame/LocalDOMWindow.h" |
42 #include "core/frame/LocalFrame.h" | 41 #include "core/frame/LocalFrame.h" |
43 #include "core/html/parser/TextResourceDecoder.h" | 42 #include "core/html/parser/TextResourceDecoder.h" |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 { | 139 { |
141 if (ScriptForbiddenScope::isScriptForbidden()) | 140 if (ScriptForbiddenScope::isScriptForbidden()) |
142 return; | 141 return; |
143 if (!m_frontendFrame) | 142 if (!m_frontendFrame) |
144 return; | 143 return; |
145 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); | 144 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); |
146 if (!scriptState) | 145 if (!scriptState) |
147 return; | 146 return; |
148 ScriptState::Scope scope(scriptState); | 147 ScriptState::Scope scope(scriptState); |
149 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 148 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
150 V8RecursionScope recursionScope(scriptState->isolate()); | 149 v8::MicrotasksScope microtasks(scriptState->isolate(), v8::MicrotasksScope::
kRunMicrotasks); |
151 v8::Local<v8::String> source = v8AtomicString(scriptState->isolate(), expres
sion.utf8().data()); | 150 v8::Local<v8::String> source = v8AtomicString(scriptState->isolate(), expres
sion.utf8().data()); |
152 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(),
String(), TextPosition()); | 151 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(),
String(), TextPosition()); |
153 } | 152 } |
154 | 153 |
155 void DevToolsHost::disconnectClient() | 154 void DevToolsHost::disconnectClient() |
156 { | 155 { |
157 m_client = 0; | 156 m_client = 0; |
158 if (m_menuProvider) { | 157 if (m_menuProvider) { |
159 m_menuProvider->disconnect(); | 158 m_menuProvider->disconnect(); |
160 m_menuProvider = nullptr; | 159 m_menuProvider = nullptr; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 { | 239 { |
241 return m_client && m_client->isUnderTest(); | 240 return m_client && m_client->isUnderTest(); |
242 } | 241 } |
243 | 242 |
244 bool DevToolsHost::isHostedMode() | 243 bool DevToolsHost::isHostedMode() |
245 { | 244 { |
246 return false; | 245 return false; |
247 } | 246 } |
248 | 247 |
249 } // namespace blink | 248 } // namespace blink |
OLD | NEW |