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

Unified Diff: sdk/lib/_internal/lib/core_patch.dart

Issue 23686021: Add property base to the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed more review comments Created 7 years, 3 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/lib/uri_patch.dart ('k') | sdk/lib/_internal/lib/isolate_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/core_patch.dart
diff --git a/sdk/lib/_internal/lib/core_patch.dart b/sdk/lib/_internal/lib/core_patch.dart
index aaa816442dc320e3b21552d9f60f39a1e1f26b10..69c16b199d41eeb8f6bfd4e212a11bb2726a384e 100644
--- a/sdk/lib/_internal/lib/core_patch.dart
+++ b/sdk/lib/_internal/lib/core_patch.dart
@@ -3,13 +3,13 @@
// BSD-style license that can be found in the LICENSE file.
// Patch file for dart:core classes.
+import "dart:_collection-dev" as _symbol_dev;
import 'dart:_interceptors';
import 'dart:_js_helper' show checkNull,
getRuntimeType,
JSSyntaxRegExp,
Primitives,
stringJoinUnchecked;
-import "dart:_collection-dev" as _symbol_dev;
String _symbolToString(Symbol symbol) => _symbol_dev.Symbol.getName(symbol);
@@ -311,4 +311,10 @@ patch class NoSuchMethodError {
patch class Uri {
patch static bool get _isWindows => false;
+
+ patch static Uri get base {
+ String uri = Primitives.currentUri();
+ if (uri != null) return Uri.parse(uri);
+ throw new UnsupportedError("'Uri.base' is not supported");
+ }
}
« no previous file with comments | « runtime/lib/uri_patch.dart ('k') | sdk/lib/_internal/lib/isolate_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698