Need to handle skipping mixins in a CustomElement

TBR=alanknight@google.com

Review URL: https://codereview.chromium.org//1368383002 .
This commit is contained in:
Terry L. Lucas 2015-09-28 07:29:14 -07:00
parent 3fa9c1f80a
commit 138888e566
2 changed files with 10 additions and 2 deletions

View file

@ -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;

View file

@ -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;