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

Side by Side Diff: samples/shell.cc

Issue 1410333004: Fix crash in shell.cc when reporting exceptions that aren't Errors (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years, 2 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 // Print wavy underline (GetUnderline is deprecated). 405 // Print wavy underline (GetUnderline is deprecated).
406 int start = message->GetStartColumn(context).FromJust(); 406 int start = message->GetStartColumn(context).FromJust();
407 for (int i = 0; i < start; i++) { 407 for (int i = 0; i < start; i++) {
408 fprintf(stderr, " "); 408 fprintf(stderr, " ");
409 } 409 }
410 int end = message->GetEndColumn(context).FromJust(); 410 int end = message->GetEndColumn(context).FromJust();
411 for (int i = start; i < end; i++) { 411 for (int i = start; i < end; i++) {
412 fprintf(stderr, "^"); 412 fprintf(stderr, "^");
413 } 413 }
414 fprintf(stderr, "\n"); 414 fprintf(stderr, "\n");
415 v8::String::Utf8Value stack_trace( 415 v8::Local<v8::Value> stack_trace_string;
416 try_catch->StackTrace(context).ToLocalChecked()); 416 if (try_catch->StackTrace(context).ToLocal(&stack_trace_string) &&
417 if (stack_trace.length() > 0) { 417 stack_trace_string->IsString() &&
418 v8::Local<v8::String>::Cast(stack_trace_string)->Length() > 0) {
419 v8::String::Utf8Value stack_trace(stack_trace_string);
418 const char* stack_trace_string = ToCString(stack_trace); 420 const char* stack_trace_string = ToCString(stack_trace);
419 fprintf(stderr, "%s\n", stack_trace_string); 421 fprintf(stderr, "%s\n", stack_trace_string);
420 } 422 }
421 } 423 }
422 } 424 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698