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

Unified Diff: tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate

Issue 1399133003: Make the check for calling super.created not sensitive to line delimiters (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 6d3ecc34e18e46c006b1f438b4ee7a9ded82a8b0..3c6e3a477af78433d746098537ffe098b717917a 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -282,10 +282,8 @@ $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', ' ');
- RegExp regExp = new RegExp(r":(.*?)(;|}|\n)");
- var match = regExp.firstMatch(createdSource);
- superCreatedCalled = match.input.substring(match.start,match.end).contains("super.created(");
+ var createdSource = methodMirror.source;
+ superCreatedCalled = createdSource.contains("super.created(");
}
if (!superCreatedCalled) {
@@ -400,7 +398,7 @@ $else
//
// See https://github.com/dart-lang/sdk/issues/23666
int creating = 0;
- // TODO(jacobr): warning:
+ // TODO(jacobr): warning:
elemProto['createdCallback'] = js.JsNative.withThis(($this) {
if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
creating++;
@@ -415,7 +413,7 @@ $else
} finally {
// Need to remember the Dart class that was created for this custom so
// return it and setup the blink_jsObject to the $this that we'll be working
- // with as we talk to blink.
+ // with as we talk to blink.
js.setDartHtmlWrapperFor($this, dartClass);
creating--;
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698