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

Unified Diff: sdk/lib/_internal/js_runtime/lib/mirrors_patch.dart

Issue 2564383002: Make some VM libraries patch cleanly using the analyzer. (Closed)
Patch Set: Created 4 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
Index: sdk/lib/_internal/js_runtime/lib/mirrors_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/mirrors_patch.dart b/sdk/lib/_internal/js_runtime/lib/mirrors_patch.dart
index 758b1647a6b7893e56999662b6539089c7431597..eb6319c591d9f7d977ba472d608697c325b30708 100644
--- a/sdk/lib/_internal/js_runtime/lib/mirrors_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/mirrors_patch.dart
@@ -10,6 +10,12 @@ import 'dart:_js_mirrors' as js;
@patch
class MirrorSystem {
@patch
+ LibraryMirror findLibrary(Symbol libraryName) {
+ return libraries.values.singleWhere(
+ (library) => library.simpleName == libraryName);
+ }
+
+ @patch
static String getName(Symbol symbol) => js.getName(symbol);
@patch

Powered by Google App Engine
This is Rietveld 408576698