fuchsia: JS FIDL bindings |
|||||||
Issue descriptionTo facilitate exposing things to other things.
,
Sep 12
Very (very) rough prototyping/hacking here: https://chromium-review.googlesource.com/c/chromium/src/+/1222697 This is targeting a Chromium-friendly JS output following: https://chromium.googlesource.com/chromium/src/+/master/styleguide/web/web.md#JavaScript. Some implications: - Annotating types with Closure annotations - No TS - Assuming a recent-ish JS engine Starting with the Dart fidlgen as a base, as well as design and tests that ianloic@ has done on a snazzy in-Fuchsia generator written in TS. Also TBD, I forked a few useful files from Garnet's fidl compiler which seemed helpful to unmarshal/resolve the json IR. As of this writing it only emits some borked hybrid mess of JS (enum, const, struct) and Dart (the rest). i.e. not much to look at yet. I also have no idea how it's actually going to do any calling, or get access to services, or hook into the build system, or really do much of anything in Chromium yet. So I'm not sure at all that this is the solution to any problem yet.
,
Sep 13
Yeah, I dunno. Doing this to target Closure instead of TypeScript seems pretty silly and awkward. Hrm.
,
Oct 1
Very native question: What's a difference between FIDL and Web IDL? In other words, why can't Fuchsia simply use Web IDL to expose things?
,
Oct 1
Re #4: FIDL is Fuchsia IDL, the platform-native IPC format. For various applications it will be useful to be able to have web-based content that is aware of platform/application specific (non-web-standard) APIs, equivalent to what we have today on various platforms with WebView. The FIDL/JS bindings described here will allow custom APIs to be injected for these kinds of use-cases, similar to the special Mojo/JS API bindings that e.g. Chrome's Media Router provides to its component extension. Perhaps I'm misunderstanding what you're suggesting with "simply use WebIDL", though?
,
Oct 3
My question is: Blink already has a Web IDL compiler. Why can't you reuse the IDL compiler for FIDL? In other words, does FIDL have a different syntax from Web IDL? For example, it looks like this CL (https://chromium-review.googlesource.com/c/chromium/src/+/1222697) is implementing a parser of IDL. Can you probably reuse the existing IDL parser (https://cs.chromium.org/chromium/src/tools/idl_parser/?q=idl_parser&sq=package:chromium&dr)?
,
Oct 3
Hi, thanks for taking a look. There's no parser here, just a generator. Yes, FIDL has a different syntax than Web IDL. The FIDL language is specified by https://fuchsia.googlesource.com/zircon/+/master/docs/fidl/language.md and is used to specify communication protocols between services on Fuchsia at the OS level. `fidlc` which is provided by the Fuchsia SDK parses the .fidl files and generates a type-resolved (sort of flattened) .json file representing the DOM the fidl represents. The compiler in the CL you linked then converts that json representation to .js code that can encode and decode messages in the format specified by https://fuchsia.googlesource.com/zircon/+/master/docs/fidl/wire-format/index.md. Other similar tools include one written in Go, which generates bindings for C++, Go, Rust, and Syzkaller: https://fuchsia.googlesource.com/garnet/+/master/go/src/fidl/compiler/backend (which is maintained by the Fuchsia team), and a Dart bindings generator https://fuchsia.googlesource.com/topaz/+/master/bin/fidlgen_dart/. The Fuchsia team does not maintain bindings for JavaScript though. So, I'm attempting to make an equivalent JavaScript version to those generators. For some APIs (for example in Cast) we would like to allow the .js to send and receive FIDL messages directly rather than writing send/receive in C++ for all of the APIs and then adding wrappers to expose that functionality to JS. In https://chromium-review.googlesource.com/c/chromium/src/+/1222697, I included a unittest binary to exercise the bindings. I'd like to run those tests by using v8 of course, hence the new introduced dependency.
,
Oct 3
Thanks for the details! (I'm wondering why FIDL needs to have a different syntax than Web IDL but that's not something I should have a strong opinion about. I understand the situation :-)
,
Oct 3
No idea! :) It's a reasonable question, but I don't really know much of the background on how the team settled on fidl other than it originally evolved from Mojo and .mojom files. I suspect some of the differences come from differing design requirements. For example, fidl is used to communicate with quite low-level services, so messages must be encode/decodable in plain C without any dynamic memory allocation.
,
Oct 3
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4411204b3a414c296efa418d9cbe56d52119e1b5 commit 4411204b3a414c296efa418d9cbe56d52119e1b5 Author: Scott Graham <scottmg@chromium.org> Date: Wed Oct 03 19:46:26 2018 fuchsia: Beginnings of FIDL JS bindings This is the very initial stages of writing a bindings generator to allow interop to/from JS with FIDL. The main pieces are: - the build time generator which consumes the JSON IR from `fidlc` and outputs a fidl.js - integration with gn in fidl_library.gni - a JS runtime support library (mostly helps with message encoding) - new unittest binary (which also currently holds some Zircon integration points that will eventually be moved to a C++ runtime support library.) There are many, many things it does not yet handle, e.g. responses (either sync or async), events, passing structs, passing unions, ... For reference, test/simple.fidl generates this https://gist.github.com/sgraham/3935c64d5bc1b67eea1f6e3b38fef6f1 Bug: 883496 Change-Id: I58e5d2b81213f20a3198b68cbd2bc01660ba58f7 Reviewed-on: https://chromium-review.googlesource.com/c/1222697 Reviewed-by: Jeremy Roman <jbroman@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Reviewed-by: Wez <wez@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org> Cr-Commit-Position: refs/heads/master@{#596329} [modify] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/BUILD.gn [modify] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/build/config/fuchsia/fidl_library.gni [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/BUILD.gn [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/DEPS [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/fidl.py [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/gen.py [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/runtime/fidl.mjs [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/runtime/zircon.cc [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/runtime/zircon.h [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/test/simple.fidl [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/third_party/__init__.py [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/third_party/enum34/LICENSE [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/third_party/enum34/README.chromium [add] https://crrev.com/4411204b3a414c296efa418d9cbe56d52119e1b5/tools/fuchsia/fidlgen_js/third_party/enum34/__init__.py
,
Oct 14
,
Oct 16
,
Oct 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e commit d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e Author: Scott Graham <scottmg@chromium.org> Date: Wed Oct 17 01:57:27 2018 fuchsia: Add support for FIDL/JS responses Responses are always returned asynchronously as JS promises (the newly added zx.objectWaitOne() helper also returns a promise). The wait and response are serviced by libasync waits, and so must be cancelled when the v8 context is torn down. The (default) dispatcher must outlive any v8 contexts with which it is used. Bug: 883496 Change-Id: Ib8735c6ec4196d36b53929341d57e843abaeea3b Reviewed-on: https://chromium-review.googlesource.com/c/1240204 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#600238} [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/gin/converter.cc [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/gin/converter.h [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/gin/public/gin_embedders.h [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/BUILD.gn [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/runtime/zircon.cc [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/runtime/zircon.h [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/d2f4ed4be95bf6d9fb5445a85baeba40ef51db5e/tools/fuchsia/fidlgen_js/test/simple.fidl
,
Oct 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/58ebea75e8d928714e94a466344243244e69a4ed commit 58ebea75e8d928714e94a466344243244e69a4ed Author: Scott Graham <scottmg@chromium.org> Date: Wed Oct 17 18:47:01 2018 fuchsia: FIDL JS struct support Now supporting defining and passing structs from JS -> C++. Bug: 883496 Change-Id: Ib1baf5d435f9e936393e31871f12e71f6ed79f33 Reviewed-on: https://chromium-review.googlesource.com/c/1244891 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#600497} [modify] https://crrev.com/58ebea75e8d928714e94a466344243244e69a4ed/tools/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/58ebea75e8d928714e94a466344243244e69a4ed/tools/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/58ebea75e8d928714e94a466344243244e69a4ed/tools/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/58ebea75e8d928714e94a466344243244e69a4ed/tools/fuchsia/fidlgen_js/test/simple.fidl
,
Oct 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22 commit ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22 Author: Scott Graham <scottmg@chromium.org> Date: Wed Oct 17 20:18:40 2018 fuchsia: FIDL JS: support nested structs in responses Implements vector and string decoding for responses and fixes/tests struct-in-struct. Bug: 883496 Change-Id: I9d518103fb28b93802a487765f5fefb65ef01ea1 Reviewed-on: https://chromium-review.googlesource.com/c/1246958 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#600537} [modify] https://crrev.com/ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22/tools/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22/tools/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22/tools/fuchsia/fidlgen_js/runtime/zircon.cc [modify] https://crrev.com/ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22/tools/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/ac6810c3c26804deea1a2ed1ebdf2a8f46e08b22/tools/fuchsia/fidlgen_js/test/simple.fidl
,
Oct 17
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/24f11a7b6de9857295bef2b1ebbb512aedd828c0 commit 24f11a7b6de9857295bef2b1ebbb512aedd828c0 Author: Scott Graham <scottmg@chromium.org> Date: Wed Oct 17 21:28:53 2018 fuchsia: FIDL JS: format gen.py with yapf --style=chromium Also, don't import * from fidl to avoid pylint complaining on Gerrit. With a couple tweaks to avoid 80col being exceeded for presubmit. No intended functionality change (and the generated fidl.js is unchanged). Bug: 883496 Change-Id: If4335f92d7630dd4b543dc686d2baf6aca5d2b6e Reviewed-on: https://chromium-review.googlesource.com/c/1258087 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#600562} [modify] https://crrev.com/24f11a7b6de9857295bef2b1ebbb512aedd828c0/tools/fuchsia/fidlgen_js/gen.py
,
Oct 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/b1370902bdf289681dc08f1ae3eb1282339d754b commit b1370902bdf289681dc08f1ae3eb1282339d754b Author: Scott Graham <scottmg@chromium.org> Date: Fri Oct 19 00:14:35 2018 fuchsia: Add fidlgen_js_unittests to bots Bug: 883496 Change-Id: If98ab4445ef5ee1a02d7c6bb1e5f4e3e770cfeba Reviewed-on: https://chromium-review.googlesource.com/c/1287205 Reviewed-by: John Budorick <jbudorick@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org> Cr-Commit-Position: refs/heads/master@{#600977} [modify] https://crrev.com/b1370902bdf289681dc08f1ae3eb1282339d754b/testing/buildbot/chromium.fyi.json [modify] https://crrev.com/b1370902bdf289681dc08f1ae3eb1282339d754b/testing/buildbot/chromium.linux.json [modify] https://crrev.com/b1370902bdf289681dc08f1ae3eb1282339d754b/testing/buildbot/gn_isolate_map.pyl [modify] https://crrev.com/b1370902bdf289681dc08f1ae3eb1282339d754b/testing/buildbot/test_suites.pyl
,
Oct 23
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2d91b4aa42886d07d770be6df218c014e967f2f1 commit 2d91b4aa42886d07d770be6df218c014e967f2f1 Author: Scott Graham <scottmg@chromium.org> Date: Tue Oct 23 17:21:18 2018 fuchsia: Simplify exposed bindings names Also, remove channelCreate and handleClose since they aren't yet useful, and we'll replace them with something better soon (MessagePort, Transferrable, etc.) Bug: 883496 Change-Id: I3861398035e79029cdbde01cc9a4ce4ea872ab0b Reviewed-on: https://chromium-review.googlesource.com/c/1292721 Reviewed-by: Kevin Marshall <kmarshall@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org> Cr-Commit-Position: refs/heads/master@{#601999} [modify] https://crrev.com/2d91b4aa42886d07d770be6df218c014e967f2f1/tools/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/2d91b4aa42886d07d770be6df218c014e967f2f1/tools/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/2d91b4aa42886d07d770be6df218c014e967f2f1/tools/fuchsia/fidlgen_js/runtime/zircon.cc [modify] https://crrev.com/2d91b4aa42886d07d770be6df218c014e967f2f1/tools/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc
,
Nov 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9b4bddfd6de177799647fdabc15e49be54ebe744 commit 9b4bddfd6de177799647fdabc15e49be54ebe744 Author: Scott Graham <scottmg@chromium.org> Date: Mon Nov 05 19:06:12 2018 Fuchsia: Implement handle passing in FIDL/JS Bug: 883496 Change-Id: Ia5a0e88ca4a1d41c6be4f81a4dc4cc46b74930a7 Reviewed-on: https://chromium-review.googlesource.com/c/1311082 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605405} [modify] https://crrev.com/9b4bddfd6de177799647fdabc15e49be54ebe744/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/9b4bddfd6de177799647fdabc15e49be54ebe744/build/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/9b4bddfd6de177799647fdabc15e49be54ebe744/build/fuchsia/fidlgen_js/runtime/zircon.cc [modify] https://crrev.com/9b4bddfd6de177799647fdabc15e49be54ebe744/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/9b4bddfd6de177799647fdabc15e49be54ebe744/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd60a551e79c6a8bf31e0eadb7abafe11c81b147 commit bd60a551e79c6a8bf31e0eadb7abafe11c81b147 Author: Scott Graham <scottmg@chromium.org> Date: Mon Nov 05 20:51:41 2018 Fuchsia: Implement handling of arrays in FIDL/JS Bug: 883496 Change-Id: I4981cf288566aed5f95e3ca3b8632e5462203ee3 Reviewed-on: https://chromium-review.googlesource.com/c/1311262 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605455} [modify] https://crrev.com/bd60a551e79c6a8bf31e0eadb7abafe11c81b147/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/bd60a551e79c6a8bf31e0eadb7abafe11c81b147/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/bd60a551e79c6a8bf31e0eadb7abafe11c81b147/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 5
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6f4137fd76ac87b4554c2fa80ede9ad77c6685c3 commit 6f4137fd76ac87b4554c2fa80ede9ad77c6685c3 Author: Scott Graham <scottmg@chromium.org> Date: Mon Nov 05 22:10:57 2018 Fuchsia: Implement sending unions from JS->C++ Bug: 883496 Change-Id: I2745399b530564c05e95f4375e04cac978454372 Reviewed-on: https://chromium-review.googlesource.com/c/1313417 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605488} [modify] https://crrev.com/6f4137fd76ac87b4554c2fa80ede9ad77c6685c3/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/6f4137fd76ac87b4554c2fa80ede9ad77c6685c3/build/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/6f4137fd76ac87b4554c2fa80ede9ad77c6685c3/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/6f4137fd76ac87b4554c2fa80ede9ad77c6685c3/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a0ca0340f2abe5d8d0d6427c8d3bb47d6b7f7665 commit a0ca0340f2abe5d8d0d6427c8d3bb47d6b7f7665 Author: Scott Graham <scottmg@chromium.org> Date: Tue Nov 06 00:22:09 2018 Fuchsia: Implement receive of unions to JS from C++ Bug: 883496 Change-Id: I402ef87f893488bcd15ec171e18add9918022a95 Reviewed-on: https://chromium-review.googlesource.com/c/1313570 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605528} [modify] https://crrev.com/a0ca0340f2abe5d8d0d6427c8d3bb47d6b7f7665/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/a0ca0340f2abe5d8d0d6427c8d3bb47d6b7f7665/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/a0ca0340f2abe5d8d0d6427c8d3bb47d6b7f7665/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6de6f090852edc44b9c97fb80bcf22c0593786a2 commit 6de6f090852edc44b9c97fb80bcf22c0593786a2 Author: Scott Graham <scottmg@chromium.org> Date: Tue Nov 06 05:40:41 2018 Fuchsia: Handling of more cases for default initialization in FIDL/JS Initializing a struct member with the value of an enum would previously fail to compile; implement this. This is slightly awkward because the front end does not scope the enum value to the enum like the C++ (and JS) bindings but rather only to the library. So the compiler needs to know the type to which it's being assigned and use that to determine how the enum's value is intended to be qualified. Bug: 883496 Change-Id: Id8a9f75d07bb0acb11963ecbd37d4915b36c28e0 Reviewed-on: https://chromium-review.googlesource.com/c/1313286 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605601} [modify] https://crrev.com/6de6f090852edc44b9c97fb80bcf22c0593786a2/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/6de6f090852edc44b9c97fb80bcf22c0593786a2/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/6de6f090852edc44b9c97fb80bcf22c0593786a2/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d32c33c2032b0d72d0831272184fa267d3813d43 commit d32c33c2032b0d72d0831272184fa267d3813d43 Author: Scott Graham <scottmg@chromium.org> Date: Tue Nov 06 18:19:15 2018 Fuchsia: Implement vector<string>, fix traversal order Previously the body of structs was traversed in-order, but out-of-line items were deferred to a queue, making traversal mostly breadth-first. Instead, fix encoding by emitting any out-of-line items by allocating (and filling) directly following the current item. Bug: 883496 Change-Id: If157930521e4cf5f89f702207defe91beb862def Reviewed-on: https://chromium-review.googlesource.com/c/1316429 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605745} [modify] https://crrev.com/d32c33c2032b0d72d0831272184fa267d3813d43/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/d32c33c2032b0d72d0831272184fa267d3813d43/build/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/d32c33c2032b0d72d0831272184fa267d3813d43/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/d32c33c2032b0d72d0831272184fa267d3813d43/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cb745a3edd5eb1f3e26721e21ec43b8f1e5bcff4 commit cb745a3edd5eb1f3e26721e21ec43b8f1e5bcff4 Author: Scott Graham <scottmg@chromium.org> Date: Tue Nov 06 21:49:23 2018 Fuchsia: Implement vectors-of-more-things in FIDL/JS Vectors of primitive types and strings were previously implemented; this extends support to vectors of unions and structs. Bug: 883496 Change-Id: Id00174b05d04c3f432fae39112afde658e533806 Reviewed-on: https://chromium-review.googlesource.com/c/1318676 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#605826} [modify] https://crrev.com/cb745a3edd5eb1f3e26721e21ec43b8f1e5bcff4/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/cb745a3edd5eb1f3e26721e21ec43b8f1e5bcff4/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/cb745a3edd5eb1f3e26721e21ec43b8f1e5bcff4/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 8
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ee2630a9c5f0d653041c8d05ce475afc161b23bd commit ee2630a9c5f0d653041c8d05ce475afc161b23bd Author: Scott Graham <scottmg@chromium.org> Date: Thu Nov 08 00:59:44 2018 Fuchsia: Add missing FIDL/JS vector cases for bool, float32, float64 This also required implementing the type tables for int64/uint64 as BigInt. Additionally, some test support code to pull BigInt out of V8 as 64-bit types because gin assumes always-Number. Bug: 883496 Change-Id: I10d07124e59f0fdde8f053007eca30508751b211 Reviewed-on: https://chromium-review.googlesource.com/c/1318729 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606261} [modify] https://crrev.com/ee2630a9c5f0d653041c8d05ce475afc161b23bd/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/ee2630a9c5f0d653041c8d05ce475afc161b23bd/build/fuchsia/fidlgen_js/runtime/fidl.mjs [modify] https://crrev.com/ee2630a9c5f0d653041c8d05ce475afc161b23bd/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/ee2630a9c5f0d653041c8d05ce475afc161b23bd/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c438e9912ea8b48536b977598f908162b7f6b295 commit c438e9912ea8b48536b977598f908162b7f6b295 Author: Scott Graham <scottmg@chromium.org> Date: Thu Nov 08 02:37:40 2018 Fuchsia: Implement passing of vector<handle<X>> in FIDL/JS Bug: 883496 Change-Id: I2a769b4779ff0f56622ed62099ee0b620aefb16e Reviewed-on: https://chromium-review.googlesource.com/c/1318745 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606295} [modify] https://crrev.com/c438e9912ea8b48536b977598f908162b7f6b295/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/c438e9912ea8b48536b977598f908162b7f6b295/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/c438e9912ea8b48536b977598f908162b7f6b295/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/987097ee69f35bdc8b5ac93c489c944b30eb580c commit 987097ee69f35bdc8b5ac93c489c944b30eb580c Author: Scott Graham <scottmg@chromium.org> Date: Thu Nov 08 05:25:07 2018 Fuchsia: Fix handling of nullable vectors in FIDL/JS Bug: 883496 Change-Id: I656ef4172089f65b6febf0ba3075a510bb4e9e11 Reviewed-on: https://chromium-review.googlesource.com/c/1318835 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606354} [modify] https://crrev.com/987097ee69f35bdc8b5ac93c489c944b30eb580c/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/987097ee69f35bdc8b5ac93c489c944b30eb580c/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/987097ee69f35bdc8b5ac93c489c944b30eb580c/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8be79151580abce8c361e17f74f61b2c961e3a00 commit 8be79151580abce8c361e17f74f61b2c961e3a00 Author: Scott Graham <scottmg@chromium.org> Date: Thu Nov 08 17:55:41 2018 Fuchsia: Improve handling of constant values in FIDL/JS - Properly suffixes BigInt constants with 'n' - Fixes stringification of constants into valid .js syntax - Improve default values handling in structs which was only partially implemented previously Bug: 883496 Change-Id: Id270d2f34dd40fa970d58448c1002c691db35a87 Reviewed-on: https://chromium-review.googlesource.com/c/1321577 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606529} [modify] https://crrev.com/8be79151580abce8c361e17f74f61b2c961e3a00/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/8be79151580abce8c361e17f74f61b2c961e3a00/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/8be79151580abce8c361e17f74f61b2c961e3a00/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1453d9de047aedd6b084f3abdacb858109c0f576 commit 1453d9de047aedd6b084f3abdacb858109c0f576 Author: Scott Graham <scottmg@chromium.org> Date: Thu Nov 08 19:40:26 2018 Fuchsia: Add support for vector of enum in FIDL/JS Bug: 883496 Change-Id: Ib611c2d195b401475bb343099c8b12a644e942a7 Reviewed-on: https://chromium-review.googlesource.com/c/1324095 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606569} [modify] https://crrev.com/1453d9de047aedd6b084f3abdacb858109c0f576/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/1453d9de047aedd6b084f3abdacb858109c0f576/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/1453d9de047aedd6b084f3abdacb858109c0f576/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 8
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a3e345885f6e31a236ec75efabf8ac2e61c93041 commit a3e345885f6e31a236ec75efabf8ac2e61c93041 Author: Scott Graham <scottmg@chromium.org> Date: Thu Nov 08 21:56:06 2018 Fuchsia: Handle references to types later in file in FIDL/JS Bug: 883496 Change-Id: Ic8973eb46a68ecf09a57572b1d694cb4812c897f Reviewed-on: https://chromium-review.googlesource.com/c/1324209 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606613} [modify] https://crrev.com/a3e345885f6e31a236ec75efabf8ac2e61c93041/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/a3e345885f6e31a236ec75efabf8ac2e61c93041/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6c65375765dac98249a8b3bfe596845bf0bae3d7 commit 6c65375765dac98249a8b3bfe596845bf0bae3d7 Author: Scott Graham <scottmg@chromium.org> Date: Fri Nov 09 00:37:32 2018 Fuchsia: Implement request<Interface> in FIDL/JS Fairly basic and the connection must be manually torn down for now, but allows requesting an interface implemention from the JS side. Bug: 883496 Change-Id: I8367fd50097403ee2f9911657afbabdd8d461a41 Reviewed-on: https://chromium-review.googlesource.com/c/1324929 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Wez <wez@chromium.org> Cr-Commit-Position: refs/heads/master@{#606663} [modify] https://crrev.com/6c65375765dac98249a8b3bfe596845bf0bae3d7/build/fuchsia/fidlgen_js/gen.py [modify] https://crrev.com/6c65375765dac98249a8b3bfe596845bf0bae3d7/build/fuchsia/fidlgen_js/runtime/zircon.cc [modify] https://crrev.com/6c65375765dac98249a8b3bfe596845bf0bae3d7/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc [modify] https://crrev.com/6c65375765dac98249a8b3bfe596845bf0bae3d7/build/fuchsia/fidlgen_js/test/simple.fidl
,
Nov 27
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/52f0d9110df3466dc3452a44b0b136d20b181534 commit 52f0d9110df3466dc3452a44b0b136d20b181534 Author: Dan Elphick <delphick@chromium.org> Date: Tue Nov 27 20:03:27 2018 [cleanup] Fix deprecated V8 function usage in zircon.cc Fixes uses of deprecated Object::Set and FunctionTemplate::GetFunction to use Context version that return Maybe values. Bug: v8:7283, v8:7295, v8:8238, chromium:883496 Change-Id: Ia400ec8b36d138b9f6b87c4a91f7ccb12c2eeefa Reviewed-on: https://chromium-review.googlesource.com/c/1352314 Commit-Queue: Dan Elphick <delphick@chromium.org> Reviewed-by: Scott Graham <scottmg@chromium.org> Cr-Commit-Position: refs/heads/master@{#611276} [modify] https://crrev.com/52f0d9110df3466dc3452a44b0b136d20b181534/build/fuchsia/fidlgen_js/runtime/zircon.cc
,
Jan 19
(4 days ago)
|
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by scottmg@chromium.org
, Sep 12Status: Started (was: Untriaged)