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

Side by Side Diff: src/execution.cc

Issue 2252783007: Revert of Use a custom Struct for stack trace storage (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/execution.h ('k') | src/factory.h » ('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/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
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
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
OLDNEW
« no previous file with comments | « src/execution.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698