| Index: pkg/compiler/lib/src/common/backend_api.dart
|
| diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
|
| index 69031154c8decfc5b4e17c7c01bfbaf2af0d0624..c4c9020931b664c97d09d99658e28d06800b3508 100644
|
| --- a/pkg/compiler/lib/src/common/backend_api.dart
|
| +++ b/pkg/compiler/lib/src/common/backend_api.dart
|
| @@ -273,23 +273,25 @@ abstract class Backend extends Target {
|
| /// been scanned.
|
| Future onLibraryScanned(LibraryElement library, LibraryLoader loader) {
|
| // TODO(johnniwinther): Move this to [JavaScriptBackend].
|
| - if (canLibraryUseNative(library)) {
|
| + if (!compiler.serialization.isDeserialized(library)) {
|
| + if (canLibraryUseNative(library)) {
|
| + library.forEachLocalMember((Element element) {
|
| + if (element.isClass) {
|
| + checkNativeAnnotation(compiler, element);
|
| + }
|
| + });
|
| + }
|
| + checkJsInteropAnnotation(compiler, library);
|
| library.forEachLocalMember((Element element) {
|
| - if (element.isClass) {
|
| - checkNativeAnnotation(compiler, element);
|
| + checkJsInteropAnnotation(compiler, element);
|
| + if (element.isClass && isJsInterop(element)) {
|
| + ClassElement classElement = element;
|
| + classElement.forEachMember((_, memberElement) {
|
| + checkJsInteropAnnotation(compiler, memberElement);
|
| + });
|
| }
|
| });
|
| }
|
| - checkJsInteropAnnotation(compiler, library);
|
| - library.forEachLocalMember((Element element) {
|
| - checkJsInteropAnnotation(compiler, element);
|
| - if (element.isClass && isJsInterop(element)) {
|
| - ClassElement classElement = element;
|
| - classElement.forEachMember((_, memberElement) {
|
| - checkJsInteropAnnotation(compiler, memberElement);
|
| - });
|
| - }
|
| - });
|
| return new Future.value();
|
| }
|
|
|
|
|