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

Unified Diff: src/uri.js

Issue 559913002: Rename ascii to one-byte where applicable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/jsregexp.cc ('K') | « src/uri.h ('k') | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/uri.js
diff --git a/src/uri.js b/src/uri.js
index 4b7d1f7e00d09a2ed24cfa418ff23ceec93f80b7..88ea75f82d49d376408158e7829cd7ff749fadf7 100644
--- a/src/uri.js
+++ b/src/uri.js
@@ -217,13 +217,13 @@
var index = 0;
var k = 0;
- // Optimistically assume ascii string.
+ // Optimistically assume one-byte string.
for ( ; k < uriLength; k++) {
var code = uri.charCodeAt(k);
if (code == 37) { // '%'
if (k + 2 >= uriLength) throw new $URIError("URI malformed");
var cc = URIHexCharsToCharCode(uri.charCodeAt(k+1), uri.charCodeAt(k+2));
- if (cc >> 7) break; // Assumption wrong, two byte string.
+ if (cc >> 7) break; // Assumption wrong, two-byte string.
if (reserved(cc)) {
%_OneByteSeqStringSetChar(one_byte, index++, 37); // '%'.
%_OneByteSeqStringSetChar(one_byte, index++, uri.charCodeAt(k+1));
@@ -233,7 +233,7 @@
}
k += 2;
} else {
- if (code > 0x7f) break; // Assumption wrong, two byte string.
+ if (code > 0x7f) break; // Assumption wrong, two-byte string.
%_OneByteSeqStringSetChar(one_byte, index++, code);
}
}
« src/jsregexp.cc ('K') | « src/uri.h ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698