Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,553
    • Issues 1,553
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 219
    • Merge requests 219
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gtkgtk
  • Merge requests
  • !4675

Keep FileChooserNative alive while a portal is running

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Emmanuele Bassi requested to merge ebassi/issue-4883 into main Apr 29, 2022
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 1

Even if the FileChooserNative instance drops out on us while we're still waiting for the portal to answer, we should keep the data and pointers alive until the sequence of asynchronous operations is running. The code already tries to do that, by acquiring a strong reference to the GtkFileChooserNative instance, but it's also freeing data as soon as the dialog is hidden, while asynchronous callbacks that will look at the fields on that data are still in flight.

To avoid that, we defer freeing the data until the asynchronous callbacks are invoked, and we keep a reference on the dialog while we're emitting signals on it.

Fixes: #4883 (closed)

Edited May 02, 2022 by Emmanuele Bassi
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ebassi/issue-4883