| 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/messages.h" | 10 #include "src/messages.h" |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 MaybeHandle<Object>* exception_out) { | 193 MaybeHandle<Object>* exception_out) { |
| 194 bool is_termination = false; | 194 bool is_termination = false; |
| 195 Isolate* isolate = func->GetIsolate(); | 195 Isolate* isolate = func->GetIsolate(); |
| 196 MaybeHandle<Object> maybe_result; | 196 MaybeHandle<Object> maybe_result; |
| 197 if (exception_out != NULL) *exception_out = MaybeHandle<Object>(); | 197 if (exception_out != NULL) *exception_out = MaybeHandle<Object>(); |
| 198 // Enter a try-block while executing the JavaScript code. To avoid | 198 // Enter a try-block while executing the JavaScript code. To avoid |
| 199 // duplicate error printing it must be non-verbose. Also, to avoid | 199 // duplicate error printing it must be non-verbose. Also, to avoid |
| 200 // creating message objects during stack overflow we shouldn't | 200 // creating message objects during stack overflow we shouldn't |
| 201 // capture messages. | 201 // capture messages. |
| 202 { | 202 { |
| 203 v8::TryCatch catcher; | 203 v8::TryCatch catcher(reinterpret_cast<v8::Isolate*>(isolate)); |
| 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 (isolate->pending_exception() == |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 686 } | 686 } |
| 687 | 687 |
| 688 isolate_->counters()->stack_interrupts()->Increment(); | 688 isolate_->counters()->stack_interrupts()->Increment(); |
| 689 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 689 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
| 690 isolate_->runtime_profiler()->OptimizeNow(); | 690 isolate_->runtime_profiler()->OptimizeNow(); |
| 691 | 691 |
| 692 return isolate_->heap()->undefined_value(); | 692 return isolate_->heap()->undefined_value(); |
| 693 } | 693 } |
| 694 | 694 |
| 695 } } // namespace v8::internal | 695 } } // namespace v8::internal |
| OLD | NEW |