Igalia / wolvic-chromium

The official GitHub mirror of the Chromium source
https://chromium.googlesource.com/chromium/src/
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

Fix WolvicPermissionManager's ownership #98

Closed svillar closed 4 months ago

svillar commented 4 months ago

The permission manager ownership was not properly handled. On the one hand we were treating it as a singleton (because we're storing an instance in the class) but at the same time the constructor was not private so multiple instances could be created. Additionally the code calling the constructor was storing it in an unique_ptr. That didn't make much sense because the unique_ptr takes care of the ownership while at the same time we're keeping a pointer in the class. That sort of a mess was causing crashes when requesting permission like in Google Meet for example.

Fixes #97