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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 } | 192 } |
193 | 193 |
194 // __defineGetter__ callback | 194 // __defineGetter__ callback |
195 if (structure->IsFixedArray()) { | 195 if (structure->IsFixedArray()) { |
196 Object* getter = FixedArray::cast(structure)->get(kGetterIndex); | 196 Object* getter = FixedArray::cast(structure)->get(kGetterIndex); |
197 if (getter->IsJSFunction()) { | 197 if (getter->IsJSFunction()) { |
198 HandleScope scope; | 198 HandleScope scope; |
199 Handle<JSFunction> fun(JSFunction::cast(getter)); | 199 Handle<JSFunction> fun(JSFunction::cast(getter)); |
200 Handle<Object> self(receiver); | 200 Handle<Object> self(receiver); |
201 bool has_pending_exception; | 201 bool has_pending_exception; |
202 Object* result = | 202 Handle<Object> result = |
203 *Execution::Call(fun, self, 0, NULL, &has_pending_exception); | 203 Execution::Call(fun, self, 0, NULL, &has_pending_exception); |
204 // Check for pending exception and return the result. | 204 // Check for pending exception and return the result. |
205 if (has_pending_exception) return Failure::Exception(); | 205 if (has_pending_exception) return Failure::Exception(); |
206 return result; | 206 return *result; |
207 } | 207 } |
208 // Getter is not a function. | 208 // Getter is not a function. |
209 return Heap::undefined_value(); | 209 return Heap::undefined_value(); |
210 } | 210 } |
211 | 211 |
212 UNREACHABLE(); | 212 UNREACHABLE(); |
213 return 0; | 213 return 0; |
214 } | 214 } |
215 | 215 |
216 | 216 |
(...skipping 6703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6920 // No break point. | 6920 // No break point. |
6921 if (break_point_objects()->IsUndefined()) return 0; | 6921 if (break_point_objects()->IsUndefined()) return 0; |
6922 // Single beak point. | 6922 // Single beak point. |
6923 if (!break_point_objects()->IsFixedArray()) return 1; | 6923 if (!break_point_objects()->IsFixedArray()) return 1; |
6924 // Multiple break points. | 6924 // Multiple break points. |
6925 return FixedArray::cast(break_point_objects())->length(); | 6925 return FixedArray::cast(break_point_objects())->length(); |
6926 } | 6926 } |
6927 | 6927 |
6928 | 6928 |
6929 } } // namespace v8::internal | 6929 } } // namespace v8::internal |
OLD | NEW |