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

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

Issue 345533004: Use "self" instead of globalThis. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r37482. Created 6 years, 6 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 | « dart/sdk/lib/_internal/lib/isolate_helper.dart ('k') | dart/sdk/lib/_internal/lib/preambles/d8.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/lib/js_helper.dart
diff --git a/dart/sdk/lib/_internal/lib/js_helper.dart b/dart/sdk/lib/_internal/lib/js_helper.dart
index 4fab0b2d7fcd6c205b2c2e8ff72a6988c5340960..8f87ac4f8cbdcc4871f860ed5a5ff805f8c31cf1 100644
--- a/dart/sdk/lib/_internal/lib/js_helper.dart
+++ b/dart/sdk/lib/_internal/lib/js_helper.dart
@@ -552,8 +552,6 @@ class Primitives {
return JS('int', '#', hash);
}
- static computeGlobalThis() => JS('', 'function() { return this; }()');
-
static _throwFormatException(String string) {
throw new FormatException(string);
}
@@ -721,7 +719,7 @@ class Primitives {
static String currentUri() {
// In a browser return self.location.href.
- if (JS('bool', 'typeof self != "undefined"')) {
+ if (JS('bool', '!!self.location')) {
return JS('String', 'self.location.href');
}
« no previous file with comments | « dart/sdk/lib/_internal/lib/isolate_helper.dart ('k') | dart/sdk/lib/_internal/lib/preambles/d8.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698