| 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/isolate-inl.h" | 9 #include "src/isolate-inl.h" |
| 10 #include "src/messages.h" | 10 #include "src/messages.h" |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 // You should hold the ExecutionAccess lock when you call this. | 427 // You should hold the ExecutionAccess lock when you call this. |
| 428 if (stored_limit != 0) { | 428 if (stored_limit != 0) { |
| 429 SetStackLimit(stored_limit); | 429 SetStackLimit(stored_limit); |
| 430 } | 430 } |
| 431 } | 431 } |
| 432 | 432 |
| 433 | 433 |
| 434 // --- C a l l s t o n a t i v e s --- | 434 // --- C a l l s t o n a t i v e s --- |
| 435 | 435 |
| 436 | 436 |
| 437 Handle<String> Execution::GetStackTraceLine(Handle<Object> recv, |
| 438 Handle<JSFunction> fun, |
| 439 Handle<Object> pos, |
| 440 Handle<Object> is_global) { |
| 441 Isolate* isolate = fun->GetIsolate(); |
| 442 Handle<Object> strict_mode = isolate->factory()->ToBoolean(false); |
| 443 |
| 444 MaybeHandle<Object> maybe_callsite = |
| 445 CallSiteUtils::Construct(isolate, recv, fun, pos, strict_mode); |
| 446 if (maybe_callsite.is_null()) { |
| 447 isolate->clear_pending_exception(); |
| 448 return isolate->factory()->empty_string(); |
| 449 } |
| 450 |
| 451 MaybeHandle<String> maybe_to_string = |
| 452 CallSiteUtils::ToString(isolate, maybe_callsite.ToHandleChecked()); |
| 453 if (maybe_to_string.is_null()) { |
| 454 isolate->clear_pending_exception(); |
| 455 return isolate->factory()->empty_string(); |
| 456 } |
| 457 |
| 458 return maybe_to_string.ToHandleChecked(); |
| 459 } |
| 460 |
| 461 |
| 437 void StackGuard::HandleGCInterrupt() { | 462 void StackGuard::HandleGCInterrupt() { |
| 438 if (CheckAndClearInterrupt(GC_REQUEST)) { | 463 if (CheckAndClearInterrupt(GC_REQUEST)) { |
| 439 isolate_->heap()->HandleGCRequest(); | 464 isolate_->heap()->HandleGCRequest(); |
| 440 } | 465 } |
| 441 } | 466 } |
| 442 | 467 |
| 443 | 468 |
| 444 Object* StackGuard::HandleInterrupts() { | 469 Object* StackGuard::HandleInterrupts() { |
| 445 if (FLAG_verify_predictable) { | 470 if (FLAG_verify_predictable) { |
| 446 // Advance synthetic time by making a time request. | 471 // Advance synthetic time by making a time request. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 475 | 500 |
| 476 isolate_->counters()->stack_interrupts()->Increment(); | 501 isolate_->counters()->stack_interrupts()->Increment(); |
| 477 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 502 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
| 478 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); | 503 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); |
| 479 | 504 |
| 480 return isolate_->heap()->undefined_value(); | 505 return isolate_->heap()->undefined_value(); |
| 481 } | 506 } |
| 482 | 507 |
| 483 } // namespace internal | 508 } // namespace internal |
| 484 } // namespace v8 | 509 } // namespace v8 |
| OLD | NEW |