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

Unified Diff: runtime/bin/dartutils.cc

Issue 2998373002: [dart:io] Move _getUriBaseClosure to dart:io (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/directory_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 ed2f6759465f8b1af04dc210dadeeb9f5662aa00..abb6dd9efaf4aa41675a1ffca8da74db3e0f4cdb 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -379,16 +379,6 @@ void DartUtils::SkipSnapshotMagicNumber(const uint8_t** buffer,
*buffer_length -= snapshot_magic_number.length;
}
-void FUNCTION_NAME(Builtin_GetCurrentDirectory)(Dart_NativeArguments args) {
- const char* current = Directory::Current();
- if (current != NULL) {
- Dart_SetReturnValue(args, DartUtils::NewString(current));
- } else {
- Dart_Handle err = DartUtils::NewError("Failed to get current directory.");
- Dart_PropagateError(err);
- }
-}
-
Dart_Handle DartUtils::PrepareBuiltinLibrary(Dart_Handle builtin_lib,
Dart_Handle internal_lib,
bool is_service_isolate,
@@ -419,12 +409,12 @@ Dart_Handle DartUtils::PrepareBuiltinLibrary(Dart_Handle builtin_lib,
}
Dart_Handle DartUtils::PrepareCoreLibrary(Dart_Handle core_lib,
- Dart_Handle builtin_lib,
+ Dart_Handle io_lib,
bool is_service_isolate) {
if (!is_service_isolate) {
// Setup the 'Uri.base' getter in dart:core.
Dart_Handle uri_base =
- Dart_Invoke(builtin_lib, NewString("_getUriBaseClosure"), 0, NULL);
+ Dart_Invoke(io_lib, NewString("_getUriBaseClosure"), 0, NULL);
RETURN_IF_ERROR(uri_base);
Dart_Handle result =
Dart_SetField(core_lib, NewString("_uriBaseClosure"), uri_base);
@@ -532,8 +522,7 @@ Dart_Handle DartUtils::PrepareForScriptLoading(bool is_service_isolate,
RETURN_IF_ERROR(result);
RETURN_IF_ERROR(PrepareAsyncLibrary(async_lib, isolate_lib));
- RETURN_IF_ERROR(
- PrepareCoreLibrary(core_lib, builtin_lib, is_service_isolate));
+ RETURN_IF_ERROR(PrepareCoreLibrary(core_lib, io_lib, is_service_isolate));
RETURN_IF_ERROR(PrepareIsolateLibrary(isolate_lib));
RETURN_IF_ERROR(PrepareIOLibrary(io_lib));
return result;
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/directory_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698