Index: content/renderer/render_frame_impl.cc |
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc |
index 35b472ad167ac9eeff39a1eae3a9638b2fdd528b..ec6f5bdc218d0fab7408e047e9ec97b965651289 100644 |
--- a/content/renderer/render_frame_impl.cc |
+++ b/content/renderer/render_frame_impl.cc |
@@ -1976,7 +1976,7 @@ void RenderFrameImpl::OnJavaScriptExecuteRequestForTests( |
// A bunch of tests expect to run code in the context of a user gesture, which |
// can grant additional privileges (e.g. the ability to create popups). |
std::unique_ptr<blink::WebScopedUserGesture> gesture( |
- has_user_gesture ? new blink::WebScopedUserGesture : nullptr); |
+ has_user_gesture ? new blink::WebScopedUserGesture(frame_) : nullptr); |
v8::HandleScope handle_scope(blink::mainThreadIsolate()); |
v8::Local<v8::Value> result = |
frame_->executeScriptAndReturnValue(WebScriptSource(jscript)); |
@@ -2310,7 +2310,7 @@ bool RenderFrameImpl::RunJavaScriptMessage(JavaScriptMessageType type, |
return false; |
int32_t message_length = static_cast<int32_t>(message.length()); |
- if (WebUserGestureIndicator::processedUserGestureSinceLoad()) { |
+ if (WebUserGestureIndicator::processedUserGestureSinceLoad(frame_)) { |
UMA_HISTOGRAM_COUNTS("JSDialogs.CharacterCount.UserGestureSinceLoad", |
message_length); |
} else { |
@@ -5011,8 +5011,8 @@ void RenderFrameImpl::OnCommitNavigation( |
// If the request was initiated in the context of a user gesture then make |
// sure that the navigation also executes in the context of a user gesture. |
std::unique_ptr<blink::WebScopedUserGesture> gesture( |
- request_params.has_user_gesture ? new blink::WebScopedUserGesture |
- : nullptr); |
+ request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) |
+ : nullptr); |
NavigateInternal(common_params, StartNavigationParams(), request_params, |
std::move(stream_override)); |