| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 DEFINE_TRACE(DevToolsHost) { | 123 DEFINE_TRACE(DevToolsHost) { |
| 124 visitor->trace(m_frontendFrame); | 124 visitor->trace(m_frontendFrame); |
| 125 visitor->trace(m_menuProvider); | 125 visitor->trace(m_menuProvider); |
| 126 } | 126 } |
| 127 | 127 |
| 128 void DevToolsHost::evaluateScript(const String& expression) { | 128 void DevToolsHost::evaluateScript(const String& expression) { |
| 129 if (ScriptForbiddenScope::isScriptForbidden()) | 129 if (ScriptForbiddenScope::isScriptForbidden()) |
| 130 return; | 130 return; |
| 131 if (!m_frontendFrame) | 131 if (!m_frontendFrame) |
| 132 return; | 132 return; |
| 133 ScriptState* scriptState = ScriptState::forMainWorld(m_frontendFrame); | 133 ScriptState* scriptState = toScriptStateForMainWorld(m_frontendFrame); |
| 134 if (!scriptState) | 134 if (!scriptState) |
| 135 return; | 135 return; |
| 136 ScriptState::Scope scope(scriptState); | 136 ScriptState::Scope scope(scriptState); |
| 137 UserGestureIndicator gestureIndicator( | 137 UserGestureIndicator gestureIndicator( |
| 138 DocumentUserGestureToken::create(m_frontendFrame->document())); | 138 DocumentUserGestureToken::create(m_frontendFrame->document())); |
| 139 v8::MicrotasksScope microtasks(scriptState->isolate(), | 139 v8::MicrotasksScope microtasks(scriptState->isolate(), |
| 140 v8::MicrotasksScope::kRunMicrotasks); | 140 v8::MicrotasksScope::kRunMicrotasks); |
| 141 v8::Local<v8::String> source = | 141 v8::Local<v8::String> source = |
| 142 v8AtomicString(scriptState->isolate(), expression.utf8().data()); | 142 v8AtomicString(scriptState->isolate(), expression.utf8().data()); |
| 143 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(), | 143 V8ScriptRunner::compileAndRunInternalScript(source, scriptState->isolate(), |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 | 227 |
| 228 bool DevToolsHost::isUnderTest() { | 228 bool DevToolsHost::isUnderTest() { |
| 229 return m_client && m_client->isUnderTest(); | 229 return m_client && m_client->isUnderTest(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 bool DevToolsHost::isHostedMode() { | 232 bool DevToolsHost::isHostedMode() { |
| 233 return false; | 233 return false; |
| 234 } | 234 } |
| 235 | 235 |
| 236 } // namespace blink | 236 } // namespace blink |
| OLD | NEW |