| 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" |
| 33 #include "bindings/core/v8/V8ScriptRunner.h" | 34 #include "bindings/core/v8/V8ScriptRunner.h" |
| 34 #include "core/clipboard/Pasteboard.h" | 35 #include "core/clipboard/Pasteboard.h" |
| 35 #include "core/dom/ExecutionContext.h" | 36 #include "core/dom/ExecutionContext.h" |
| 36 #include "core/events/Event.h" | 37 #include "core/events/Event.h" |
| 37 #include "core/events/EventTarget.h" | 38 #include "core/events/EventTarget.h" |
| 38 #include "core/fetch/ResourceFetcher.h" | 39 #include "core/fetch/ResourceFetcher.h" |
| 39 #include "core/frame/FrameView.h" | 40 #include "core/frame/FrameView.h" |
| 40 #include "core/frame/LocalDOMWindow.h" | 41 #include "core/frame/LocalDOMWindow.h" |
| 41 #include "core/frame/LocalFrame.h" | 42 #include "core/frame/LocalFrame.h" |
| 42 #include "core/html/parser/TextResourceDecoder.h" | 43 #include "core/html/parser/TextResourceDecoder.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 { | 140 { |
| 140 if (ScriptForbiddenScope::isScriptForbidden()) | 141 if (ScriptForbiddenScope::isScriptForbidden()) |
| 141 return; | 142 return; |
| 142 if (!m_frontendFrame) | 143 if (!m_frontendFrame) |
| 143 return; | 144 return; |
| 144 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); | 145 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); |
| 145 if (!scriptState) | 146 if (!scriptState) |
| 146 return; | 147 return; |
| 147 ScriptState::Scope scope(scriptState); | 148 ScriptState::Scope scope(scriptState); |
| 148 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 149 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); |
| 149 v8::MicrotasksScope microtasks(scriptState->isolate(), v8::MicrotasksScope::
kRunMicrotasks); | 150 V8RecursionScope recursionScope(scriptState->isolate()); |
| 150 v8::Local<v8::String> source = v8AtomicString(scriptState->isolate(), expres
sion.utf8().data()); | 151 v8::Local<v8::String> source = v8AtomicString(scriptState->isolate(), expres
sion.utf8().data()); |
| 151 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(),
String(), TextPosition()); | 152 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(),
String(), TextPosition()); |
| 152 } | 153 } |
| 153 | 154 |
| 154 void DevToolsHost::disconnectClient() | 155 void DevToolsHost::disconnectClient() |
| 155 { | 156 { |
| 156 m_client = 0; | 157 m_client = 0; |
| 157 if (m_menuProvider) { | 158 if (m_menuProvider) { |
| 158 m_menuProvider->disconnect(); | 159 m_menuProvider->disconnect(); |
| 159 m_menuProvider = nullptr; | 160 m_menuProvider = nullptr; |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 { | 240 { |
| 240 return m_client && m_client->isUnderTest(); | 241 return m_client && m_client->isUnderTest(); |
| 241 } | 242 } |
| 242 | 243 |
| 243 bool DevToolsHost::isHostedMode() | 244 bool DevToolsHost::isHostedMode() |
| 244 { | 245 { |
| 245 return false; | 246 return false; |
| 246 } | 247 } |
| 247 | 248 |
| 248 } // namespace blink | 249 } // namespace blink |
| OLD | NEW |