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

Unified Diff: src/objects-debug.cc

Issue 8568013: Introduce read buffer for external strings when using charAt (ia32). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 9 years, 1 month 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
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 64bda9473f6ca4d98232046094c5faf560d0f97e..c3773369e9cdc90571c8325edb997d54891ef4bc 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -380,6 +380,8 @@ void String::StringVerify() {
ConsString::cast(this)->ConsStringVerify();
} else if (IsSlicedString()) {
SlicedString::cast(this)->SlicedStringVerify();
+ } else if (IsExternalString()) {
+ ExternalString::cast(this)->ExternalStringVerify();
}
}
@@ -404,6 +406,15 @@ void SlicedString::SlicedStringVerify() {
}
+void ExternalString::ExternalStringVerify() {
+ if (IsBuffered()) {
+ CHECK(length() >= kMinBufferedStringLength);
+ int index = buffer_index();
+ CHECK(index == kInvalidBufferIndex || (index >= 0 && index < length()));
+ }
+}
+
+
void JSFunction::JSFunctionVerify() {
CHECK(IsJSFunction());
VerifyObjectField(kPrototypeOrInitialMapOffset);
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698