Commit Graph

10 Commits

Author SHA1 Message Date
Miko Mynttinen
3df26bc8a5 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO
2018-06-01 17:59:07 +02:00
arthur.iakab
9588ba6d78 Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen
5afe37aefc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez
4b8b5e1717 Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Nicholas Nethercote
7dbfdaf890 Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP
2017-10-03 09:05:19 +11:00
Kris Maglione
9880082601 Bug 1402944: Part 7 - Move traceable channel registration to ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 6hGmh4VpJMQ
2017-09-27 18:15:39 -07:00
Nicholas Nethercote
9fda5528d2 Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ
2017-09-26 08:33:21 +10:00
Kris Maglione
1007cea3a2 Bug 1396652: Fix WebRequestService destructor ordering issue. r=mixedpuppy
MozReview-Commit-ID: HYDNYzb5bnM
2017-09-07 19:04:01 -07:00
Kris Maglione
74aea4d007 Bug 1396652: Ensure ordered destruction of channel entries at shutdown. r=mixedpuppy
When channel registrations aren't explicitly unregistred from JS, they're
instead unregistered when the entry object is cycle collected. When the
entries are created close to shutdown, that can leave some uncertainty as to
the order of destruction, and the WebRequestService might wind up being
destroyed before all of the entries. In that case, the registrations are
cleaned up when the hash entries hash table is being destroyed.

While that isn't strictly a problem, the entries expect to still be present in
the hash table when they're being destroyed, as a basic sanity check. This
patch ensures that we always remove entries from the hash table before it's
destroyed, so those invariants are maintained.

MozReview-Commit-ID: 5jWpFeFyjJZ
2017-09-04 14:31:26 -07:00
Kris Maglione
c3bdc948a1 Bug 1255894: Part 2 - Add mozIWebRequestService service for tracking filtered requests. r=mixedpuppy
In order to allow extensions running in a content process to connect extension
filters, we need to be able to track which requests they have permissions to
modify, and which processes they have permissions to modify them from.

This interface allows us to register channels that we've dispatched webRequest
listeners for, and the TabParent (and, by proxy, content parent) we've
dispatched them to. Extensions will only be able to filter those channels, and
only from those processes.

MozReview-Commit-ID: 46HTVeQ5ndi
2017-03-23 12:18:29 -07:00