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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 1370513003: Update to handle expections in custom element's created constructor (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged 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:
Download patch
« no previous file with comments | « no previous file | tests/html/html.status » ('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 efdef92d354ce5d45f48a5b42352dc03fc95eaae..5eb7ba7fe2551664203de468a67f9b4ac2c2cb6b 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -20254,14 +20254,19 @@ class HtmlDocument extends Document {
if (_getJSClassName(reflectClass(customElementClass).superclass) != null && creating < 2) {
creating++;
- var dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
-
- // 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.
- $this['dart_class'] = dartClass;
-
- creating--;
+ var dartClass;
+ try {
+ dartClass = _blink.Blink_Utils.constructElement(customElementClass, $this);
+ } catch (e) {
+ dartClass = null;
+ } 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.
+ $this['dart_class'] = dartClass;
+
+ creating--;
+ }
}
});
elemProto['attributeChangedCallback'] = new js.JsFunction.withThis(($this, attrName, oldVal, newVal) {
@@ -37071,10 +37076,10 @@ class Url extends NativeFieldWrapperClass2 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 MediaSource)) {
+ if ((blob_OR_source_OR_stream is MediaStream)) {
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));
}
throw new ArgumentError("Incorrect number or type of arguments");
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698