New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strange dart2js+unchecked+shadowdom+htmldocument bug #14720
Comments
what seems to be happening:
It's not clear why we're getting the wrong interceptor, and why it only happens sometimes. |
even stranger: according to Siggi this happens more when he switches shadow_dom polyfill (and custom elements) to .min.js |
Maybe Stephen has some insights? cc @rakudrama. |
Marked this as blocking #14326. |
This comment was originally written by @rbishop-bah A snippet from the wild that may or may not help: createFragment$3$treeSanitizer$validator: function(receiver, html, treeSanitizer, validator) { |
Added this to the M9 milestone. |
This comment was originally written by @rbishop-bah See discussion: |
Chatted with Stephen. Our thought here is the interceptor lookup is probably broken in Shadow DOM polyfill. The reason it only reproduces in checked mode+mirrors: * mirrors cause more things to be dynamically dispatched
|
Marked this as blocking #15253. |
Removed Priority-Unassigned label. |
This comment was originally written by @rbishop-bah FYI, refactoring my code to use dart:js exclusively instead of package js circumvented this issue for me. |
Unmarked this as blocking #15253. |
Some updates about this bug. Stephen has an idea about how to fix this on the dart2js side of things. He thinks it might be better to fix it there instead of the shadow_dom polyfill since this kind of issue can arise again in the future with other libraries that do similar things in JS. I tried to make the example smaller, and here is a simplified example that can be used to reproduce the problem without depending on polymer. a.dart: a.html: Where a.dart.js is generated by calling: dart2js --disable-type-inference a.dart -o a.dart.js Adding the '--disable-type-inference' flag makes this error trigger consistently. Applying Stephen's patch in the generated code (https://codereview.chromium.org/86993002) gets rid of the error. |
Stephen fixed this a while ago Added Fixed label. |
Removed Library-ShadowDOM label. |
see notes here: https://codereview.chromium.org/54983011/
adding
import 'dart:mirrors'
to a polymer test is enough to cause the failure. The failure happens after the test has already passed, when the unittest framework is trying to replace the innerHtml with the results.Tentatively, I'm guessing this is related to ShadowDOM. But it might reproduce with just dart2js mirrors & HTML.
The text was updated successfully, but these errors were encountered: