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

Unified Diff: content/renderer/memory_benchmarking_extension.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 | « content/renderer/dom_automation_controller.cc ('k') | content/renderer/skia_benchmarking_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/memory_benchmarking_extension.cc
diff --git a/content/renderer/memory_benchmarking_extension.cc b/content/renderer/memory_benchmarking_extension.cc
index b8dd4b479e1575ad3518648a7a508bec17a122fb..f6b9c7df375faeafedd419bb35deb8c3ded3848b 100644
--- a/content/renderer/memory_benchmarking_extension.cc
+++ b/content/renderer/memory_benchmarking_extension.cc
@@ -32,6 +32,9 @@ void MemoryBenchmarkingExtension::Install(blink::WebFrame* frame) {
v8::Context::Scope context_scope(context);
gin::Handle<MemoryBenchmarkingExtension> controller =
gin::CreateHandle(isolate, new MemoryBenchmarkingExtension());
+ if (controller.IsEmpty())
+ return;
+
v8::Handle<v8::Object> global = context->Global();
v8::Handle<v8::Object> chrome =
global->Get(gin::StringToV8(isolate, "chrome"))->ToObject();
« no previous file with comments | « content/renderer/dom_automation_controller.cc ('k') | content/renderer/skia_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698