Bug 35771 - [chromium] WebDocument:applicationID() crashes on <meta> tag with no http-equiv attribute
Summary: [chromium] WebDocument:applicationID() crashes on <meta> tag with no http-equ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: John Gregg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-04 15:27 PST by John Gregg
Modified: 2010-03-04 21:52 PST (History)
4 users (show)

See Also:


Attachments
patch (1.42 KB, patch)
2010-03-04 15:58 PST, John Gregg
no flags Details | Formatted Diff | Diff
fix style warning (1.46 KB, patch)
2010-03-04 16:25 PST, John Gregg
fishd: review-
Details | Formatted Diff | Diff
removing {}s (1.48 KB, patch)
2010-03-04 16:48 PST, John Gregg
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Gregg 2010-03-04 15:27:58 PST
if all the other checks fail, and there is a meta tag with no http-equiv attribute, the code calls .lower() on null.

see also http://code.google.com/p/chromium/issues/detail?id=34961 for repro steps using chrome.
Comment 1 John Gregg 2010-03-04 15:58:26 PST
Created attachment 50061 [details]
patch
Comment 2 WebKit Review Bot 2010-03-04 16:04:20 PST
Attachment 50061 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/chromium/src/WebDocument.cpp:152:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 John Gregg 2010-03-04 16:25:14 PST
Created attachment 50062 [details]
fix style warning
Comment 4 Darin Fisher (:fishd, Google) 2010-03-04 16:38:14 PST
Comment on attachment 50062 [details]
fix style warning

Can we please just remove WebDocument::applicationID.  As I mentioned to Aaron,
it doesn't belong here and can be implemented purely in terms of WebKit APIs.
Comment 5 Darin Fisher (:fishd, Google) 2010-03-04 16:39:22 PST
Comment on attachment 50062 [details]
fix style warning

> Index: WebKit/chromium/src/WebDocument.cpp
> +        if (element->hasAttribute("http-equiv")
> +            && element->getAttribute("http-equiv").lower() == kChromeApplicationHeader) {
>              return element->getAttribute("value");
>          }

nit: there should be no brackets around single line statements
Comment 6 Aaron Boodman 2010-03-04 16:42:14 PST
Darin, I knew you'd say that.

I am going to start pulling it out soon. Can johnnyg just fix this immediate
issue in the meantime?
Comment 7 John Gregg 2010-03-04 16:47:07 PST
Because notifications are hooked up to applicationID() already, this is causing real crashes when people use notifications... so i'd rather not wait for a large refactor to fix that.
Comment 8 John Gregg 2010-03-04 16:48:31 PST
Created attachment 50065 [details]
removing {}s

well I didn't put the braces there but I can remove them...
Comment 9 Darin Fisher (:fishd, Google) 2010-03-04 20:09:38 PST
Sorry to give you a hard time about the applicationID thing.  I would have r+'d the patch before if it didn't have the style issue.
Comment 10 WebKit Commit Bot 2010-03-04 21:52:20 PST
Comment on attachment 50065 [details]
removing {}s

Clearing flags on attachment: 50065

Committed r55571: <http://trac.webkit.org/changeset/55571>
Comment 11 WebKit Commit Bot 2010-03-04 21:52:25 PST
All reviewed patches have been landed.  Closing bug.