diff options
-rw-r--r-- | chrome/browser/extensions/execute_code_in_tab_function.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/extensions/execute_code_in_tab_function.cc b/chrome/browser/extensions/execute_code_in_tab_function.cc index 27ccf3f..a7ac42a 100644 --- a/chrome/browser/extensions/execute_code_in_tab_function.cc +++ b/chrome/browser/extensions/execute_code_in_tab_function.cc @@ -128,9 +128,12 @@ void ExecuteCodeInTabFunction::DidLoadFile(bool success, 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; } |