Chromium Code Reviews
DescriptionSuppress definition of snprintf in port_chromium.h which conflicts with base::snprintf.
This definition breaks compile whenever a compilation unit happens to include string_util.h
before port_chromium.h (as the defined base::snprintf() doesn't match the callers
base::_snprintf() calls as replaced by the preprocessor)... This happened to work
before when string_util.h was included after as the definition would also come out as
base::_snprintf() thanks the preprocessor..!
The definition doesn't appear to be needed by anything but env_chromium.cc which can use
base::snprintf instead.
This was discovered while adding a new header to pending_task.h which made env_mojo.cc
hit a compile error:
src\third_party\leveldatabase\chromium_logger.h(46): error C2039: '_snprintf': is not a member of 'base'
src\base\trace_event\trace_event.h(1137): note: see declaration of 'base'
after much digging, the issue was discovered to be that the new header in pending_task.h transitively
caused env_mojo.cc to include string_util.h before port_chromium.h and triggered this issue.
BUG=649084
Committed: https://crrev.com/cf3416047e29d074bdc135488236bd72cbd7f97b
Cr-Commit-Position: refs/heads/master@{#421040}
Patch Set 1 : #
Messages
Total messages: 17 (11 generated)
|
||||||||||||||||||||||||||||