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

Unified Diff: chrome/browser/extensions/execute_code_in_tab_function.cc

Issue 1238001: Avoid calling ExecuteCode() on a NULL TabContents. The problem was an extra s... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix indentation Created 10 years, 9 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/execute_code_in_tab_function.cc
===================================================================
--- chrome/browser/extensions/execute_code_in_tab_function.cc (revision 42300)
+++ chrome/browser/extensions/execute_code_in_tab_function.cc (working copy)
@@ -128,9 +128,12 @@
bool ExecuteCodeInTabFunction::Execute(const std::string& code_string) {
TabContents* contents = NULL;
Browser* browser = NULL;
- if (!ExtensionTabUtil::GetTabById(execute_tab_id_, profile(),
- include_incognito(), &browser, NULL,
- &contents, NULL) && contents && browser) {
+
+ bool success = ExtensionTabUtil::GetTabById(
+ execute_tab_id_, profile(), include_incognito(), &browser, NULL,
+ &contents, NULL) && contents && browser;
+
+ if (!success) {
SendResponse(false);
return false;
}
« 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