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

Side by Side Diff: runtime/bin/process_script.cc

Issue 8383037: Improve error handling in the process library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_script.h ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Handle dart scripts. 5 // Handle dart scripts.
6 6
7 #include <assert.h>
8 #include <stdlib.h> 7 #include <stdlib.h>
9 #include <string.h> 8 #include <string.h>
10 #include <stdio.h> 9 #include <stdio.h>
11 10
12 #include "include/dart_api.h" 11 #include "include/dart_api.h"
13 12
14 #include "bin/builtin.h" 13 #include "bin/builtin.h"
15 #include "bin/file.h" 14 #include "bin/file.h"
16 #include "bin/globals.h" 15 #include "bin/globals.h"
17 #include "bin/process_script.h" 16 #include "bin/process_script.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 Dart_Result LoadScript(const char* script_name) { 148 Dart_Result LoadScript(const char* script_name) {
150 Dart_Result result = ReadStringFromFile(script_name); 149 Dart_Result result = ReadStringFromFile(script_name);
151 if (!Dart_IsValidResult(result)) { 150 if (!Dart_IsValidResult(result)) {
152 return result; 151 return result;
153 } 152 }
154 Dart_Handle source = Dart_GetResult(result); 153 Dart_Handle source = Dart_GetResult(result);
155 Dart_Handle url = Dart_NewString(script_name); 154 Dart_Handle url = Dart_NewString(script_name);
156 155
157 return Dart_LoadScript(url, source, LibraryTagHandler); 156 return Dart_LoadScript(url, source, LibraryTagHandler);
158 } 157 }
OLDNEW
« no previous file with comments | « runtime/bin/process_script.h ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698