diff options
Diffstat (limited to 'deps/v8/src/unicode.h')
-rw-r--r-- | deps/v8/src/unicode.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/deps/v8/src/unicode.h b/deps/v8/src/unicode.h index 94ab1b4c1e..91b16c9f35 100644 --- a/deps/v8/src/unicode.h +++ b/deps/v8/src/unicode.h @@ -201,6 +201,7 @@ class CharacterStream { protected: virtual void FillBuffer() = 0; + virtual bool BoundsCheck(unsigned offset) = 0; // The number of characters left in the current buffer unsigned remaining_; // The current offset within the buffer @@ -228,6 +229,9 @@ class InputBuffer : public CharacterStream { InputBuffer() { } explicit InputBuffer(Input input) { Reset(input); } virtual void FillBuffer(); + virtual bool BoundsCheck(unsigned offset) { + return (buffer_ != util_buffer_) || (offset < kSize); + } // A custom offset that can be used by the string implementation to // mark progress within the encoded string. |