OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 UNREACHABLE(); | 209 UNREACHABLE(); |
210 return 0; | 210 return 0; |
211 } | 211 } |
212 | 212 |
213 | 213 |
214 Object* Object::GetPropertyWithDefinedGetter(Object* receiver, | 214 Object* Object::GetPropertyWithDefinedGetter(Object* receiver, |
215 JSFunction* getter) { | 215 JSFunction* getter) { |
216 HandleScope scope; | 216 HandleScope scope; |
217 Handle<JSFunction> fun(JSFunction::cast(getter)); | 217 Handle<JSFunction> fun(JSFunction::cast(getter)); |
218 Handle<Object> self(receiver); | 218 Handle<Object> self(receiver); |
219 #ifdef ENABLE_DEBUGGER_SUPPORT | |
220 // Handle stepping into a getter if step into is active. | |
221 if (Debug::StepInActive()) { | |
222 Debug::HandleStepIn(fun, Handle<Object>::null(), 0, false); | |
223 } | |
224 #endif | |
225 bool has_pending_exception; | 219 bool has_pending_exception; |
226 Handle<Object> result = | 220 Handle<Object> result = |
227 Execution::Call(fun, self, 0, NULL, &has_pending_exception); | 221 Execution::Call(fun, self, 0, NULL, &has_pending_exception); |
228 // Check for pending exception and return the result. | 222 // Check for pending exception and return the result. |
229 if (has_pending_exception) return Failure::Exception(); | 223 if (has_pending_exception) return Failure::Exception(); |
230 return *result; | 224 return *result; |
231 } | 225 } |
232 | 226 |
233 | 227 |
234 // Only deal with CALLBACKS and INTERCEPTOR | 228 // Only deal with CALLBACKS and INTERCEPTOR |
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1623 UNREACHABLE(); | 1617 UNREACHABLE(); |
1624 return 0; | 1618 return 0; |
1625 } | 1619 } |
1626 | 1620 |
1627 | 1621 |
1628 Object* JSObject::SetPropertyWithDefinedSetter(JSFunction* setter, | 1622 Object* JSObject::SetPropertyWithDefinedSetter(JSFunction* setter, |
1629 Object* value) { | 1623 Object* value) { |
1630 Handle<Object> value_handle(value); | 1624 Handle<Object> value_handle(value); |
1631 Handle<JSFunction> fun(JSFunction::cast(setter)); | 1625 Handle<JSFunction> fun(JSFunction::cast(setter)); |
1632 Handle<JSObject> self(this); | 1626 Handle<JSObject> self(this); |
1633 #ifdef ENABLE_DEBUGGER_SUPPORT | |
1634 // Handle stepping into a setter if step into is active. | |
1635 if (Debug::StepInActive()) { | |
1636 Debug::HandleStepIn(fun, Handle<Object>::null(), 0, false); | |
1637 } | |
1638 #endif | |
1639 bool has_pending_exception; | 1627 bool has_pending_exception; |
1640 Object** argv[] = { value_handle.location() }; | 1628 Object** argv[] = { value_handle.location() }; |
1641 Execution::Call(fun, self, 1, argv, &has_pending_exception); | 1629 Execution::Call(fun, self, 1, argv, &has_pending_exception); |
1642 // Check for pending exception and return the result. | 1630 // Check for pending exception and return the result. |
1643 if (has_pending_exception) return Failure::Exception(); | 1631 if (has_pending_exception) return Failure::Exception(); |
1644 return *value_handle; | 1632 return *value_handle; |
1645 } | 1633 } |
1646 | 1634 |
1647 | 1635 |
1648 void JSObject::LookupCallbackSetterInPrototypes(String* name, | 1636 void JSObject::LookupCallbackSetterInPrototypes(String* name, |
(...skipping 6098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7747 if (break_point_objects()->IsUndefined()) return 0; | 7735 if (break_point_objects()->IsUndefined()) return 0; |
7748 // Single beak point. | 7736 // Single beak point. |
7749 if (!break_point_objects()->IsFixedArray()) return 1; | 7737 if (!break_point_objects()->IsFixedArray()) return 1; |
7750 // Multiple break points. | 7738 // Multiple break points. |
7751 return FixedArray::cast(break_point_objects())->length(); | 7739 return FixedArray::cast(break_point_objects())->length(); |
7752 } | 7740 } |
7753 #endif | 7741 #endif |
7754 | 7742 |
7755 | 7743 |
7756 } } // namespace v8::internal | 7744 } } // namespace v8::internal |
OLD | NEW |