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

Unified Diff: src/api.cc

Issue 9724022: Add API call that identifies strings that are guaranteed (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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
Index: src/api.cc
===================================================================
--- src/api.cc (revision 11074)
+++ src/api.cc (working copy)
@@ -3694,6 +3694,15 @@
}
+bool String::MayContainNonAscii() const {
+ i::Handle<i::String> str = Utils::OpenHandle(this);
+ if (IsDeadCheck(str->GetIsolate(), "v8::String::MayContainNonAscii()")) {
+ return 0;
fschneider 2012/03/19 08:46:31 you mean "return false"?
Erik Corry 2012/03/19 09:51:02 Done.
+ }
+ return !str->HasOnlyAsciiChars();
+}
+
+
int String::WriteUtf8(char* buffer,
int capacity,
int* nchars_ref,
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698