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

Issue 2607993002: Move some sniffer arrays to read-only data segment (Closed)

Created:
3 years, 11 months ago by brucedawson
Modified:
3 years, 11 months ago
Reviewers:
asanka
CC:
cbentzel+watch_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move some sniffer arrays to read-only data segment Due to a quirk in VC++ it is easy to accidentally prevent a const global array from being placed in the read-only data segment. This change removes some should-be-harmless 'const' keywords to work around this quirk and move ~2,500 bytes to the .rdata (read-only) data segment across chrome.dll and chrome_child.dll. The arrays affected include kMagicNumbers, kExtraMagicNumbers, kSniffableTags, kOfficeExtensionTypes, and a few others. VC++ bug is filed here: https://connect.microsoft.com/VisualStudio/feedback/details/3117602 Other instances of this quirk are also being worked around. BUG=677351 Committed: https://crrev.com/40b53de7f19c627cca389d0904916ba81af58924 Cr-Commit-Position: refs/heads/master@{#441007}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -4 lines) Patch
M net/base/mime_sniffer.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (9 generated)
brucedawson
Another place where *removing* const lets VC++ move data to the read-only data segment, for ...
3 years, 11 months ago (2016-12-29 22:54:22 UTC) #5
asanka
lgtm
3 years, 11 months ago (2016-12-29 23:03:38 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2607993002/1
3 years, 11 months ago (2016-12-29 23:38:54 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
3 years, 11 months ago (2016-12-29 23:54:13 UTC) #12
commit-bot: I haz the power
3 years, 11 months ago (2017-01-02 15:53:52 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/40b53de7f19c627cca389d0904916ba81af58924
Cr-Commit-Position: refs/heads/master@{#441007}

Powered by Google App Engine
This is Rietveld 408576698