| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 } | 1042 } |
| 1043 return Failure::Exception(); | 1043 return Failure::Exception(); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 | 1046 |
| 1047 bool Object::HasSpecificClassOf(String* name) { | 1047 bool Object::HasSpecificClassOf(String* name) { |
| 1048 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name); | 1048 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name); |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 | 1051 |
| 1052 MaybeObject* Object::GetElement(Isolate* isolate, uint32_t index) { | 1052 Handle<Object> Object::GetElement(Isolate* isolate, |
| 1053 Handle<Object> object, |
| 1054 uint32_t index) { |
| 1053 // GetElement can trigger a getter which can cause allocation. | 1055 // GetElement can trigger a getter which can cause allocation. |
| 1054 // This was not always the case. This ASSERT is here to catch | 1056 // This was not always the case. This ASSERT is here to catch |
| 1055 // leftover incorrect uses. | 1057 // leftover incorrect uses. |
| 1056 ASSERT(AllowHeapAllocation::IsAllowed()); | 1058 ASSERT(AllowHeapAllocation::IsAllowed()); |
| 1057 return GetElementWithReceiver(isolate, this, index); | 1059 CALL_HEAP_FUNCTION(isolate, |
| 1060 object->GetElementWithReceiver(isolate, *object, index), |
| 1061 Object); |
| 1058 } | 1062 } |
| 1059 | 1063 |
| 1060 | 1064 |
| 1061 Object* Object::GetElementNoExceptionThrown(Isolate* isolate, uint32_t index) { | 1065 Object* Object::GetElementNoExceptionThrown(Isolate* isolate, uint32_t index) { |
| 1062 MaybeObject* maybe = GetElementWithReceiver(isolate, this, index); | 1066 MaybeObject* maybe = GetElementWithReceiver(isolate, this, index); |
| 1063 ASSERT(!maybe->IsFailure()); | 1067 ASSERT(!maybe->IsFailure()); |
| 1064 Object* result = NULL; // Initialization to please compiler. | 1068 Object* result = NULL; // Initialization to please compiler. |
| 1065 maybe->ToObject(&result); | 1069 maybe->ToObject(&result); |
| 1066 return result; | 1070 return result; |
| 1067 } | 1071 } |
| (...skipping 5690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6758 #undef READ_UINT32_FIELD | 6762 #undef READ_UINT32_FIELD |
| 6759 #undef WRITE_UINT32_FIELD | 6763 #undef WRITE_UINT32_FIELD |
| 6760 #undef READ_SHORT_FIELD | 6764 #undef READ_SHORT_FIELD |
| 6761 #undef WRITE_SHORT_FIELD | 6765 #undef WRITE_SHORT_FIELD |
| 6762 #undef READ_BYTE_FIELD | 6766 #undef READ_BYTE_FIELD |
| 6763 #undef WRITE_BYTE_FIELD | 6767 #undef WRITE_BYTE_FIELD |
| 6764 | 6768 |
| 6765 } } // namespace v8::internal | 6769 } } // namespace v8::internal |
| 6766 | 6770 |
| 6767 #endif // V8_OBJECTS_INL_H_ | 6771 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |