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

Unified Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 2839403005: check if webcontents are available at tabs_api (Closed)
Patch Set: Created 3 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 | « 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/extensions/api/tabs/tabs_api.cc
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index a9ccfbb2cfeec649ab03b3f3230f17bb225eedfb..928175910b0f15332d17d3f5169d3c50d6e5874b 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -939,6 +939,10 @@ ExtensionFunction::ResponseAction TabsQueryFunction::Run() {
if (index > -1 && i != index)
continue;
+ if (!web_contents) {
+ continue;
+ }
+
if (!MatchesBool(params->query_info.highlighted.get(),
tab_strip->IsTabSelected(i))) {
continue;
« 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