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

Unified Diff: src/isolate.cc

Issue 2141523002: Remove detailed from simple stack trace functionality (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 8d32520252318ceac95219a5f8ea76b8696350a3..b1008fa79148a664c15218110d2fbdd3a4141d08 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -545,18 +545,7 @@ Handle<JSArray> Isolate::GetDetailedStackTrace(Handle<JSObject> error_object) {
Handle<Object> stack_trace =
JSReceiver::GetDataProperty(error_object, key_detailed);
if (stack_trace->IsJSArray()) return Handle<JSArray>::cast(stack_trace);
-
- if (!capture_stack_trace_for_uncaught_exceptions_) return Handle<JSArray>();
-
- // Try to get details from simple stack trace.
- Handle<JSArray> detailed_stack_trace =
- GetDetailedFromSimpleStackTrace(error_object);
- if (!detailed_stack_trace.is_null()) {
- // Save the detailed stack since the simple one might be withdrawn later.
- JSObject::SetProperty(error_object, key_detailed, detailed_stack_trace,
- STRICT).Assert();
- }
- return detailed_stack_trace;
+ return Handle<JSArray>();
}
@@ -739,46 +728,6 @@ int PositionFromStackTrace(Handle<FixedArray> elements, int index) {
}
}
-
-Handle<JSArray> Isolate::GetDetailedFromSimpleStackTrace(
- Handle<JSObject> error_object) {
- Handle<Name> key = factory()->stack_trace_symbol();
- Handle<Object> property = JSReceiver::GetDataProperty(error_object, key);
- if (!property->IsJSArray()) return Handle<JSArray>();
- Handle<JSArray> simple_stack_trace = Handle<JSArray>::cast(property);
-
- CaptureStackTraceHelper helper(this,
- stack_trace_for_uncaught_exceptions_options_);
-
- int frames_seen = 0;
- Handle<FixedArray> elements(FixedArray::cast(simple_stack_trace->elements()));
- int elements_limit = Smi::cast(simple_stack_trace->length())->value();
-
- int frame_limit = stack_trace_for_uncaught_exceptions_frame_limit_;
- if (frame_limit < 0) frame_limit = (elements_limit - 1) / 4;
-
- Handle<JSArray> stack_trace = factory()->NewJSArray(frame_limit);
- for (int i = 1; i < elements_limit && frames_seen < frame_limit; i += 4) {
- Handle<Object> recv = handle(elements->get(i), this);
- Handle<JSFunction> fun =
- handle(JSFunction::cast(elements->get(i + 1)), this);
- bool is_constructor =
- recv->IsJSObject() &&
- Handle<JSObject>::cast(recv)->map()->GetConstructor() == *fun;
- int position = PositionFromStackTrace(elements, i);
-
- Handle<JSObject> stack_frame =
- helper.NewStackFrameObject(fun, position, is_constructor);
-
- FixedArray::cast(stack_trace->elements())->set(frames_seen, *stack_frame);
- frames_seen++;
- }
-
- stack_trace->set_length(Smi::FromInt(frames_seen));
- return stack_trace;
-}
-
-
Handle<JSArray> Isolate::CaptureCurrentStackTrace(
int frame_limit, StackTrace::StackTraceOptions options) {
CaptureStackTraceHelper helper(this, options);
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698