| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is to avoid bugs like http://code.google.com/p/chromium/issues/detail?id=118064 in the future. Positional parameters are supported by the VC++ runtime via the set of "_p" flavored printf-like routines. MSDN claims that "By default the positional functions behave identically to the non position ones, if no positional formatting is present."
There is a little difference that require some attention though. Currently base::vsnprintf and base::vswprintf wrappers use "_s" functions (so called "security enhanced versions"). Judging by looking at the CRT code, _p functions implement the same checks as _s ones do. The base wrappers call the CRT routines so that count == (sizeOfBuffer - 1). This reduces most of the additional code in _vsnprintf_s (comparing to _vsprintf_p) to no-op. Namely:
1. When truncation happens the tail of the buffer is filled with a pattern:
_SECURECRT__FILL_STRING(string, sizeInBytes, count + 1);
This does not happen in our case because sizeInBytes == count + 1.
2. The special case check shown below was never true since sizeInBytes != count in our case:
if (count == 0 && string == NULL && sizeInBytes == 0)
3. The following checks in _vsnprintf_s are also implemented in _vsnprintf_helper:
_VALIDATE_RETURN(format != NULL, EINVAL, -1);
_VALIDATE_RETURN(string != NULL && sizeInBytes > 0, EINVAL, -1);
The only remaining difference between _vsnprintf_s and _vsprintf_p is that the former NULL-terminates the buffer and fills the rest a pattern if _vsnprintf_helper failed because of any reason other than truncation:
string[0] = 0;
_SECURECRT__FILL_STRING(string, sizeInBytes, 1);
This CL write NULL to the end of the buffer in any error case (truncation or other reason).
Review URL: http://codereview.chromium.org/9702002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127788 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=50273
TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux
TBR: erg
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
adds a Translate method to the renderer.
On invocation this method triggers a traversal of the DOM page to retrieve the text nodes. The text node contents are then sent to the browser for actual translation (at this point, we just up-case the text for testing purpose).
The browser sends back the translated text to the renderer that replace the DOM text node values with the translated text.
BUG=None
TEST=Run the unit-tests.
Review URL: http://codereview.chromium.org/547013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36258 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The goal of this change is to *not* make any behavioral change, but to
instead just get all the plugin-related files linking on Linux with
a bunch of NOTIMPLEMENTED()s in the appropriate places. It's enormous
enough already without any refactorings or new features.
Changes include:
- Lots of gcc warning fixes.
- Use portable replacements for Windows-specific functions (_strdup, etc.).
- Use TransportDIB instead of just shared memory in the plugin messaging.
Note that this is not fleshed out on Linux and on Windows it just hacks
in the existing handles so there should be no functional change.
- Fix --plugin-launcher to use cross-platform APIs.
Review URL: http://codereview.chromium.org/79020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14338 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Normalize end of file newlines in base/. All files end in a single newline.
Review URL: http://codereview.chromium.org/42011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
these are not all parts (about a half), but still something
BUG=1949
Patch from Paweł Hajdan jr <phajdan.jr@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2534 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
for wchar_t* fields.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@849 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@527 0039d316-1c4b-4281-b951-d872f2087c98
|
|
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98
|