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

Issue 1238001: Avoid calling ExecuteCode() on a NULL TabContents. The problem was an extra s... (Closed)

Created:
10 years, 9 months ago by eroman
Modified:
9 years, 6 months ago
Reviewers:
Matt Perry
CC:
chromium-reviews, Aaron Boodman, Erik does not do reviews, pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Avoid calling ExecuteCode() on a NULL TabContents. The problem was an extra set of parens were missing, so the "not" operator only applied to the GetTabById() return value. BUG=34778 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=42421

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address mpcomplete's comment #

Patch Set 3 : Fix indentation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -3 lines) Patch
M chrome/browser/extensions/execute_code_in_tab_function.cc View 1 2 1 chunk +6 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
eroman
10 years, 9 months ago (2010-03-23 23:29:08 UTC) #1
Matt Perry
LGTM. Small optional suggestion. http://codereview.chromium.org/1238001/diff/1/2 File chrome/browser/extensions/execute_code_in_tab_function.cc (right): http://codereview.chromium.org/1238001/diff/1/2#newcode134 chrome/browser/extensions/execute_code_in_tab_function.cc:134: &contents, NULL); I'd toss the ...
10 years, 9 months ago (2010-03-23 23:34:10 UTC) #2
eroman
10 years, 9 months ago (2010-03-24 00:23:57 UTC) #3
http://codereview.chromium.org/1238001/diff/1/2
File chrome/browser/extensions/execute_code_in_tab_function.cc (right):

http://codereview.chromium.org/1238001/diff/1/2#newcode134
chrome/browser/extensions/execute_code_in_tab_function.cc:134: &contents, NULL);
On 2010/03/23 23:34:10, Matt Perry wrote:
> I'd toss the "&& contents && browser" check into the bool, so the if is just
"if
> (!success)"

Done.

Powered by Google App Engine
This is Rietveld 408576698