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

Unified Diff: runtime/bin/dartutils.cc

Issue 9430051: Add native extensions to the Dart shell, on the linux platform. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix Windows bugs Created 8 years, 10 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/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 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);
}
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/extensions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698