Bug 57266 - getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
Summary: getComputedStyle counterIncrement crash @ WebCore::counterToCSSValue
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Emil A Eklund
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 14:25 PDT by Emil A Eklund
Modified: 2011-03-29 03:32 PDT (History)
2 users (show)

See Also:


Attachments
Test case (138 bytes, text/html)
2011-03-28 14:26 PDT, Emil A Eklund
no flags Details
Patch (3.58 KB, patch)
2011-03-28 14:28 PDT, Emil A Eklund
darin: review-
darin: commit-queue-
Details | Formatted Diff | Diff
Patch (3.58 KB, patch)
2011-03-28 14:32 PDT, Emil A Eklund
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Emil A Eklund 2011-03-28 14:25:47 PDT
Chrome Version       : 11.0.696.16 beta
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL after other browsers where you have tested this issue:
Safari 5:
Firefox 3.x:
IE 7/8:

What steps will reproduce the problem?
  view the attached file "a.html" in chrome

What is the expected result?
  an alert popup with some value

What happens instead?
  "Aw, Snap!"


Downstream chrome bug: http://code.google.com/p/chromium/issues/detail?id=77665
Comment 1 Emil A Eklund 2011-03-28 14:25:59 PDT
This is a NULL pointer crash in WebCore::counterToCSSValue.
Comment 2 Emil A Eklund 2011-03-28 14:26:13 PDT
Created attachment 87205 [details]
Test case
Comment 3 Emil A Eklund 2011-03-28 14:28:46 PDT
Created attachment 87206 [details]
Patch
Comment 4 Darin Adler 2011-03-28 14:30:00 PDT
Comment on attachment 87206 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=87206&action=review

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:775
> +        return NULL;

We use 0, not NULL, in the WebKit project.
Comment 5 WebKit Review Bot 2011-03-28 14:30:03 PDT
Attachment 87206 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/fast..." exit_code: 1

Source/WebCore/css/CSSComputedStyleDeclaration.cpp:775:  Use 0 instead of NULL.  [readability/null] [5]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Emil A Eklund 2011-03-28 14:32:33 PDT
Created attachment 87209 [details]
Patch

Of course, my bad. Old habit, takes some time to retrain.
Comment 7 WebKit Commit Bot 2011-03-29 03:32:07 PDT
Comment on attachment 87209 [details]
Patch

Clearing flags on attachment: 87209

Committed r82222: <http://trac.webkit.org/changeset/82222>
Comment 8 WebKit Commit Bot 2011-03-29 03:32:10 PDT
All reviewed patches have been landed.  Closing bug.