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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 | 424 |
425 | 425 |
426 // --- C a l l s t o n a t i v e s --- | 426 // --- C a l l s t o n a t i v e s --- |
427 | 427 |
428 | 428 |
429 Handle<String> Execution::GetStackTraceLine(Handle<Object> recv, | 429 Handle<String> Execution::GetStackTraceLine(Handle<Object> recv, |
430 Handle<JSFunction> fun, | 430 Handle<JSFunction> fun, |
431 Handle<Object> pos, | 431 Handle<Object> pos, |
432 Handle<Object> is_global) { | 432 Handle<Object> is_global) { |
433 Isolate* isolate = fun->GetIsolate(); | 433 Isolate* isolate = fun->GetIsolate(); |
434 | |
435 Handle<JSFunction> ctor = | |
436 handle(isolate->native_context()->callsite_function(), isolate); | |
437 Handle<Object> strict_mode = isolate->factory()->ToBoolean(false); | 434 Handle<Object> strict_mode = isolate->factory()->ToBoolean(false); |
438 | 435 |
439 MaybeHandle<Object> maybe_callsite = CallSiteUtils::Construct( | 436 MaybeHandle<Object> maybe_callsite = |
440 isolate, ctor, ctor, recv, fun, pos, strict_mode); | 437 CallSiteUtils::Construct(isolate, recv, fun, pos, strict_mode); |
441 if (maybe_callsite.is_null()) { | 438 if (maybe_callsite.is_null()) { |
442 isolate->clear_pending_exception(); | 439 isolate->clear_pending_exception(); |
443 return isolate->factory()->empty_string(); | 440 return isolate->factory()->empty_string(); |
444 } | 441 } |
445 | 442 |
446 MaybeHandle<String> maybe_to_string = | 443 MaybeHandle<String> maybe_to_string = |
447 CallSiteUtils::ToString(isolate, maybe_callsite.ToHandleChecked()); | 444 CallSiteUtils::ToString(isolate, maybe_callsite.ToHandleChecked()); |
448 if (maybe_to_string.is_null()) { | 445 if (maybe_to_string.is_null()) { |
449 isolate->clear_pending_exception(); | 446 isolate->clear_pending_exception(); |
450 return isolate->factory()->empty_string(); | 447 return isolate->factory()->empty_string(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
495 | 492 |
496 isolate_->counters()->stack_interrupts()->Increment(); | 493 isolate_->counters()->stack_interrupts()->Increment(); |
497 isolate_->counters()->runtime_profiler_ticks()->Increment(); | 494 isolate_->counters()->runtime_profiler_ticks()->Increment(); |
498 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); | 495 isolate_->runtime_profiler()->MarkCandidatesForOptimization(); |
499 | 496 |
500 return isolate_->heap()->undefined_value(); | 497 return isolate_->heap()->undefined_value(); |
501 } | 498 } |
502 | 499 |
503 } // namespace internal | 500 } // namespace internal |
504 } // namespace v8 | 501 } // namespace v8 |
OLD | NEW |