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

Unified Diff: runtime/bin/extensions.cc

Issue 180783008: Change handling of dart-ext: URIs for native extensions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
« runtime/bin/builtin.dart ('K') | « runtime/bin/dartutils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/extensions.cc
diff --git a/runtime/bin/extensions.cc b/runtime/bin/extensions.cc
index bdfd5878d0bed973f20bcfa36a9a6d00d44e1f69..7b7f33ba0ba8eb11abaf1e5e19e9be6958127093 100644
--- a/runtime/bin/extensions.cc
+++ b/runtime/bin/extensions.cc
@@ -18,6 +18,10 @@ namespace bin {
Dart_Handle Extensions::LoadExtension(const char* extension_path,
Dart_Handle parent_library) {
+ if (strncmp(extension_path, "http://", 7) == 0) {
+ return Dart_NewApiError("Cannot load native extensions over http:");
+ }
+
char* library_path = strdup(extension_path);
if (library_path == NULL) {
« runtime/bin/builtin.dart ('K') | « runtime/bin/dartutils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698