-
Notifications
You must be signed in to change notification settings - Fork 1.7k
frogc doesn't work with fields on interfaces that wrap native JavaScript objects #763
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
I'm guessing fields aren't using the hidden native convention. Added Area-Frog label. |
This is likely not a real compiler issue. It's due to how I'm working around bugs in the html library. I'm not using the generated wrappers. Instead I'm using a native function to create a JavaScript object and "cast" it directly to the interface type. |
Ah, that makes sense. If you're using native JS, you might be able to put a block of Dart code after the native, like this: I'm not sure if that will work (since AudioProcessingEvent is an interface) but worth a shot. |
This comment was originally written by [email protected] Added Triaged label. |
Added this to the FrogEditor milestone. |
based on comments above, I don't think this was a real compiler issue. Added Invalid label. |
…ions) https://dart.googlesource.com/protobuf/+log/1d175bef6043..ba29983968de 2022-10-18 [email protected] protoc_plugin: Reword some of the documentation (#766) 2022-10-18 [email protected] protoc_plugin: Improve "is map field" check (#765) 2022-10-18 [email protected] Update CHANGELOG: mention #751 2022-10-18 [email protected] Add CHANGELOG entry for #760, #763 2022-10-18 [email protected] Fix `null` handling in proto3 JSON deserializer (#763) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/dart-protobuf-dart-sdk Please CC [email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Dart Protobuf Support: https://github.com/dart-lang/protobuf/issues To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md Tbr: [email protected] Change-Id: I5502c8ee170701888956534cbd92473a24435fea Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264664 Reviewed-by: Nate Bosch <[email protected]> Commit-Queue: Nate Bosch <[email protected]>
The html API generates a bunch of interfaces that are wrappers around JavaScript objects. Many of them have fields. For example:
interface AudioProcessingEvent extends Event {
AudioBuffer get inputBuffer();
AudioBuffer get outputBuffer();
}
When I actually try to use any of these fields in Dart, I get an error:
Uncaught TypeError: Object #<AudioProcessingEvent> has no method 'get$outputBuffer'
It appears that frogc is using its own calling convention (calling a method) instead of doing it the native JavaScript way (accessing a field).
(Also, shouldn't this
The text was updated successfully, but these errors were encountered: