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

Unified Diff: runtime/bin/dartutils.cc

Issue 2073173002: Use the new loader mechanism to resolve URIs and load script files in gen_snapshot. This should all… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address issues that were found while testing with the flutter engine. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index a57ef87bf2657c5ef7b1a47b0f52ac2337b0ad1b..4a9a247c3424830e13043ca8c32f81277e4a1753 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -32,6 +32,7 @@ namespace dart {
namespace bin {
const char* DartUtils::original_working_directory = NULL;
+CommandLineOptions* DartUtils::url_mapping = NULL;
const char* const DartUtils::kDartScheme = "dart:";
const char* const DartUtils::kDartExtensionScheme = "dart-ext:";
const char* const DartUtils::kAsyncLibURL = "dart:async";
@@ -47,6 +48,7 @@ const char* const DartUtils::kVMServiceLibURL = "dart:vmservice";
const uint8_t DartUtils::magic_number[] = { 0xf5, 0xf5, 0xdc, 0xdc };
+
static bool IsWindowsHost() {
#if defined(TARGET_OS_WINDOWS)
return true;
@@ -56,8 +58,7 @@ static bool IsWindowsHost() {
}
-const char* DartUtils::MapLibraryUrl(CommandLineOptions* url_mapping,
- const char* url_string) {
+const char* DartUtils::MapLibraryUrl(const char* url_string) {
ASSERT(url_mapping != NULL);
// We need to check if the passed in url is found in the url_mapping array,
// in that case use the mapped entry.
@@ -334,28 +335,6 @@ Dart_Handle DartUtils::SetWorkingDirectory() {
}
-Dart_Handle DartUtils::ResolveUriInWorkingDirectory(Dart_Handle script_uri) {
- const int kNumArgs = 1;
- Dart_Handle dart_args[kNumArgs];
- dart_args[0] = script_uri;
- return Dart_Invoke(DartUtils::BuiltinLib(),
- NewString("_resolveInWorkingDirectory"),
- kNumArgs,
- dart_args);
-}
-
-
-Dart_Handle DartUtils::FilePathFromUri(Dart_Handle script_uri) {
- const int kNumArgs = 1;
- Dart_Handle dart_args[kNumArgs];
- dart_args[0] = script_uri;
- return Dart_Invoke(DartUtils::BuiltinLib(),
- NewString("_filePathFromUri"),
- kNumArgs,
- dart_args);
-}
-
-
Dart_Handle DartUtils::LibraryFilePath(Dart_Handle library_uri) {
const int kNumArgs = 1;
Dart_Handle dart_args[kNumArgs];
@@ -367,18 +346,6 @@ Dart_Handle DartUtils::LibraryFilePath(Dart_Handle library_uri) {
}
-Dart_Handle DartUtils::ResolveUri(Dart_Handle library_url, Dart_Handle url) {
- const int kNumArgs = 2;
- Dart_Handle dart_args[kNumArgs];
- dart_args[0] = library_url;
- dart_args[1] = url;
- return Dart_Invoke(DartUtils::BuiltinLib(),
- NewString("_resolveUri"),
- kNumArgs,
- dart_args);
-}
-
-
Dart_Handle DartUtils::ResolveScript(Dart_Handle url) {
const int kNumArgs = 1;
Dart_Handle dart_args[kNumArgs];
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698