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

Unified Diff: chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc

Issue 708713003: Don't crash when granting permissions to active tab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
diff --git a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
index 8640d30fc66354ea1421f660fbca6f179bad5efb..b8576957a273f8e73fb910ec507ebe2fc8597eca 100644
--- a/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
+++ b/chrome/renderer/extensions/chrome_extensions_dispatcher_delegate.cc
@@ -307,11 +307,12 @@ void ChromeExtensionsDispatcherDelegate::UpdateTabSpecificPermissions(
const std::string& extension_id,
const extensions::URLPatternSet& origin_set) {
content::RenderView* view = extensions::TabFinder::Find(tab_id);
+ if (!view)
+ return;
// For now, the message should only be sent to the render view that contains
not at google - send to devlin 2014/11/12 16:28:09 Was this actually crashing before? The comment ind
msimonides 2014/11/13 17:13:20 Unfortunately I'm unable to reproduce the crash, w
not at google - send to devlin 2014/11/13 18:17:37 Good question. I'm seeing crashes on line 312, GUR
// the target tab. This may change. Either way, if this is the target tab it
// gives us the chance to check against the URL to avoid races.
- DCHECK(view);
GURL active_url(view->GetWebView()->mainFrame()->document().url());
if (active_url != url)
return;
« 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