Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: src/objects.cc

Issue 9114: Do not put failures in handles.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/messages.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/messages.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698