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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/execution.h ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index 56c08b5b53679d44e4adaa9652f460b5c5492817..709c13df7340c21d74ef78cf11fafa34d92d775c 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -434,6 +434,31 @@
// --- C a l l s t o n a t i v e s ---
+Handle<String> Execution::GetStackTraceLine(Handle<Object> recv,
+ Handle<JSFunction> fun,
+ Handle<Object> pos,
+ Handle<Object> is_global) {
+ Isolate* isolate = fun->GetIsolate();
+ Handle<Object> strict_mode = isolate->factory()->ToBoolean(false);
+
+ MaybeHandle<Object> maybe_callsite =
+ CallSiteUtils::Construct(isolate, recv, fun, pos, strict_mode);
+ if (maybe_callsite.is_null()) {
+ isolate->clear_pending_exception();
+ return isolate->factory()->empty_string();
+ }
+
+ MaybeHandle<String> maybe_to_string =
+ CallSiteUtils::ToString(isolate, maybe_callsite.ToHandleChecked());
+ if (maybe_to_string.is_null()) {
+ isolate->clear_pending_exception();
+ return isolate->factory()->empty_string();
+ }
+
+ return maybe_to_string.ToHandleChecked();
+}
+
+
void StackGuard::HandleGCInterrupt() {
if (CheckAndClearInterrupt(GC_REQUEST)) {
isolate_->heap()->HandleGCRequest();
« 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