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

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

Issue 10574037: Add dart:web to VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « runtime/bin/dartutils.cc ('k') | runtime/bin/web_sources.gypi » ('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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 if (DartUtils::IsDartCryptoLibURL(url_string)) { 400 if (DartUtils::IsDartCryptoLibURL(url_string)) {
401 id = Builtin::kCryptoLibrary; 401 id = Builtin::kCryptoLibrary;
402 } else if (DartUtils::IsDartIOLibURL(url_string)) { 402 } else if (DartUtils::IsDartIOLibURL(url_string)) {
403 id = Builtin::kIOLibrary; 403 id = Builtin::kIOLibrary;
404 } else if (DartUtils::IsDartJsonLibURL(url_string)) { 404 } else if (DartUtils::IsDartJsonLibURL(url_string)) {
405 id = Builtin::kJsonLibrary; 405 id = Builtin::kJsonLibrary;
406 } else if (DartUtils::IsDartUriLibURL(url_string)) { 406 } else if (DartUtils::IsDartUriLibURL(url_string)) {
407 id = Builtin::kUriLibrary; 407 id = Builtin::kUriLibrary;
408 } else if (DartUtils::IsDartUtfLibURL(url_string)) { 408 } else if (DartUtils::IsDartUtfLibURL(url_string)) {
409 id = Builtin::kUtfLibrary; 409 id = Builtin::kUtfLibrary;
410 } else if (DartUtils::IsDartWebLibURL(url_string)) {
411 id = Builtin::kWebLibrary;
410 } else { 412 } else {
411 return Dart_Error("Do not know how to load '%s'", url_string); 413 return Dart_Error("Do not know how to load '%s'", url_string);
412 } 414 }
413 return Builtin::LoadLibrary(id); 415 return Builtin::LoadLibrary(id);
414 } else { 416 } else {
415 // Get the file path out of the url. 417 // Get the file path out of the url.
416 Dart_Handle builtin_lib = Builtin::LoadLibrary(Builtin::kBuiltinLibrary); 418 Dart_Handle builtin_lib = Builtin::LoadLibrary(Builtin::kBuiltinLibrary);
417 Dart_Handle file_path = FilePathFromUri(url, builtin_lib); 419 Dart_Handle file_path = FilePathFromUri(url, builtin_lib);
418 if (Dart_IsError(file_path)) { 420 if (Dart_IsError(file_path)) {
419 return file_path; 421 return file_path;
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 DumpPprofSymbolInfo(); 806 DumpPprofSymbolInfo();
805 // Shutdown the isolate. 807 // Shutdown the isolate.
806 Dart_ShutdownIsolate(); 808 Dart_ShutdownIsolate();
807 // Terminate process exit-code handler. 809 // Terminate process exit-code handler.
808 Process::TerminateExitCodeHandler(); 810 Process::TerminateExitCodeHandler();
809 811
810 free(const_cast<char*>(original_working_directory)); 812 free(const_cast<char*>(original_working_directory));
811 813
812 return 0; 814 return 0;
813 } 815 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/web_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698