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

Unified Diff: tool/input_sdk/private/utils.dart

Issue 1487213002: Special-case top-level final JS fields. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased Created 5 years 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 | « lib/src/codegen/js_codegen.dart ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/private/utils.dart
diff --git a/tool/input_sdk/private/utils.dart b/tool/input_sdk/private/utils.dart
index 636829e79270eb217e05ba4173fe06f5bd774b89..d27e82e48260ce0a41e33290a2cfa9980955a677 100644
--- a/tool/input_sdk/private/utils.dart
+++ b/tool/input_sdk/private/utils.dart
@@ -10,17 +10,15 @@ import 'dart:_foreign_helper' show JS;
/// by the Dart runtime.
// TODO(ochafik): Rewrite some of these in Dart when possible.
-// TODO(ochafik): Make these final + special-case them in js_codegen to fix
-// Analyzer errors.
-const defineProperty = JS('', 'Object.defineProperty');
-const getOwnPropertyDescriptor = JS('', 'Object.getOwnPropertyDescriptor');
-const getOwnPropertyNames = JS('', 'Object.getOwnPropertyNames');
-const getOwnPropertySymbols = JS('', 'Object.getOwnPropertySymbols');
+final defineProperty = JS('', 'Object.defineProperty');
+final getOwnPropertyDescriptor = JS('', 'Object.getOwnPropertyDescriptor');
+final getOwnPropertyNames = JS('', 'Object.getOwnPropertyNames');
+final getOwnPropertySymbols = JS('', 'Object.getOwnPropertySymbols');
-const hasOwnProperty = JS('', 'Object.prototype.hasOwnProperty');
+final hasOwnProperty = JS('', 'Object.prototype.hasOwnProperty');
// TODO(ochafik): Add ES6 class syntax support to JS intrinsics to avoid this.
-const StrongModeError = JS('', '''(function() {
+final StrongModeError = JS('', '''(function() {
function StrongModeError(message) {
Error.call(this);
this.message = message;
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698