Commit Graph

22 Commits

Author SHA1 Message Date
Jan de Mooij
9d3bc542f6 Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap 2018-08-02 19:30:17 +02:00
Jan de Mooij
fddc23c346 Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Valentin Gosu
7621447682 Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

Differential Revision: https://phabricator.services.mozilla.com/D2239
2018-07-23 11:28:47 +00:00
Jeff Gilbert
70a22b2878 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Tomislav Jovanovic
ecc35e8e14 Bug 1466349 part 3 - Ignore ignorePath for privileged about: MatchPatterns r=aswan
Paths are all about: URIs have, so ignoring them doesn't make sense.

MozReview-Commit-ID: ATwAeI7m61z
2018-06-03 19:38:29 +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
Kris Maglione
2239a748b1 Bug 1456485: Part 1 - Support unrestricted matching in MatchPattern. r=zombie
This is grafted from the first part of bug 1425104.

MozReview-Commit-ID: 4aW2w81LDTI
2018-04-18 14:02:05 -07:00
Jan de Mooij
e5f8a28c84 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Sylvestre Ledru
055d8432e6 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR
2018-03-16 14:29:15 +01:00
Coroiu Cristina
8c03201dcc Backed out 2 changesets (bug 1443080) for spidermonkey build bustage at build/src/js/src/jit/BaselineCacheIRCompiler.cpp
Backed out changeset 7d509bb8a35d (bug 1443080)
Backed out changeset 53bdcd5937cd (bug 1443080)
2018-03-14 11:13:21 +02:00
Sylvestre Ledru
4a52aab337 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR
2018-03-05 13:43:54 +01:00
Kris Maglione
fd8a0b2ac6 Bug 1415644: Create a list of restricted domains. r=aswan,mixedpuppy
MozReview-Commit-ID: A0AkaBG33In
2018-03-03 16:28:18 -08:00
Andrew Swan
b80ff2efef Bug 1431371 Only grant activeTab to urls that match <all_urls> r=kmag
MozReview-Commit-ID: ApnAwGsIOaG
2018-01-26 19:54:34 -08: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
813dfdec77 Bug 1402944: Part 5 - Move request filtering and permission matching into ChannelWrapper. r=mixedpuppy,ehsan
This allows us to reuse the same URLInfo objects for each permission or
extension that we match, and also avoids a lot of XPConnect overhead we wind
up incurring when we access URI objects from the JS side.

MozReview-Commit-ID: GqgVRjQ3wYQ
2017-09-27 18:15:12 -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
bd93d990bf Bug 1397536: Avoid newURI overhead for MatchPattern. r=ehsan,mixedpuppy
Ehsan, can you please review the (trivial) WebIDL changes, and Shane the
WebRequest logic?

The change to allow strings in MatchPattern arguments removes a huge amount of
XPConnect overhead that accumulates when creating nsIURI objects for
WebRequest processing.

The change to re-use existing URI objects removes a huge amount of URI
creation overhead.

MozReview-Commit-ID: 3DJjAKJK1Sa
2017-09-06 21:56:45 -07:00
Masatoshi Kimura
c0943e4f30 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G
2017-07-29 20:50:21 +09:00
Shane Caraveo
0d1befea59 Bug 1271354 support moz-extension in webrequests, r=kmag
MozReview-Commit-ID: AFP68jIdHHo
2017-07-06 13:08:31 -07:00
Shane Caraveo
5107717e94 Bug 1367478 support websocket ws/wss protocol in matchpattern, r=kmag
MozReview-Commit-ID: 6cnRyWRnRzT
2017-06-07 12:16:14 -07:00
Kris Maglione
eb1e83769a Bug 1368102: Part 2 - Add WebExtensionContentScript bindings. r=billm,mixedpuppy
Bill, can you please review the binding code? Shane and zombie, can you please
review the content script matching?

MozReview-Commit-ID: IJB5s0a7r7S
2017-06-03 22:03:19 -07:00
Kris Maglione
3a36569b34 Bug 1322235: Part 1 - Add native MatchPattern and MatchGlob bindings. r=billm,aswan
Bill, can you please review the binding code, and the general sanity of the
platform code. Andrew and zombie, can you please matching algorithms and
tests.

Change summary:

The existing JavaScript matching code works well overall, but it needs to be
called a lot, particularly from hot code paths. In most cases, the overhead of
the matching code on its own adds up enough to cause a problem. When we have
to call out to JavaScript via XPConnect to make a policy decision, it adds up
even more.

These classes solve both of these problems by a) being very fast, and b) being
accessible directly from C++. They are particularly optimized for the common
cases where only literal or prefix matches are required, and they take special
steps to avoid virtual calls wherever possible, and caching computed URL
values so that they can be reused across many match operations without
additional overhead.

MozReview-Commit-ID: BZzPZDQRnl
2017-05-24 14:57:29 -07:00