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

Unified Diff: src/objects.h

Issue 2868046: Fix crash: handle all flat string types in regexp replace. (Closed)
Patch Set: Review fixes Created 10 years, 5 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
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index dc59d57f7fcc83b708484665d7b2298478e486a3..4a7dee6a836f9a9614d4b4032097db1274195a82 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4413,6 +4413,8 @@ class SeqString: public String {
// Each character in the AsciiString is an ascii character.
class SeqAsciiString: public SeqString {
public:
+ static const bool kHasAsciiEncoding = true;
+
// Dispatched behavior.
inline uint16_t SeqAsciiStringGet(int index);
inline void SeqAsciiStringSet(int index, uint16_t value);
@@ -4462,6 +4464,8 @@ class SeqAsciiString: public SeqString {
// Each character in the TwoByteString is a two-byte uint16_t.
class SeqTwoByteString: public SeqString {
public:
+ static const bool kHasAsciiEncoding = false;
+
// Dispatched behavior.
inline uint16_t SeqTwoByteStringGet(int index);
inline void SeqTwoByteStringSet(int index, uint16_t value);
@@ -4594,6 +4598,8 @@ class ExternalString: public String {
// ASCII string.
class ExternalAsciiString: public ExternalString {
public:
+ static const bool kHasAsciiEncoding = true;
+
typedef v8::String::ExternalAsciiStringResource Resource;
// The underlying resource.
@@ -4626,6 +4632,8 @@ class ExternalAsciiString: public ExternalString {
// encoded string.
class ExternalTwoByteString: public ExternalString {
public:
+ static const bool kHasAsciiEncoding = false;
+
typedef v8::String::ExternalStringResource Resource;
// The underlying string resource.
« no previous file with comments | « no previous file | src/runtime.cc » ('j') | src/runtime.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698