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

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

Issue 423843002: Compute absolute script path at isolate startup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | sdk/lib/io/platform.dart » ('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) 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"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 result = Dart_RunLoop(); 601 result = Dart_RunLoop();
602 CHECK_RESULT(result); 602 CHECK_RESULT(result);
603 } 603 }
604 604
605 Platform::SetPackageRoot(package_root); 605 Platform::SetPackageRoot(package_root);
606 Dart_Handle io_lib_url = DartUtils::NewString(DartUtils::kIOLibURL); 606 Dart_Handle io_lib_url = DartUtils::NewString(DartUtils::kIOLibURL);
607 CHECK_RESULT(io_lib_url); 607 CHECK_RESULT(io_lib_url);
608 Dart_Handle io_lib = Dart_LookupLibrary(io_lib_url); 608 Dart_Handle io_lib = Dart_LookupLibrary(io_lib_url);
609 CHECK_RESULT(io_lib); 609 CHECK_RESULT(io_lib);
610 Dart_Handle platform_type = DartUtils::GetDartType(DartUtils::kIOLibURL, 610 Dart_Handle platform_type = DartUtils::GetDartType(DartUtils::kIOLibURL,
611 "Platform"); 611 "_Platform");
612 CHECK_RESULT(platform_type); 612 CHECK_RESULT(platform_type);
613 Dart_Handle script_name = DartUtils::NewString("_nativeScript"); 613 Dart_Handle script_name = DartUtils::NewString("_nativeScript");
614 CHECK_RESULT(script_name); 614 CHECK_RESULT(script_name);
615 Dart_Handle dart_script = DartUtils::NewString(script_uri); 615 Dart_Handle dart_script = DartUtils::NewString(script_uri);
616 CHECK_RESULT(dart_script); 616 CHECK_RESULT(dart_script);
617 Dart_Handle set_script_name = 617 Dart_Handle set_script_name =
618 Dart_SetField(platform_type, script_name, dart_script); 618 Dart_SetField(platform_type, script_name, dart_script);
619 CHECK_RESULT(set_script_name); 619 CHECK_RESULT(set_script_name);
620 620
621 // Make the isolate runnable so that it is ready to handle messages. 621 // Make the isolate runnable so that it is ready to handle messages.
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1179 exit(Process::GlobalExitCode()); 1179 exit(Process::GlobalExitCode());
1180 } 1180 }
1181 1181
1182 } // namespace bin 1182 } // namespace bin
1183 } // namespace dart 1183 } // namespace dart
1184 1184
1185 int main(int argc, char** argv) { 1185 int main(int argc, char** argv) {
1186 dart::bin::main(argc, argv); 1186 dart::bin::main(argc, argv);
1187 UNREACHABLE(); 1187 UNREACHABLE();
1188 } 1188 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/io/platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698