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

Unified Diff: chrome/browser/sync/glue/extensions_activity_monitor.cc

Issue 2572853004: [MD Bookmarks] Fix segfault when calling chrome.bookmarks.remove(). (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/extensions_activity_monitor.cc
diff --git a/chrome/browser/sync/glue/extensions_activity_monitor.cc b/chrome/browser/sync/glue/extensions_activity_monitor.cc
index 60d2284a3915396162138052461cf0079aece541..bb48f56c3e06a586f464b1edfbef94cfb663e38d 100644
--- a/chrome/browser/sync/glue/extensions_activity_monitor.cc
+++ b/chrome/browser/sync/glue/extensions_activity_monitor.cc
@@ -47,6 +47,9 @@ void ExtensionsActivityMonitor::Observe(
DCHECK_EQ(extensions::NOTIFICATION_EXTENSION_BOOKMARKS_API_INVOKED, type);
const extensions::Extension* extension =
content::Source<const extensions::Extension>(source).ptr();
+ if (!extension)
+ return;
+
const extensions::BookmarksFunction* f =
content::Details<const extensions::BookmarksFunction>(details).ptr();
switch (f->histogram_value()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698