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

Side by Side Diff: experimental/SkV8Example/Global.cpp

Issue 331133004: skia: Replaced GetScriptResourceName() with GetScriptOrigin().ResourceName() (Closed) Base URL: https://chromium.googlesource.com/skia.git@master1
Patch Set: Created 6 years, 6 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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 * 7 *
8 */ 8 */
9 #include "Global.h" 9 #include "Global.h"
10 10
(...skipping 23 matching lines...) Expand all
34 HandleScope handleScope(fIsolate); 34 HandleScope handleScope(fIsolate);
35 String::Utf8Value exception(tryCatch->Exception()); 35 String::Utf8Value exception(tryCatch->Exception());
36 const char* exceptionString = to_cstring(exception); 36 const char* exceptionString = to_cstring(exception);
37 Handle<Message> message = tryCatch->Message(); 37 Handle<Message> message = tryCatch->Message();
38 if (message.IsEmpty()) { 38 if (message.IsEmpty()) {
39 // V8 didn't provide any extra information about this error; just 39 // V8 didn't provide any extra information about this error; just
40 // print the exception. 40 // print the exception.
41 fprintf(stderr, "%s\n", exceptionString); 41 fprintf(stderr, "%s\n", exceptionString);
42 } else { 42 } else {
43 // Print (filename):(line number): (message). 43 // Print (filename):(line number): (message).
44 String::Utf8Value filename(message->GetScriptResourceName()); 44 String::Utf8Value filename(message->GetScriptOrigin().ResourceName());
45 const char* filenameString = to_cstring(filename); 45 const char* filenameString = to_cstring(filename);
46 int linenum = message->GetLineNumber(); 46 int linenum = message->GetLineNumber();
47 fprintf(stderr, 47 fprintf(stderr,
48 "%s:%i: %s\n", filenameString, linenum, exceptionString); 48 "%s:%i: %s\n", filenameString, linenum, exceptionString);
49 // Print line of source code. 49 // Print line of source code.
50 String::Utf8Value sourceline(message->GetSourceLine()); 50 String::Utf8Value sourceline(message->GetSourceLine());
51 const char* sourceLineString = to_cstring(sourceline); 51 const char* sourceLineString = to_cstring(sourceline);
52 fprintf(stderr, "%s\n", sourceLineString); 52 fprintf(stderr, "%s\n", sourceLineString);
53 // Print wavy underline. 53 // Print wavy underline.
54 int start = message->GetStartColumn(); 54 int start = message->GetStartColumn();
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // Handle any exceptions or output. 236 // Handle any exceptions or output.
237 if (result.IsEmpty()) { 237 if (result.IsEmpty()) {
238 SkASSERT(tryCatch.HasCaught()); 238 SkASSERT(tryCatch.HasCaught());
239 // Print errors that happened during execution. 239 // Print errors that happened during execution.
240 this->reportException(&tryCatch); 240 this->reportException(&tryCatch);
241 return false; 241 return false;
242 } 242 }
243 243
244 return true; 244 return true;
245 } 245 }
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