| Index: runtime/vm/object.h
|
| ===================================================================
|
| --- runtime/vm/object.h (revision 41200)
|
| +++ runtime/vm/object.h (working copy)
|
| @@ -5841,8 +5841,9 @@
|
| class OneByteString : public AllStatic {
|
| public:
|
| static uint16_t CharAt(const String& str, intptr_t index) {
|
| - NoGCScope no_gc;
|
| - return *CharAddr(str, index);
|
| + ASSERT((index >= 0) && (index < str.Length()));
|
| + ASSERT(str.IsOneByteString());
|
| + return raw_ptr(str)->data()[index];
|
| }
|
|
|
| static void SetCharAt(const String& str, intptr_t index, uint8_t code_unit) {
|
|
|