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

Unified Diff: sdk/lib/html/dartium/html_dartium.dart

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:
Download patch
« no previous file with comments | « no previous file | tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 46d9e394e0b3553e482ec80459a61ada8a25d381..388e2a5b59b0393efeb108aa36961b6cba80059f 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -20365,10 +20365,8 @@ 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', ' ');
- 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) {
@@ -20478,7 +20476,7 @@ class HtmlDocument extends Document {
//
// 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++;
@@ -20493,7 +20491,7 @@ class HtmlDocument extends Document {
} 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--;
@@ -37188,10 +37186,10 @@ class Url extends DartHtmlDomObject implements UrlUtils {
if ((blob_OR_source_OR_stream is Blob || blob_OR_source_OR_stream == null)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
- if ((blob_OR_source_OR_stream is MediaStream)) {
+ if ((blob_OR_source_OR_stream is MediaSource)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
- if ((blob_OR_source_OR_stream is MediaSource)) {
+ if ((blob_OR_source_OR_stream is MediaStream)) {
return _blink.BlinkURL.instance.createObjectURL_Callback_1_(unwrap_jso(blob_OR_source_OR_stream));
}
throw new ArgumentError("Incorrect number or type of arguments");
« no previous file with comments | « no previous file | tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698