| Index: runtime/vm/object.cc
|
| diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
|
| index 33cb344bd4698ea7c22bb47507b844880f86de3f..02b05d549558c105ea73c78f47e940c39a3a1766 100644
|
| --- a/runtime/vm/object.cc
|
| +++ b/runtime/vm/object.cc
|
| @@ -20050,7 +20050,8 @@ RawString* String::SubString(const String& str,
|
| }
|
|
|
|
|
| -RawString* String::SubString(const String& str,
|
| +RawString* String::SubString(Thread* thread,
|
| + const String& str,
|
| intptr_t begin_index,
|
| intptr_t length,
|
| Heap::Space space) {
|
| @@ -20063,7 +20064,6 @@ RawString* String::SubString(const String& str,
|
| if (begin_index > str.Length()) {
|
| return String::null();
|
| }
|
| - String& result = String::Handle();
|
| bool is_one_byte_string = true;
|
| intptr_t char_size = str.CharSize();
|
| if (char_size == kTwoByteChar) {
|
| @@ -20074,6 +20074,8 @@ RawString* String::SubString(const String& str,
|
| }
|
| }
|
| }
|
| + REUSABLE_STRING_HANDLESCOPE(thread);
|
| + String& result = thread->StringHandle();
|
| if (is_one_byte_string) {
|
| result = OneByteString::New(length, space);
|
| } else {
|
|
|