| 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 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1167 | 1167 |
| 1168 bool Isolate::IsErrorObject(Handle<Object> obj) { | 1168 bool Isolate::IsErrorObject(Handle<Object> obj) { |
| 1169 if (!obj->IsJSObject()) return false; | 1169 if (!obj->IsJSObject()) return false; |
| 1170 | 1170 |
| 1171 String* error_key = | 1171 String* error_key = |
| 1172 *(factory()->LookupOneByteSymbol(STATIC_ASCII_VECTOR("$Error"))); | 1172 *(factory()->LookupOneByteSymbol(STATIC_ASCII_VECTOR("$Error"))); |
| 1173 Object* error_constructor = | 1173 Object* error_constructor = |
| 1174 js_builtins_object()->GetPropertyNoExceptionThrown(error_key); | 1174 js_builtins_object()->GetPropertyNoExceptionThrown(error_key); |
| 1175 | 1175 |
| 1176 for (Object* prototype = *obj; !prototype->IsNull(); | 1176 for (Object* prototype = *obj; !prototype->IsNull(); |
| 1177 prototype = prototype->GetPrototype()) { | 1177 prototype = prototype->GetPrototype(this)) { |
| 1178 if (!prototype->IsJSObject()) return false; | 1178 if (!prototype->IsJSObject()) return false; |
| 1179 if (JSObject::cast(prototype)->map()->constructor() == error_constructor) { | 1179 if (JSObject::cast(prototype)->map()->constructor() == error_constructor) { |
| 1180 return true; | 1180 return true; |
| 1181 } | 1181 } |
| 1182 } | 1182 } |
| 1183 return false; | 1183 return false; |
| 1184 } | 1184 } |
| 1185 | 1185 |
| 1186 | 1186 |
| 1187 void Isolate::DoThrow(Object* exception, MessageLocation* location) { | 1187 void Isolate::DoThrow(Object* exception, MessageLocation* location) { |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2285 | 2285 |
| 2286 #ifdef DEBUG | 2286 #ifdef DEBUG |
| 2287 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2287 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2288 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2288 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2289 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2289 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2290 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2290 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2291 #undef ISOLATE_FIELD_OFFSET | 2291 #undef ISOLATE_FIELD_OFFSET |
| 2292 #endif | 2292 #endif |
| 2293 | 2293 |
| 2294 } } // namespace v8::internal | 2294 } } // namespace v8::internal |
| OLD | NEW |