Index: runtime/lib/uri_patch.dart |
diff --git a/runtime/lib/uri_patch.dart b/runtime/lib/uri_patch.dart |
index b07946d190d276da4dabe4f85cd104a1e05475a5..1f94bd7038169c9ce2fa8dee8e83499fdc214d08 100644 |
--- a/runtime/lib/uri_patch.dart |
+++ b/runtime/lib/uri_patch.dart |
@@ -3,10 +3,22 @@ |
// BSD-style license that can be found in the LICENSE file. |
// VM implementation of Uri. |
+typedef Uri _UriBaseClosure(); |
+ |
+void _unsupportedUriBase() { |
+ throw new UnsupportedError("'Uri.base' is not supported"); |
+} |
+ |
+// _uriBaseClosure can be overwritten by the embedder to supply a different |
+// value for Uri.base. |
+_UriBaseClosure _uriBaseClosure = _unsupportedUriBase; |
+ |
patch class Uri { |
static final bool _isWindowsCached = _isWindowsPlatform; |
- static bool get _isWindowsPlatform native "Uri_isWindowsPlatform"; |
- |
/* patch */ static bool get _isWindows => _isWindowsCached; |
+ |
+ /* patch */ static Uri get base => _uriBaseClosure(); |
+ |
+ static bool get _isWindowsPlatform native "Uri_isWindowsPlatform"; |
} |