-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
XMLHttpRequest broken in Dartium #3466
Comments
This comment was originally written by [email protected] Sam, may you provide more details? Do you create XMLHttpRequest in DOM-enabled isolate? Full snippet is really appreciated. Added Area-Dartium, NeedsInfo labels. |
This comment was originally written by [email protected] Apologies for the lack of detail, I assumed the resolver failure meant it was completely broken. I'm not creating any isolates. The full program is complex and includes obfuscated javascript not under my control, I can send it to you internally if that helps. It's not easy for me to identify what part is failing, as Dartium doesn't provide a stack trace, and simply points at line 1 of my source file. I can try to cut it down to a simple example by trial and error. |
This comment was originally written by [email protected] Sam, do you run Dart natively or compile it to JS first? |
This comment was originally written by [email protected] This is natively. |
This comment was originally written by [email protected] I see, thanks. If you can give me a pointer to the app, even messy one, I should be able to debug it. |
This comment was originally written by [email protected] That looks like DartVM bug, but please, reassign, if I am wrong. Assigning to Siva for further dispatches. In my case native resolver is invoked for instance method declared as: void setRequestHeader(String header, String value) native "XMLHttpRequest_setRequestHeader_Callback"; with argument count 2 and here Dartium fails to dispatch as it expects 3 args method (this and two remaining args.) How to debug (on Linux):
./out/Debug/chrome --disable-hang-monitor --disable-seccomp-sandbox --renderer-cmd-prefix="xterm -e gdb --args" --user-data-dir http://tunafish.muc.corp.google.com/samples/schedule/
p (*name.ascii().m_buffer.m_ptr).m_vector.m_buffer
Set owner to @a-siva. |
This comment was originally written by [email protected] |
We seem to be creating an implicit closure function of setRequestHeader somewhere. Since we don't count 'this' in the number of parameters for an implicit closure function (it is a captured variable in the context) we end up with argument count being 2 when we come down to resolve the native function. A simple test below demonstrates the issue: void MyNativeClosure(Dart_NativeArguments args) { static Dart_NativeFunction MyNativeClosureResolver(Dart_Handle name, TEST_CASE(NativeFunctionClosure) { Dart_Handle result; // Load a test script. result = Dart_Invoke(lib, Dart_NewString("testMain"), 0, NULL); The spec is not clear on whether it is legal to create an implicit closure of a native function, we should probably not allow that. |
Added this to the M1 milestone. |
Changes: ``` > git log --format="%C(auto) %h %s" c4e9ddc..9bf4289 https://dart.googlesource.com/pub.git/+/9bf4289d Top-level --colors flag (#3467) https://dart.googlesource.com/pub.git/+/54eb1851 Hide --trace in the embedding (#3466) https://dart.googlesource.com/pub.git/+/b9751fdb Fix stack-trace expectation (#3460) ``` Diff: https://dart.googlesource.com/pub.git/+/c4e9ddc888c3aa89ef4462f0c4298929191e32b9~..9bf4289d6fd5d6872a8929d6312bbd7098f3ea9c/ Change-Id: I5313721779a5a2cda825316a8ece6ed0cd57260e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248803 Reviewed-by: Jonas Jensen <[email protected]> Auto-Submit: Sigurd Meldgaard <[email protected]> Reviewed-by: Sarah Zakarias <[email protected]> Commit-Queue: Sigurd Meldgaard <[email protected]>
…st, vector_math. Revisions updated by `dart tools/rev_sdk_deps.dart`. collection (https://github.com/dart-lang/collection/compare/db343da..0a2885a): 0a2885a 2023-07-25 Devon Carew prep for publishing 1.18.0 (#299) dartdoc (https://github.com/dart-lang/dartdoc/compare/a04ac3e..1cf8870): 1cf88707 2023-07-26 Sam Rawlins Convert 'p' prefixes to 'path' in tool/ (#3472) d44c8056 2023-07-26 Sam Rawlins Move a few more grinder tasks to package:args commands (#3468) f66eb72d 2023-07-26 Sam Rawlins Use path as import prefix in lib/ and test/ (#3471) 34441f21 2023-07-25 Sam Rawlins Move flutter-doc tasks to package:args; remove unused grinder tasks (#3466) ecosystem (https://github.com/dart-lang/ecosystem/compare/27ff3e9..97fc1a7): 97fc1a7 2023-07-25 Moritz Fix comment posting from forks (#144) test (https://github.com/dart-lang/test/compare/37e54e3..7f81dee): 7f81deea 2023-07-24 Nate Bosch Drop the Condition abstraction (#1956) vector_math (https://github.com/google/vector_math.dart/compare/048777a..88bada3): 88bada3 2023-07-26 John McCutchan Revert "Fix rotation around Y axis (#262)" (#300) Change-Id: Ib7bc8c1bab60450e6b328c3075207adef4cf642b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316621 Commit-Queue: Devon Carew <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
This issue was originally filed by [email protected]
In latest build (dartium-lucid64-inc-8445.8445)
Internal error: '/mnt/data/b/build/slave/dartium-lucid64-inc/build/src/out/Release/obj/gen/webkit/bindings/dart/dart/XMLHttpRequestImplementation.dart': Error: line 6 pos 894: native function 'XMLHttpRequest_setRequestHeader_Callback' cannot be found
_addEventListener_1@33cc944a ( type , listener ) ; return ; } _addEventListener_2@33cc944a ( type , listener , useCapture ) ; } void _addEventListener_1@33cc944a ( type , listener ) native XMLHttpRequest_addEventListener_1_Callback ; void _addEventListener_2@33cc944a ( type , /samples/schedule/schedule.dart:1
Build dartium-lucid64-inc-8053.8053 worked fine.
The text was updated successfully, but these errors were encountered: