| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index b9dc4181c50b0a10d79bf7af43275089dbf0c47b..3a9b6fba0239b99df0726b7ff8a6bf902898a1fc 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -4800,11 +4800,15 @@ MaybeObject* Runtime::GetElementOrCharAt(Isolate* isolate,
|
| if (!result->IsUndefined()) return *result;
|
| }
|
|
|
| + Handle<Object> result;
|
| if (object->IsString() || object->IsNumber() || object->IsBoolean()) {
|
| - return object->GetPrototype(isolate)->GetElement(isolate, index);
|
| + Handle<Object> proto(object->GetPrototype(isolate), isolate);
|
| + result = Object::GetElement(isolate, proto, index);
|
| + } else {
|
| + result = Object::GetElement(isolate, object, index);
|
| }
|
| -
|
| - return object->GetElement(isolate, index);
|
| + RETURN_IF_EMPTY_HANDLE(isolate, result);
|
| + return *result;
|
| }
|
|
|
|
|
| @@ -5982,7 +5986,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArgumentsProperty) {
|
| if (index < n) {
|
| return frame->GetParameter(index);
|
| } else {
|
| - return isolate->initial_object_prototype()->GetElement(isolate, index);
|
| + Handle<Object> initial_prototype(isolate->initial_object_prototype());
|
| + Handle<Object> result =
|
| + Object::GetElement(isolate, initial_prototype, index);
|
| + RETURN_IF_EMPTY_HANDLE(isolate, result);
|
| + return *result;
|
| }
|
| }
|
|
|
| @@ -8826,6 +8834,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_Apply) {
|
|
|
| for (int i = 0; i < argc; ++i) {
|
| argv[i] = Object::GetElement(isolate, arguments, offset + i);
|
| + RETURN_IF_EMPTY_HANDLE(isolate, argv[i]);
|
| }
|
|
|
| bool threw;
|
| @@ -13689,14 +13698,14 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetLanguageTagVariants) {
|
| Handle<Name> base =
|
| isolate->factory()->NewStringFromAscii(CStrVector("base"));
|
| for (unsigned int i = 0; i < length; ++i) {
|
| - MaybeObject* maybe_string = input->GetElement(isolate, i);
|
| - Object* locale_id;
|
| - if (!maybe_string->ToObject(&locale_id) || !locale_id->IsString()) {
|
| + Handle<Object> locale_id = Object::GetElement(isolate, input, i);
|
| + RETURN_IF_EMPTY_HANDLE(isolate, locale_id);
|
| + if (!locale_id->IsString()) {
|
| return isolate->Throw(isolate->heap()->illegal_argument_string());
|
| }
|
|
|
| v8::String::Utf8Value utf8_locale_id(
|
| - v8::Utils::ToLocal(Handle<String>(String::cast(locale_id))));
|
| + v8::Utils::ToLocal(Handle<String>::cast(locale_id)));
|
|
|
| UErrorCode error = U_ZERO_ERROR;
|
|
|
|
|