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

Unified Diff: src/api.cc

Issue 1594017: Flatten before String::WriteUtf8 (Closed)
Patch Set: Add isDeadCheck and isFlat tests Created 10 years, 8 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
diff --git a/src/api.cc b/src/api.cc
index 2100480e85864356f1f6c04cfaee13736eede544..7c196557267e2b947d09195402382ed2b1e0d28a 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -2727,6 +2727,13 @@ int String::Write(uint16_t* buffer, int start, int length) const {
}
+void v8::String::Flatten() {
+ if (IsDeadCheck("v8::String::Flatten()")) return;
+ i::Handle<i::String> str = Utils::OpenHandle(this);
+ i::FlattenString(str);
+}
+
+
bool v8::String::IsExternal() const {
EnsureInitialized("v8::String::IsExternal()");
i::Handle<i::String> str = Utils::OpenHandle(this);
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-strings.cc » ('j') | test/cctest/test-strings.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698