r125294 made RuleData consume less memory by replacing a pointer with an index encoded on 12 bits. This unfortunately breaks Chrome for Android when it is used with Adblock plus which injects a lot of CSS. This leads to blank pages on page load and is caused by an integer overflow when |m_selectorIndex| (encoded on 12 bits) is set.
You can probably steal a bit from RuleData::m_position without causing much trouble.
Yes, I'm uploading a patch doing this right now. Thanks for the quick response. The other approach could also be to use the least significant bit of |m_rule| which is a pointer in case |m_position| cannot be shrunk (should be fine IMO).
Created attachment 191896 [details] Patch
I've just uploaded a patch. FYI, here is the corresponding Chromium bug: https://code.google.com/p/chromium/issues/detail?id=172276.
Comment on attachment 191896 [details] Patch r=me We should look into the calculation of m_specificity at some point, it's very likely that it can be compressed to a much smaller value that won't have us scrambling for single bits like this.
Thanks guys, that was quick! I agree that things can probably be improved here although I'm not familiar with this code at all.
Comment on attachment 191896 [details] Patch Rejecting attachment 191896 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=webkit-commit-queue.appspot.com', '--bot-id=gce-cq-01', 'validate-changelog', '--non-interactive', 191896, '--port=chromium-xvfb']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue /mnt/git/webkit-commit-queue/Source/WebCore/ChangeLog neither lists a valid reviewer nor contains the string "Unreviewed" or "Rubber stamp" (case insensitive). Full output: http://webkit-commit-queue.appspot.com/results/17064151
Created attachment 191902 [details] Patch
Sorry guys for the missing 'Reviewed by' line. I have just uploaded an updated patch.
Comment on attachment 191902 [details] Patch Clearing flags on attachment: 191902 Committed r145034: <http://trac.webkit.org/changeset/145034>
All reviewed patches have been landed. Closing bug.