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

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

Issue 9630012: Error reporting on File in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Made Dart OSError constructor const Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_debugger_api.h" 10 #include "include/dart_debugger_api.h"
11 11
12 #include "bin/builtin.h" 12 #include "bin/builtin.h"
13 #include "bin/dartutils.h" 13 #include "bin/dartutils.h"
14 #include "bin/directory.h" 14 #include "bin/directory.h"
15 #include "bin/eventhandler.h" 15 #include "bin/eventhandler.h"
16 #include "bin/extensions.h" 16 #include "bin/extensions.h"
17 #include "bin/file.h" 17 #include "bin/file.h"
18 #include "bin/platform.h" 18 #include "bin/platform.h"
19 #include "bin/process.h" 19 #include "bin/process.h"
20 #include "bin/utils.h"
20 #include "platform/globals.h" 21 #include "platform/globals.h"
21 22
22 // snapshot_buffer points to a snapshot if we link in a snapshot otherwise 23 // snapshot_buffer points to a snapshot if we link in a snapshot otherwise
23 // it is initialized to NULL. 24 // it is initialized to NULL.
24 extern const uint8_t* snapshot_buffer; 25 extern const uint8_t* snapshot_buffer;
25 26
26 27
27 // Global state that stores a pointer to the application script file. 28 // Global state that stores a pointer to the application script file.
28 static const char* original_script_name = NULL; 29 static const char* original_script_name = NULL;
29 static const char* original_working_directory = NULL; 30 static const char* original_working_directory = NULL;
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 EventHandler::Terminate(); 604 EventHandler::Terminate();
604 // Terminate process exit-code handler. 605 // Terminate process exit-code handler.
605 Process::TerminateExitCodeHandler(); 606 Process::TerminateExitCodeHandler();
606 607
607 free(const_cast<char*>(original_script_name)); 608 free(const_cast<char*>(original_script_name));
608 free(const_cast<char*>(original_working_directory)); 609 free(const_cast<char*>(original_working_directory));
609 free(const_cast<char*>(original_script_url)); 610 free(const_cast<char*>(original_script_url));
610 611
611 return 0; 612 return 0;
612 } 613 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698