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

Unified Diff: content/renderer/gpu/gpu_benchmarking_extension.cc

Issue 2127303002: Make the crashed web platform pointerevent tests pass (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ScrollTo to move the target into the view bound Created 4 years, 5 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/gpu_benchmarking_extension.cc
diff --git a/content/renderer/gpu/gpu_benchmarking_extension.cc b/content/renderer/gpu/gpu_benchmarking_extension.cc
index 42f6995ff233dda56270b1647573847c6c171578..4d5357173834e93befdfd5c6b10fad5e380dbb0e 100644
--- a/content/renderer/gpu/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu/gpu_benchmarking_extension.cc
@@ -309,10 +309,11 @@ void OnSyntheticGestureCompleted(CallbackAndContext* callback_and_context) {
v8::HandleScope scope(isolate);
v8::Local<v8::Context> context = callback_and_context->GetContext();
v8::Context::Scope context_scope(context);
+ v8::Local<v8::Function> callback = callback_and_context->GetCallback();
WebLocalFrame* frame = WebLocalFrame::frameForContext(context);
- if (frame) {
+ if (frame && !callback.IsEmpty()) {
frame->callFunctionEvenIfScriptDisabled(
- callback_and_context->GetCallback(), v8::Object::New(isolate), 0, NULL);
+ callback, v8::Object::New(isolate), 0, NULL);
}
}
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698