| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index 0b39a436d3f9763fc72b89d201c2a0c36b0a2ad8..f7d15febb691504e726e8a082f73629f6507686c 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -5582,40 +5582,39 @@ static MaybeObject* HasLocalPropertyImplementation(Isolate* isolate,
|
|
|
|
|
| RUNTIME_FUNCTION(MaybeObject*, Runtime_HasLocalProperty) {
|
| - SealHandleScope shs(isolate);
|
| + HandleScope scope(isolate);
|
| ASSERT(args.length() == 2);
|
| - CONVERT_ARG_CHECKED(Name, key, 1);
|
| + CONVERT_ARG_HANDLE_CHECKED(Name, key, 1);
|
| + Handle<Object> object = args.at<Object>(0);
|
|
|
| uint32_t index;
|
| const bool key_is_array_index = key->AsArrayIndex(&index);
|
|
|
| - Object* obj = args[0];
|
| // Only JS objects can have properties.
|
| - if (obj->IsJSObject()) {
|
| - JSObject* object = JSObject::cast(obj);
|
| + if (object->IsJSObject()) {
|
| + Handle<JSObject> js_obj = Handle<JSObject>::cast(object);
|
| // Fast case: either the key is a real named property or it is not
|
| // an array index and there are no interceptors or hidden
|
| // prototypes.
|
| - if (object->HasRealNamedProperty(isolate, key)) {
|
| + if (JSObject::HasRealNamedProperty(js_obj, key)) {
|
| ASSERT(!isolate->has_scheduled_exception());
|
| return isolate->heap()->true_value();
|
| } else {
|
| RETURN_IF_SCHEDULED_EXCEPTION(isolate);
|
| }
|
| - Map* map = object->map();
|
| + Map* map = js_obj->map();
|
| if (!key_is_array_index &&
|
| !map->has_named_interceptor() &&
|
| !HeapObject::cast(map->prototype())->map()->is_hidden_prototype()) {
|
| return isolate->heap()->false_value();
|
| }
|
| // Slow case.
|
| - HandleScope scope(isolate);
|
| return HasLocalPropertyImplementation(isolate,
|
| Handle<JSObject>(object),
|
| Handle<Name>(key));
|
| - } else if (obj->IsString() && key_is_array_index) {
|
| + } else if (object->IsString() && key_is_array_index) {
|
| // Well, there is one exception: Handle [] on strings.
|
| - String* string = String::cast(obj);
|
| + Handle<String> string = Handle<String>::cast(object);
|
| if (index < static_cast<uint32_t>(string->length())) {
|
| return isolate->heap()->true_value();
|
| }
|
|
|