-
Notifications
You must be signed in to change notification settings - Fork 1.7k
js-interop 0.6: getInterceptor(receiver). Returns invalid(NativeTypedData) interceptor for js object. #25785
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
Comments
👍 |
@jacob314 Any updates on this? This is really a critical bug :( |
CC @kevmoo |
Error stack trace: |
This is actually a dart2js dart:html interceptor binding issue not an issue with the new JS interop. |
Try adding this script ahead of any dart.js code. <script>
// Provide a getTag hook to ensure that ensures normal JavaScript
// objects are not confused with DOM objects.
(dartNativeDispatchHooksTransformer =
window.dartNativeDispatchHooksTransformer || []).push(function (hooks) {
var getTag = hooks.getTag;
var toString = Object.prototype.toString;
hooks.getTag = function (obj) {
var tag = getTag(obj);
if (tag == null) return null;
// Validate that is a normal object.
if (toString.call(obj) == "[object Object]") return null;
return tag;
};
return hooks;
});
</script> |
@rakudrama I can confirm the hack suggested above solves the problem for us. Would be nice to have a proper fix, but we're effectively unblocked! Thanks! |
@rakudrama I tried if your hack works in my case (#26321), but I am still getting the same error. Is my case coming from a different cause? |
@rillomas Try including the
|
@thso I did. I had it wrong at first and fixed it after that at rillomas/js_interop_issue@4671061 but the error is still there. |
@rakudrama any update on this? |
I tried my case (#26321) with the latest Dart 1.17 and it seems the error has gone away, even without @rakudrama 's hack. |
@rakudrama do you consider this closed? @DisDis have you had a chance to look? |
@kevmoo issue still present in 1.8.0-dev0.0 |
@rakudrama any progress on the issues @DisDis is seeing? |
issue still present in 1.18.0-dev.2.0 |
I'm OO at the moment. I'll look at this when I get back, which is middle of next week due to the public holidays. |
We have released 1.18.0-dev.4.0, and entered cherry-pick season, so this will be in 1.18 stable unless we delay it and fix it. |
I'm still working on the issue. |
@rakudrama @jacob314 Any updates on this? Still on track for 1.19? |
Updating based on email discussion: This is still being investigated, but a safe fix is not available yet. We will try to get this done in 1.19, and if not then early in 1.20. |
@rakudrama updates? |
CL for review: https://codereview.chromium.org/2332953002/ |
Reproduce repo: https://github.com/DisDis/dart-slickgrid
Ubuntu 15.10 64Bit, Chrome 48.0.2564.109, Firefox 44.0.2
Dart 1.14.2, 1.15-dev2.0
The reason 'lookupAndCacheInterceptor' which causes getTagFunction for the input object. The tag name is obtained from the constructor. If the tag is the same as a reserved name, it does not return the correct Interceptor.
The example uses a function of DataView
workaround is to rename the functions DataView to DataView1
web/js/slick/slick.dataview.js
line 5: DataView: DataView1,
line 23: function DataView1(options) {
This is a very critical bug. so it is not possible to change the name of the function in external js libraries.
The text was updated successfully, but these errors were encountered: