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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 1281523003: dart2js: Don't zone-register callbacks in async functions for every await. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Upload Created 5 years, 4 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
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 275ba80e4cf9d6588921bdf07d792b9bb1f2c92a..3242982b4330b7347c9171439da7e399dc9ac426 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -1012,9 +1012,10 @@ class LibraryElementX
/** Look up a top-level element in this library, but only look for
* non-imported elements. Returns null if no such element exist. */
Element findLocal(String elementName) {
- // TODO(johnniwinther): How to handle injected elements in the patch
- // library?
Element result = localScope.lookup(elementName);
+ if (result == null && isPatched) {
+ result = patch.localScope.lookup(elementName);
+ }
Lasse Reichstein Nielsen 2015/08/12 09:46:55 Unrelated change?
floitsch 2015/08/12 13:30:46 No. necessary, because we are looking up an elemen
if (result == null || result.library != this) return null;
return result;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | pkg/compiler/lib/src/js_backend/backend.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698