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

Unified Diff: runtime/bin/dartutils.cc

Issue 50573002: Remove dart:platform library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/lib/platform_patch.dart » ('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 a3a2f693f65396279e80d6845cd6bd17b45db285..657a4579b609634f10d06a5f4b84111567a276d6 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -29,7 +29,6 @@ const char* DartUtils::kCoreLibURL = "dart:core";
const char* DartUtils::kIOLibURL = "dart:io";
const char* DartUtils::kIOLibPatchURL = "dart:io-patch";
const char* DartUtils::kUriLibURL = "dart:uri";
-const char* DartUtils::kPlatformLibURL = "dart:platform";
const char* DartUtils::kHttpScheme = "http:";
const char* DartUtils::kIdFieldName = "_id";
@@ -712,29 +711,17 @@ Dart_Handle DartUtils::PrepareForScriptLoading(const char* package_root,
// Set up package root if specified.
if (package_root != NULL) {
- Dart_Handle package_root_string = NewString(package_root);
- if (Dart_IsError(package_root_string)) {
- return package_root_string;
- }
- const int kNumArgs = 1;
- Dart_Handle dart_args[kNumArgs];
- dart_args[0] = package_root_string;
- result = Dart_Invoke(builtin_lib,
+ result = NewString(package_root);
+ if (!Dart_IsError(result)) {
+ const int kNumArgs = 1;
+ Dart_Handle dart_args[kNumArgs];
+ dart_args[0] = result;
+ return Dart_Invoke(builtin_lib,
NewString("_setPackageRoot"),
kNumArgs,
dart_args);
- if (Dart_IsError(result)) {
- return result;
}
}
-
- // Setup the platform library's _platform object.
- internal_lib = Dart_LookupLibrary(NewString(kPlatformLibURL));
- DART_CHECK_VALID(internal_lib);
- Dart_Handle platform =
- Dart_Invoke(builtin_lib, NewString("_getPlatform"), 0, NULL);
- result = Dart_SetField(internal_lib, NewString("_platform"), platform);
- DART_CHECK_VALID(result);
return result;
}
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/lib/platform_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698