| Index: third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
|
| index 1291a5664fdd3b9eed6b04b0d4e0d54d20df7c94..0b53f67c2e8667307d993b8b441f826ac10faa29 100644
|
| --- a/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/v8_inspector/V8DebuggerAgentImpl.cpp
|
| @@ -210,13 +210,17 @@ bool V8DebuggerAgentImpl::enabled()
|
| return m_enabled;
|
| }
|
|
|
| -void V8DebuggerAgentImpl::enable(ErrorString*)
|
| +void V8DebuggerAgentImpl::enable(ErrorString* errorString)
|
| {
|
| if (enabled())
|
| return;
|
|
|
| - enable();
|
| + if (!m_session->client()->canExecuteScripts()) {
|
| + *errorString = "Script execution is prohibited";
|
| + return;
|
| + }
|
|
|
| + enable();
|
| ASSERT(m_frontend);
|
| }
|
|
|
| @@ -281,6 +285,9 @@ void V8DebuggerAgentImpl::clearFrontend()
|
| void V8DebuggerAgentImpl::restore()
|
| {
|
| ASSERT(!m_enabled);
|
| + if (!m_session->client()->canExecuteScripts())
|
| + return;
|
| +
|
| enable();
|
| ErrorString error;
|
|
|
|
|