mirror of
https://github.com/dart-lang/sdk
synced 2024-09-21 07:31:32 +00:00
Need to handle skipping mixins in a CustomElement
TBR=alanknight@google.com Review URL: https://codereview.chromium.org//1368383002 .
This commit is contained in:
parent
3fa9c1f80a
commit
138888e566
|
@ -20231,7 +20231,7 @@ class HtmlDocument extends Document {
|
|||
|
||||
// Get the created constructor source and look at the initializer;
|
||||
// Must call super.created() if not its as an error.
|
||||
var createdSource = methodMirror.source.replaceAll('\n', ' ');
|
||||
var createdSource = methodMirror.source?.replaceAll('\n', ' ');
|
||||
RegExp regExp = new RegExp(r":(.*?)(;|}|\n)");
|
||||
var match = regExp.firstMatch(createdSource);
|
||||
superCreatedCalled = match.input.substring(match.start,match.end).contains("super.created(");
|
||||
|
@ -20244,6 +20244,10 @@ class HtmlDocument extends Document {
|
|||
}
|
||||
|
||||
classMirror = classMirror.superclass;
|
||||
while (classMirror != classMirror.mixin) {
|
||||
// Skip the mixins.
|
||||
classMirror = classMirror.superclass;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -282,7 +282,7 @@ $if DARTIUM
|
|||
|
||||
// Get the created constructor source and look at the initializer;
|
||||
// Must call super.created() if not its as an error.
|
||||
var createdSource = methodMirror.source.replaceAll('\n', ' ');
|
||||
var createdSource = methodMirror.source?.replaceAll('\n', ' ');
|
||||
RegExp regExp = new RegExp(r":(.*?)(;|}|\n)");
|
||||
var match = regExp.firstMatch(createdSource);
|
||||
superCreatedCalled = match.input.substring(match.start,match.end).contains("super.created(");
|
||||
|
@ -295,6 +295,10 @@ $if DARTIUM
|
|||
}
|
||||
|
||||
classMirror = classMirror.superclass;
|
||||
while (classMirror != classMirror.mixin) {
|
||||
// Skip the mixins.
|
||||
classMirror = classMirror.superclass;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue