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

Unified Diff: extensions/renderer/user_gestures_native_handler.cc

Issue 2454433002: [Extensions + Blink] Account for user gesture in v8 function calls (Closed)
Patch Set: nits Created 4 years, 1 month 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/user_gestures_native_handler.cc
diff --git a/extensions/renderer/user_gestures_native_handler.cc b/extensions/renderer/user_gestures_native_handler.cc
index 6d310949f3b2ccfb9ee2bdc8451a09cf803c025e..4d65d72f08ceb9f7b1f78a4fee8673ecdb6b089b 100644
--- a/extensions/renderer/user_gestures_native_handler.cc
+++ b/extensions/renderer/user_gestures_native_handler.cc
@@ -39,8 +39,8 @@ void UserGesturesNativeHandler::RunWithUserGesture(
blink::WebScopedUserGesture user_gesture(context()->web_frame());
CHECK_EQ(args.Length(), 1);
CHECK(args[0]->IsFunction());
- v8::Local<v8::Value> no_args;
- context()->CallFunction(v8::Local<v8::Function>::Cast(args[0]), 0, &no_args);
+ context()->SafeCallFunction(v8::Local<v8::Function>::Cast(args[0]), 0,
+ nullptr);
}
void UserGesturesNativeHandler::RunWithoutUserGesture(
@@ -49,7 +49,8 @@ void UserGesturesNativeHandler::RunWithoutUserGesture(
CHECK_EQ(args.Length(), 1);
CHECK(args[0]->IsFunction());
v8::Local<v8::Value> no_args;
- context()->CallFunction(v8::Local<v8::Function>::Cast(args[0]), 0, &no_args);
+ context()->SafeCallFunction(v8::Local<v8::Function>::Cast(args[0]), 0,
+ nullptr);
}
} // namespace extensions
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698