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

Unified Diff: tools/dom/templates/html/dartium/html_dartium.darttemplate

Issue 1390113003: Fix some build breaks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: TBR 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 | « tools/deps/dartium.deps/DEPS ('k') | 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: tools/dom/templates/html/dartium/html_dartium.darttemplate
diff --git a/tools/dom/templates/html/dartium/html_dartium.darttemplate b/tools/dom/templates/html/dartium/html_dartium.darttemplate
index 4bd7279dea509a1dab4397a3a9d88d2121f87e69..7d6572c5d0275b1e731f580c5d5d84cca25a9180 100644
--- a/tools/dom/templates/html/dartium/html_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/html_dartium.darttemplate
@@ -415,12 +415,17 @@ wrap_jso(jsObject) {
}
var constructor = js.JsNative.getProperty(jsObject, 'constructor');
- if (__interop_checks) {
- debug_or_assert("constructor != null", constructor != null);
+ if (constructor == null) {
+ // Perfectly valid case for JavaScript objects where __proto__ has
+ // intentionally been set to null.
+ js.setDartHtmlWrapperFor(jsObject, jsObject);
+ return jsObject;
}
var jsTypeName = js.JsNative.getProperty(constructor, 'name');
- if (__interop_checks) {
- debug_or_assert("constructor != null && jsTypeName.length > 0", constructor != null && jsTypeName.length > 0);
+ if (jsTypeName is! String || jsTypeName.length == 0) {
+ // Not an html type.
+ js.setDartHtmlWrapperFor(jsObject, jsObject);
+ return jsObject;
}
var dartClass_instance;
@@ -490,12 +495,17 @@ wrap_jso_no_SerializedScriptvalue(jsObject) {
}
var constructor = js.JsNative.getProperty(jsObject, 'constructor');
- if (__interop_checks) {
- debug_or_assert("constructor != null", constructor != null);
+ if (constructor == null) {
+ // Perfectly valid case for JavaScript objects where __proto__ has
+ // intentionally been set to null.
+ js.setDartHtmlWrapperFor(jsObject, jsObject);
+ return jsObject;
}
var jsTypeName = js.JsNative.getProperty(constructor, 'name');
- if (__interop_checks) {
- debug_or_assert("constructor != null && jsTypeName.length > 0", constructor != null && jsTypeName.length > 0);
+ if (jsTypeName is! String || jsTypeName.length == 0) {
+ // Not an html type.
+ js.setDartHtmlWrapperFor(jsObject, jsObject);
+ return jsObject;
}
var func = getHtmlCreateFunction(jsTypeName);
« no previous file with comments | « tools/deps/dartium.deps/DEPS ('k') | tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698