| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 if (IsJSObject()) return JSObject::cast(this)->Lookup(name, result); | 130 if (IsJSObject()) return JSObject::cast(this)->Lookup(name, result); |
| 131 Object* holder = NULL; | 131 Object* holder = NULL; |
| 132 Context* global_context = Top::context()->global_context(); | 132 Context* global_context = Top::context()->global_context(); |
| 133 if (IsString()) { | 133 if (IsString()) { |
| 134 holder = global_context->string_function()->instance_prototype(); | 134 holder = global_context->string_function()->instance_prototype(); |
| 135 } else if (IsNumber()) { | 135 } else if (IsNumber()) { |
| 136 holder = global_context->number_function()->instance_prototype(); | 136 holder = global_context->number_function()->instance_prototype(); |
| 137 } else if (IsBoolean()) { | 137 } else if (IsBoolean()) { |
| 138 holder = global_context->boolean_function()->instance_prototype(); | 138 holder = global_context->boolean_function()->instance_prototype(); |
| 139 } | 139 } |
| 140 #ifdef DEBUG | |
| 141 // Used to track outstanding bug #1308895. | |
| 142 // TODO(1308895) Remove when bug is fixed. | |
| 143 if (holder == NULL) { | |
| 144 PrintF("\nName being looked up: "); | |
| 145 name->Print(); | |
| 146 PrintF("\nThis (object name is looked up in: "); | |
| 147 this->Print(); | |
| 148 if (IsScript()) { | |
| 149 PrintF("IsScript() returns true.\n"); | |
| 150 } | |
| 151 } | |
| 152 #endif | |
| 153 ASSERT(holder != NULL); // cannot handle null or undefined. | 140 ASSERT(holder != NULL); // cannot handle null or undefined. |
| 154 JSObject::cast(holder)->Lookup(name, result); | 141 JSObject::cast(holder)->Lookup(name, result); |
| 155 } | 142 } |
| 156 | 143 |
| 157 | 144 |
| 158 Object* Object::GetPropertyWithReceiver(Object* receiver, | 145 Object* Object::GetPropertyWithReceiver(Object* receiver, |
| 159 String* name, | 146 String* name, |
| 160 PropertyAttributes* attributes) { | 147 PropertyAttributes* attributes) { |
| 161 LookupResult result; | 148 LookupResult result; |
| 162 Lookup(name, &result); | 149 Lookup(name, &result); |
| (...skipping 6266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6429 // No break point. | 6416 // No break point. |
| 6430 if (break_point_objects()->IsUndefined()) return 0; | 6417 if (break_point_objects()->IsUndefined()) return 0; |
| 6431 // Single beak point. | 6418 // Single beak point. |
| 6432 if (!break_point_objects()->IsFixedArray()) return 1; | 6419 if (!break_point_objects()->IsFixedArray()) return 1; |
| 6433 // Multiple break points. | 6420 // Multiple break points. |
| 6434 return FixedArray::cast(break_point_objects())->length(); | 6421 return FixedArray::cast(break_point_objects())->length(); |
| 6435 } | 6422 } |
| 6436 | 6423 |
| 6437 | 6424 |
| 6438 } } // namespace v8::internal | 6425 } } // namespace v8::internal |
| OLD | NEW |