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

Side by Side Diff: src/execution.cc

Issue 946973004: Revert of Correctly propagate terminate exception in TryCall. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | test/cctest/test-thread-termination.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/execution.h" 5 #include "src/execution.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 v8::TryCatch catcher; 203 v8::TryCatch catcher;
204 catcher.SetVerbose(false); 204 catcher.SetVerbose(false);
205 catcher.SetCaptureMessage(false); 205 catcher.SetCaptureMessage(false);
206 206
207 maybe_result = Invoke(false, func, receiver, argc, args); 207 maybe_result = Invoke(false, func, receiver, argc, args);
208 208
209 if (maybe_result.is_null()) { 209 if (maybe_result.is_null()) {
210 DCHECK(catcher.HasCaught()); 210 DCHECK(catcher.HasCaught());
211 DCHECK(isolate->has_pending_exception()); 211 DCHECK(isolate->has_pending_exception());
212 DCHECK(isolate->external_caught_exception()); 212 DCHECK(isolate->external_caught_exception());
213 if (isolate->pending_exception() == 213 if (exception_out != NULL) {
214 isolate->heap()->termination_exception()) { 214 if (isolate->pending_exception() ==
215 is_termination = true; 215 isolate->heap()->termination_exception()) {
216 } else { 216 is_termination = true;
217 if (exception_out != NULL) { 217 } else {
218 *exception_out = v8::Utils::OpenHandle(*catcher.Exception()); 218 *exception_out = v8::Utils::OpenHandle(*catcher.Exception());
219 } 219 }
220 } 220 }
221 isolate->OptionalRescheduleException(false); 221 isolate->OptionalRescheduleException(true);
222 } 222 }
223 223
224 DCHECK(!isolate->has_pending_exception()); 224 DCHECK(!isolate->has_pending_exception());
225 DCHECK(!isolate->external_caught_exception());
225 } 226 }
226 if (is_termination) isolate->TerminateExecution(); 227 if (is_termination) isolate->TerminateExecution();
227 return maybe_result; 228 return maybe_result;
228 } 229 }
229 230
230 231
231 Handle<Object> Execution::GetFunctionDelegate(Isolate* isolate, 232 Handle<Object> Execution::GetFunctionDelegate(Isolate* isolate,
232 Handle<Object> object) { 233 Handle<Object> object) {
233 DCHECK(!object->IsJSFunction()); 234 DCHECK(!object->IsJSFunction());
234 Factory* factory = isolate->factory(); 235 Factory* factory = isolate->factory();
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 } 677 }
677 678
678 isolate_->counters()->stack_interrupts()->Increment(); 679 isolate_->counters()->stack_interrupts()->Increment();
679 isolate_->counters()->runtime_profiler_ticks()->Increment(); 680 isolate_->counters()->runtime_profiler_ticks()->Increment();
680 isolate_->runtime_profiler()->OptimizeNow(); 681 isolate_->runtime_profiler()->OptimizeNow();
681 682
682 return isolate_->heap()->undefined_value(); 683 return isolate_->heap()->undefined_value();
683 } 684 }
684 685
685 } } // namespace v8::internal 686 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-thread-termination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698