Skip to content

Commit

Permalink
Bug 1651705: Part 2 - Create NativeWeakPtr to safely access native ob…
Browse files Browse the repository at this point in the history
…jects owned by Java objects across multiple threads; r=geckoview-reviewers,agi

* We rename the existing `NativePtr` struct to `NativePtrTraits`, as that is
  more descriptive of what that code actually does;
* We introduce `NativeWeakPtr` as a smart pointer type that holds a pointer
  to an object and allows its access in a thread-safe way. See comments.
* We replace some explicit uses of template types with type deduction via
  `auto` and `decltype(auto)`. This allows for more use of forward declarations.

Differential Revision: https://phabricator.services.mozilla.com/D87361
  • Loading branch information
dblohm7 committed Sep 21, 2020
1 parent 3214898 commit cf2a216
Show file tree
Hide file tree
Showing 3 changed files with 865 additions and 54 deletions.
Loading

0 comments on commit cf2a216

Please sign in to comment.