Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp

Issue 1933573002: [DevTools] Remove last bits of logic from v8 agent wrappers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1913283003
Patch Set: rebased, fixed uninitialized variable Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index ec885f062b819275931fc189f8fc86bf9f55c8f3..3d9ee343044587fc2ecd1e0f04c1e2534cfdb040 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -390,6 +390,7 @@ InjectedScript::Scope::Scope(ErrorString* errorString, V8DebuggerImpl* debugger,
, m_tryCatch(debugger->isolate())
, m_ignoreExceptionsAndMuteConsole(false)
, m_previousPauseOnExceptionsState(V8DebuggerImpl::DontPauseOnExceptions)
+ , m_userGesture(false)
{
}
@@ -465,6 +466,13 @@ V8DebuggerImpl::PauseOnExceptionsState InjectedScript::Scope::setPauseOnExceptio
return presentState;
}
+void InjectedScript::Scope::pretendUserGesture()
+{
+ ASSERT(!m_userGesture);
+ m_userGesture = true;
+ m_debugger->client()->beginUserGesture();
+}
+
void InjectedScript::Scope::cleanup()
{
v8::Local<v8::Object> global;
@@ -485,6 +493,8 @@ InjectedScript::Scope::~Scope()
setPauseOnExceptionsState(m_previousPauseOnExceptionsState);
m_debugger->client()->unmuteConsole();
}
+ if (m_userGesture)
+ m_debugger->client()->endUserGesture();
cleanup();
}

Powered by Google App Engine
This is Rietveld 408576698