Closed Bug 1913982 Opened 1 year ago Closed 1 year ago

Re-enable UniFFI JS callback interfaces

Categories

(Toolkit :: UniFFI Bindings, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: bdk, Assigned: bdk)

References

Details

Attachments

(1 file)

We lost this functionality with the upgrade to UniFFI 0.27. Let's get this working again with the new FFI.

Assignee: nobody → bdeankawamura
Status: NEW → ASSIGNED
Blocks: 1918137
Depends on: 1918509

The FFI for this changed upstream. Instead of registering a single
function that inputs a single buffer packed with all arguments, you now
register a function for each method where there is a 1-1 mapping of
arguments. The entire interface is represented by a "vtable" -- AKA a
struct that has a field for each of the method handler functions

To implement the methods, I stole the pattern we were using for regular
calls where we define a base class that's implemented by normal code and
a subclass that's implemented by generated code.

Registering/deregistering callback interfaces is now handled by the
generated code directly. It's simpler this way and now that we don't
have the split between regular and fixture scaffolding, there's not much
need for shared code to handle this.

Kept the decision before to only support "fire-and-forget" callbacks. I
think we will want to revisit this when the we support UniFFI async, but
we can save that for later.

Pushed by bdeankawamura@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5052882d0b42 Re-enable UniFFI callback interfaces, r=nika,lina
Backout by imoraru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/532618cfc020 Backed out 3 changesets (bug 1913982, bug 1918509, bug 1918134) for causing hazard build bustages related to UniFFI. CLOSED TREE
Pushed by bdeankawamura@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dfa9b07ccca8 Re-enable UniFFI callback interfaces, r=nika,lina
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: