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

Unified Diff: content/shell/renderer/test_runner/test_runner.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/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 692b4d2548a1789bd69b92550a84915768955b7a..e308455475b079d1d389fdc239cc6429f5276946 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -284,6 +284,8 @@ void TestRunnerBindings::Install(base::WeakPtr<TestRunner> runner,
gin::Handle<TestRunnerBindings> bindings =
gin::CreateHandle(isolate, new TestRunnerBindings(runner));
+ if (bindings.IsEmpty())
+ return;
v8::Handle<v8::Object> global = context->Global();
v8::Handle<v8::Value> v8_bindings = bindings.ToV8();
global->Set(gin::StringToV8(isolate, "testRunner"), v8_bindings);
« no previous file with comments | « content/shell/renderer/test_runner/gamepad_controller.cc ('k') | content/shell/renderer/test_runner/text_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698