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

Unified Diff: content/renderer/dom_automation_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
« no previous file with comments | « chrome/renderer/net/net_error_page_controller.cc ('k') | content/renderer/memory_benchmarking_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/dom_automation_controller.cc
diff --git a/content/renderer/dom_automation_controller.cc b/content/renderer/dom_automation_controller.cc
index 33b074523664e7249daefcc9f5aafb18d78ca54d..13191d8bee6d4587acb33bbd9ea411ee516b3d96 100644
--- a/content/renderer/dom_automation_controller.cc
+++ b/content/renderer/dom_automation_controller.cc
@@ -33,6 +33,9 @@ void DomAutomationController::Install(RenderFrame* render_frame,
gin::Handle<DomAutomationController> controller =
gin::CreateHandle(isolate, new DomAutomationController(render_frame));
+ if (controller.IsEmpty())
+ return;
+
v8::Handle<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "domAutomationController"),
controller.ToV8());
« no previous file with comments | « chrome/renderer/net/net_error_page_controller.cc ('k') | content/renderer/memory_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698