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

Side by Side Diff: src/execution.cc

Issue 179062: Fix the handling of termination exceptions thrown when creating error... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 3 months 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/debug.cc ('k') | src/messages.js » ('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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698