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

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

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_macos.cc ('k') | runtime/bin/process_script.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 #ifndef BIN_PROCESS_SCRIPT_H_ 5 #ifndef BIN_PROCESS_SCRIPT_H_
6 #define BIN_PROCESS_SCRIPT_H_ 6 #define BIN_PROCESS_SCRIPT_H_
7 7
8 #include <assert.h>
9 #include <stdlib.h> 8 #include <stdlib.h>
10 #include <string.h> 9 #include <string.h>
11 #include <stdio.h> 10 #include <stdio.h>
12 11
13 class CommandLineOptions { 12 class CommandLineOptions {
14 public: 13 public:
15 explicit CommandLineOptions(int max_count) 14 explicit CommandLineOptions(int max_count)
16 : count_(0), max_count_(max_count), arguments_(NULL) { 15 : count_(0), max_count_(max_count), arguments_(NULL) {
17 static const int kWordSize = sizeof(intptr_t); 16 static const int kWordSize = sizeof(intptr_t);
18 arguments_ = reinterpret_cast<char **>(malloc(max_count * kWordSize)); 17 arguments_ = reinterpret_cast<char **>(malloc(max_count * kWordSize));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 50
52 int count_; 51 int count_;
53 int max_count_; 52 int max_count_;
54 char** arguments_; 53 char** arguments_;
55 }; 54 };
56 55
57 56
58 extern Dart_Result LoadScript(const char* script_name); 57 extern Dart_Result LoadScript(const char* script_name);
59 58
60 #endif // BIN_PROCESS_SCRIPT_H_ 59 #endif // BIN_PROCESS_SCRIPT_H_
OLDNEW
« no previous file with comments | « runtime/bin/process_macos.cc ('k') | runtime/bin/process_script.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698