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

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

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 65742316c66ff25e990a162e3b8f69e1f1b68f9f..066fedd54aba5add3c47b60775aa6c15009d513a 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -225,7 +225,8 @@ abstract class ElementX extends Element with ElementCommon {
String _fixedBackendName = null;
bool _isNative = false;
- bool get isNative => _isNative;
+ bool isJsInterop = false;
+ bool get isNative => _isNative || isJsInterop;
bool get hasFixedBackendName => _fixedBackendName != null;
String get fixedBackendName => _fixedBackendName;
// Marks this element as a native element.
@@ -2419,7 +2420,7 @@ abstract class BaseClassElementX extends ElementX
return asInstanceOf(compiler.functionClass) != null || callType != null;
}
- bool get isNative => nativeTagInfo != null;
+ bool get isNative => nativeTagInfo != null || isJsInterop;
void setNative(String name) {
// TODO(johnniwinther): Assert that this is only called once. The memory

Powered by Google App Engine
This is Rietveld 408576698