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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 catcher.SetVerbose(false); | 149 catcher.SetVerbose(false); |
150 catcher.SetCaptureMessage(false); | 150 catcher.SetCaptureMessage(false); |
151 | 151 |
152 Handle<Object> result = Invoke(false, func, receiver, argc, args, | 152 Handle<Object> result = Invoke(false, func, receiver, argc, args, |
153 caught_exception); | 153 caught_exception); |
154 | 154 |
155 if (*caught_exception) { | 155 if (*caught_exception) { |
156 ASSERT(catcher.HasCaught()); | 156 ASSERT(catcher.HasCaught()); |
157 ASSERT(Top::has_pending_exception()); | 157 ASSERT(Top::has_pending_exception()); |
158 ASSERT(Top::external_caught_exception()); | 158 ASSERT(Top::external_caught_exception()); |
159 bool is_bottom_call = HandleScopeImplementer::instance()->CallDepthIsZero(); | 159 if (Top::pending_exception() == Heap::termination_exception()) { |
160 Top::OptionalRescheduleException(is_bottom_call, true); | 160 result = Factory::termination_exception(); |
161 result = v8::Utils::OpenHandle(*catcher.Exception()); | 161 } else { |
| 162 result = v8::Utils::OpenHandle(*catcher.Exception()); |
| 163 } |
| 164 Top::OptionalRescheduleException(true); |
162 } | 165 } |
163 | 166 |
164 ASSERT(!Top::has_pending_exception()); | 167 ASSERT(!Top::has_pending_exception()); |
165 ASSERT(!Top::external_caught_exception()); | 168 ASSERT(!Top::external_caught_exception()); |
166 return result; | 169 return result; |
167 } | 170 } |
168 | 171 |
169 | 172 |
170 Handle<Object> Execution::GetFunctionDelegate(Handle<Object> object) { | 173 Handle<Object> Execution::GetFunctionDelegate(Handle<Object> object) { |
171 ASSERT(!object->IsJSFunction()); | 174 ASSERT(!object->IsJSFunction()); |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 // All allocation spaces other than NEW_SPACE have the same effect. | 685 // All allocation spaces other than NEW_SPACE have the same effect. |
683 Heap::CollectAllGarbage(false); | 686 Heap::CollectAllGarbage(false); |
684 return v8::Undefined(); | 687 return v8::Undefined(); |
685 } | 688 } |
686 | 689 |
687 | 690 |
688 static GCExtension kGCExtension; | 691 static GCExtension kGCExtension; |
689 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); | 692 v8::DeclareExtension kGCExtensionDeclaration(&kGCExtension); |
690 | 693 |
691 } } // namespace v8::internal | 694 } } // namespace v8::internal |
OLD | NEW |