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

Unified Diff: runtime/bin/dartutils.cc

Issue 1896203002: Search for a native extension for the host architecture (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/builtin_natives.cc ('k') | runtime/bin/extensions.h » ('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 764c00ecf0b311ae4afef90f0048f3f7928a15c8..39f147a5a6991afe85f385b44e34ec45d636dfba 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -450,15 +450,20 @@ Dart_Handle DartUtils::LibraryTagHandler(Dart_LibraryTag tag,
if (Dart_IsError(path_parts)) {
return path_parts;
}
+#if defined(DEBUG)
+ intptr_t path_parts_length;
+ result = Dart_ListLength(path_parts, &path_parts_length);
+ if (Dart_IsError(result)) {
+ return result;
+ }
+ ASSERT(path_parts_length == 2);
+#endif
const char* extension_directory = NULL;
Dart_StringToCString(Dart_ListGetAt(path_parts, 0), &extension_directory);
- const char* extension_filename = NULL;
- Dart_StringToCString(Dart_ListGetAt(path_parts, 1), &extension_filename);
const char* extension_name = NULL;
- Dart_StringToCString(Dart_ListGetAt(path_parts, 2), &extension_name);
+ Dart_StringToCString(Dart_ListGetAt(path_parts, 1), &extension_name);
return Extensions::LoadExtension(extension_directory,
- extension_filename,
extension_name,
library);
}
@@ -619,17 +624,6 @@ void FUNCTION_NAME(Builtin_DoneLoading)(Dart_NativeArguments args) {
}
-void FUNCTION_NAME(Builtin_NativeLibraryExtension)(Dart_NativeArguments args) {
- const char* suffix = Platform::LibraryExtension();
- ASSERT(suffix != NULL);
- Dart_Handle res = Dart_NewStringFromCString(suffix);
- if (Dart_IsError(res)) {
- Dart_PropagateError(res);
- }
- Dart_SetReturnValue(args, res);
-}
-
-
void FUNCTION_NAME(Builtin_GetCurrentDirectory)(Dart_NativeArguments args) {
const char* current = Directory::Current();
if (current != NULL) {
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/extensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698