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

Unified Diff: content/shell/renderer/test_runner/gamepad_controller.cc

Issue 259993003: Make sure gin Handles exist before using them (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 6 years, 8 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: content/shell/renderer/test_runner/gamepad_controller.cc
diff --git a/content/shell/renderer/test_runner/gamepad_controller.cc b/content/shell/renderer/test_runner/gamepad_controller.cc
index 6affefb2f7434382206ffdc55d16ed393c6a3e52..f03651be770d09ca922a8d30869b25ad0a2fe931 100644
--- a/content/shell/renderer/test_runner/gamepad_controller.cc
+++ b/content/shell/renderer/test_runner/gamepad_controller.cc
@@ -68,6 +68,8 @@ void GamepadControllerBindings::Install(
gin::Handle<GamepadControllerBindings> bindings =
gin::CreateHandle(isolate, new GamepadControllerBindings(controller));
+ if (bindings.IsEmpty())
+ return;
v8::Handle<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "gamepadController"), bindings.ToV8());
}
« no previous file with comments | « content/shell/renderer/test_runner/event_sender.cc ('k') | content/shell/renderer/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698