| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 | 125 |
| 126 void DevToolsHost::evaluateScript(const String& expression) { | 126 void DevToolsHost::evaluateScript(const String& expression) { |
| 127 if (ScriptForbiddenScope::isScriptForbidden()) | 127 if (ScriptForbiddenScope::isScriptForbidden()) |
| 128 return; | 128 return; |
| 129 if (!m_frontendFrame) | 129 if (!m_frontendFrame) |
| 130 return; | 130 return; |
| 131 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); | 131 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); |
| 132 if (!scriptState) | 132 if (!scriptState) |
| 133 return; | 133 return; |
| 134 ScriptState::Scope scope(scriptState); | 134 ScriptState::Scope scope(scriptState); |
| 135 UserGestureIndicator gestureIndicator(DefinitelyProcessingNewUserGesture); | 135 UserGestureIndicator gestureIndicator(UserGestureToken::create()); |
| 136 v8::MicrotasksScope microtasks(scriptState->isolate(), | 136 v8::MicrotasksScope microtasks(scriptState->isolate(), |
| 137 v8::MicrotasksScope::kRunMicrotasks); | 137 v8::MicrotasksScope::kRunMicrotasks); |
| 138 v8::Local<v8::String> source = | 138 v8::Local<v8::String> source = |
| 139 v8AtomicString(scriptState->isolate(), expression.utf8().data()); | 139 v8AtomicString(scriptState->isolate(), expression.utf8().data()); |
| 140 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(), | 140 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(), |
| 141 String(), TextPosition()); | 141 String(), TextPosition()); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void DevToolsHost::disconnectClient() { | 144 void DevToolsHost::disconnectClient() { |
| 145 m_client = 0; | 145 m_client = 0; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 | 224 |
| 225 bool DevToolsHost::isUnderTest() { | 225 bool DevToolsHost::isUnderTest() { |
| 226 return m_client && m_client->isUnderTest(); | 226 return m_client && m_client->isUnderTest(); |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool DevToolsHost::isHostedMode() { | 229 bool DevToolsHost::isHostedMode() { |
| 230 return false; | 230 return false; |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace blink | 233 } // namespace blink |
| OLD | NEW |