Index: runtime/bin/dartutils.cc |
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc |
index 763b5e982ce5590f1e5e95d03e92272e402ceacf..364ac2716ffabe0994743c39f3e64ec5ed333cab 100644 |
--- a/runtime/bin/dartutils.cc |
+++ b/runtime/bin/dartutils.cc |
@@ -10,6 +10,7 @@ |
#include "platform/globals.h" |
const char* DartUtils::kDartScheme = "dart:"; |
+const char* DartUtils::kDartExtensionScheme = "dart-ext:"; |
const char* DartUtils::kBuiltinLibURL = "dart:builtin"; |
const char* DartUtils::kCoreLibURL = "dart:core"; |
const char* DartUtils::kCoreImplLibURL = "dart:coreimpl"; |
@@ -104,6 +105,15 @@ bool DartUtils::IsDartSchemeURL(const char* url_name) { |
} |
+bool DartUtils::IsDartExtensionSchemeURL(const char* url_name) { |
+ static const intptr_t kDartExtensionSchemeLen = strlen(kDartExtensionScheme); |
+ // If the URL starts with "dartext:" then it is considered as a special |
+ // extension library URL which is handled differently from other URLs. |
+ return |
+ (strncmp(url_name, kDartExtensionScheme, kDartExtensionSchemeLen) == 0); |
+} |
+ |
+ |
bool DartUtils::IsDartIOLibURL(const char* url_name) { |
return (strcmp(url_name, kIOLibURL) == 0); |
} |