Fix stack trace printing in d8

R=yangguo@chromium.org
BUG=chromium:511988
LOG=n

Review URL: https://codereview.chromium.org/1246643002

Cr-Commit-Position: refs/heads/master@{#29757}
This commit is contained in:
jochen 2015-07-20 07:49:21 -07:00 committed by Commit bot
parent 2e040f54e9
commit 8019833da7

View File

@ -917,7 +917,8 @@ void Shell::ReportException(Isolate* isolate, v8::TryCatch* try_catch) {
printf("\n"); printf("\n");
Local<Value> stack_trace_string; Local<Value> stack_trace_string;
if (try_catch->StackTrace(isolate->GetCurrentContext()) if (try_catch->StackTrace(isolate->GetCurrentContext())
.ToLocal(&stack_trace_string)) { .ToLocal(&stack_trace_string) &&
stack_trace_string->IsString()) {
v8::String::Utf8Value stack_trace( v8::String::Utf8Value stack_trace(
Local<String>::Cast(stack_trace_string)); Local<String>::Cast(stack_trace_string));
printf("%s\n", ToCString(stack_trace)); printf("%s\n", ToCString(stack_trace));