forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1877672 - Make FunctionRef a MOZ_TEMPORARY_CLASS. r=nika
This prevents it from being used in the foot-gunny way described in comment 0. This in turn allows us to add a constructor for temporary callables. Turns out we only had test usages of non-temporary FunctionRefs, so this is much simpler than the initial approach I considered. Fix the tests to keep compiling, and add a test for the new constructor. Differential Revision: https://phabricator.services.mozilla.com/D200157
- Loading branch information
Showing
3 changed files
with
51 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters