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

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

Issue 1334353002: - Add getters for the current packageRoot or packageMap. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update tests and move to ToT. Created 5 years, 2 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
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_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 CHECK_RESULT(result); 757 CHECK_RESULT(result);
758 758
759 // Run event-loop and wait for script loading to complete. 759 // Run event-loop and wait for script loading to complete.
760 result = Dart_RunLoop(); 760 result = Dart_RunLoop();
761 CHECK_RESULT(result); 761 CHECK_RESULT(result);
762 762
763 if (isolate_data->load_async_id >= 0) { 763 if (isolate_data->load_async_id >= 0) {
764 Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id); 764 Dart_TimelineAsyncEnd("LoadScript", isolate_data->load_async_id);
765 } 765 }
766 766
767 Platform::SetPackageRoot(package_root);
768
769 result = DartUtils::SetupIOLibrary(script_uri); 767 result = DartUtils::SetupIOLibrary(script_uri);
770 CHECK_RESULT(result); 768 CHECK_RESULT(result);
771 } 769 }
772 770
773 // Make the isolate runnable so that it is ready to handle messages. 771 // Make the isolate runnable so that it is ready to handle messages.
774 Dart_ExitScope(); 772 Dart_ExitScope();
775 Dart_ExitIsolate(); 773 Dart_ExitIsolate();
776 bool retval = Dart_IsolateMakeRunnable(isolate); 774 bool retval = Dart_IsolateMakeRunnable(isolate);
777 if (!retval) { 775 if (!retval) {
778 *error = strdup("Invalid isolate state - Unable to make it runnable"); 776 *error = strdup("Invalid isolate state - Unable to make it runnable");
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 exit(Process::GlobalExitCode()); 1368 exit(Process::GlobalExitCode());
1371 } 1369 }
1372 1370
1373 } // namespace bin 1371 } // namespace bin
1374 } // namespace dart 1372 } // namespace dart
1375 1373
1376 int main(int argc, char** argv) { 1374 int main(int argc, char** argv) {
1377 dart::bin::main(argc, argv); 1375 dart::bin::main(argc, argv);
1378 UNREACHABLE(); 1376 UNREACHABLE();
1379 } 1377 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698