Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-typed-om] Fix DCHECK when creating a CSSUnitValue an empty unit. #9965

Merged
merged 1 commit into from
Mar 13, 2018

Commits on Mar 13, 2018

  1. [css-typed-om] Fix DCHECK when creating a CSSUnitValue an empty unit.

    When we create a CSSUnitValue with '' as the unit, we hit a DCHECK
    in the unit trie code because the length is 0. This is because we don't
    correctly reject the empty string as an invalid unit.
    
    In this patch we fix this. Interestingly, we already have a test to
    assert that using an empty unit throws type error. However the test used
    an incorrect variable name, causing it to throw a TypeError anyway,
    so our tests would've passed no matter what.
    
    Bug: 820905
    Change-Id: I72ab5e4010d892042b2cfddf1014ab79d04a846d
    Reviewed-on: https://chromium-review.googlesource.com/958624
    Reviewed-by: nainar <nainar@chromium.org>
    Commit-Queue: Darren Shen <shend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#542693}
    darrnshn authored and chromium-wpt-export-bot committed Mar 13, 2018
    Configuration menu
    Copy the full SHA
    b6c48f3 View commit details
    Browse the repository at this point in the history