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

Unified Diff: content/shell/renderer/gc_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/gc_controller.cc
diff --git a/content/shell/renderer/gc_controller.cc b/content/shell/renderer/gc_controller.cc
index f8d3b0909c54cb16ce16a331724bc831a5e87eba..8e6d7b296577aa992b888613935eb4eff500c69c 100644
--- a/content/shell/renderer/gc_controller.cc
+++ b/content/shell/renderer/gc_controller.cc
@@ -27,6 +27,8 @@ void GCController::Install(blink::WebFrame* frame) {
gin::Handle<GCController> controller =
gin::CreateHandle(isolate, new GCController());
+ if (controller.IsEmpty())
+ return;
v8::Handle<v8::Object> global = context->Global();
global->Set(gin::StringToV8(isolate, "GCController"), controller.ToV8());
}
« no previous file with comments | « content/renderer/stats_collection_controller.cc ('k') | content/shell/renderer/test_runner/accessibility_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698