OLD | NEW |
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 Loading... |
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 (exception_out != NULL) { | 213 if (isolate->pending_exception() == |
214 if (isolate->pending_exception() == | 214 isolate->heap()->termination_exception()) { |
215 isolate->heap()->termination_exception()) { | 215 is_termination = true; |
216 is_termination = true; | 216 } else { |
217 } else { | 217 if (exception_out != NULL) { |
218 *exception_out = v8::Utils::OpenHandle(*catcher.Exception()); | 218 *exception_out = v8::Utils::OpenHandle(*catcher.Exception()); |
219 } | 219 } |
220 } | 220 } |
221 isolate->OptionalRescheduleException(true); | 221 isolate->OptionalRescheduleException(false); |
222 } | 222 } |
223 | 223 |
224 DCHECK(!isolate->has_pending_exception()); | 224 DCHECK(!isolate->has_pending_exception()); |
225 DCHECK(!isolate->external_caught_exception()); | |
226 } | 225 } |
227 if (is_termination) isolate->TerminateExecution(); | 226 if (is_termination) isolate->TerminateExecution(); |
228 return maybe_result; | 227 return maybe_result; |
229 } | 228 } |
230 | 229 |
231 | 230 |
232 Handle<Object> Execution::GetFunctionDelegate(Isolate* isolate, | 231 Handle<Object> Execution::GetFunctionDelegate(Isolate* isolate, |
233 Handle<Object> object) { | 232 Handle<Object> object) { |
234 DCHECK(!object->IsJSFunction()); | 233 DCHECK(!object->IsJSFunction()); |
235 Factory* factory = isolate->factory(); | 234 Factory* factory = isolate->factory(); |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 } | 676 } |
678 | 677 |
679 isolate_->counters()->stack_interrupts()->Increment(); | 678 isolate_->counters()->stack_interrupts()->Increment(); |
680 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 679 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
681 isolate_->runtime_profiler()->OptimizeNow(); | 680 isolate_->runtime_profiler()->OptimizeNow(); |
682 | 681 |
683 return isolate_->heap()->undefined_value(); | 682 return isolate_->heap()->undefined_value(); |
684 } | 683 } |
685 | 684 |
686 } } // namespace v8::internal | 685 } } // namespace v8::internal |
OLD | NEW |