| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 7e7d6d5d585759f01f74b5f9cfef0b5f979669d8..3fd5f6dc043ba141edf3a2092ac91e27637a334b 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -2417,11 +2417,9 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateJSGeneratorObject) {
|
|
|
| MUST_USE_RESULT static MaybeObject* CharFromCode(Isolate* isolate,
|
| Object* char_code) {
|
| - uint32_t code;
|
| - if (char_code->ToArrayIndex(&code)) {
|
| - if (code <= 0xffff) {
|
| - return isolate->heap()->LookupSingleCharacterStringFromCode(code);
|
| - }
|
| + if (char_code->IsNumber()) {
|
| + return isolate->heap()->LookupSingleCharacterStringFromCode(
|
| + NumberToUint32(char_code) & 0xffff);
|
| }
|
| return isolate->heap()->empty_string();
|
| }
|
|
|