gecko-dev/docshell
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
..
base Bug 1223932 - delete guard object uses from the tree; r=jwalden 2020-07-30 14:22:38 +00:00
build Bug 1464542: Part 3b - Add existing Services.jsm registrations to the new services cache. r=mccr8,geckoview-reviewers,agi 2020-07-09 21:42:25 +00:00
resources/content Bug 1562642 - add missing license in docshell/resources/content/netError.js r=smaug 2019-11-12 08:26:18 +00:00
shistory Bug 1655670 - Set default title of session history entry to the URL for session history in the parent. r=smaug 2020-07-28 12:05:37 +00:00
test Bug 1655549 - Implement BrowsingContext::GetAllBrowsingContextsInSubtree, r=nika 2020-07-29 21:10:36 +00:00
moz.build Bug 1594981 - update Core::DOM* and Core::Storage* bugzilla product and component meta data in moz.build files after reorganization in bug 1594717. r=annevk 2019-11-08 12:17:57 +00:00