Commit Graph

35 Commits

Author SHA1 Message Date
Sylvestre Ledru
e5a134f73a Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset
2018-11-30 11:46:48 +01:00
Kris Maglione
be3b740132 Bug 1495748: Make sure ChannelWrappers get cleaned up before JS engine shutdown. r=aswan,mccr8
The gross contortions here are required to deal with the deferred finalizers
HTTP channels use for their property bags. The actual channels get destroyed
relatively early during shutdown, but their property bag hashes which hold our
ChannelWrapper reference end up being destroyed after JS engine shutdown,
which gives us no good point to clear our reference.

The stub holder class takes the place of our existing property bag entry, and
behaves more or less the same, but allows us to cut the reference to the
ChannelWrapper without having a strong reference to the channel.

Differential Revision: https://phabricator.services.mozilla.com/D8923
2018-10-16 15:05:24 -07:00
Dipen Patel
fbf2d8d5d9 Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=Gijs,snorp,jcj,mcmanus,sfraser,keeler,baku,ato
Move all fields of nsISSLStatus to nsITransportSecurityProvider
Remove nsISSLStatus interface and definition
Update all code and test references to nsISSLStatus
Maintain ability to read in older version of serialized nsISSLStatus.  This
is verified with psm_DeserializeCert gtest.

Differential Revision: https://phabricator.services.mozilla.com/D3704
2018-09-11 00:07:30 +00:00
Csoregi Natalia
4c04e1f45b Backed out changeset bd8baf88f373 (bug 1468222) for test_security-info-parser.js failures. CLOSED TREE 2018-09-08 03:16:25 +03:00
Dipen Patel
8e9fd08fb5 Bug 1468222 Consolidate nsISSLStatus info nsITransportSecurityInfo r=snorp,ato,sfraser,keeler,baku,mcmanus,Gijs
Move all fields of nsISSLStatus to nsITransportSecurityProvider
Remove nsISSLStatus interface and definition
Update all code and test references to nsISSLStatus
Maintain ability to read in older version of serialized nsISSLStatus.  This
is verified with psm_DeserializeCert gtest.

Differential Revision: https://phabricator.services.mozilla.com/D3704
2018-09-07 22:50:17 +00:00
Shane Caraveo
ecf7aa7e22 Bug 1476570 - allow proxy to work on restricted domains, r=aswan
Proxies must work with all requests, however the new onRequest proxy api
has maching logic using ChannelWrapper which uses WebExtensionPolicy which
checks against restricted domains.  We need to bypass that check when
matching for proxy requests.

MozReview-Commit-ID: 5zCdmV1b9M7
2018-08-02 14:03:00 -03:00
Andrea Marchesini
86917a8905 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 2 - SystemPrincipal, r=ckerschb 2018-07-17 21:38:19 +02: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
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
Shane Caraveo
d29291d445 Bug 1322748 add ability to get registered channelwrappers, r=kmag
MozReview-Commit-ID: SphwWjzQuo
2018-05-22 14:19:57 -04:00
Boris Zbarsky
9a8e024fa0 Bug 1455674 part 13. Remove remaining xpidl uses of nsIDOMElement. r=qdot 2018-04-26 23:37:29 -04:00
Boris Zbarsky
d54406240d Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Dave Townsend
a37ff0462a Bug 1448500: Add speculative request content policy type. r=bz, r=kmag
Adds a new TYPE_SPECULATIVE to nsIContentPolicy uses it as the type for
speculative connection channels from the IO service. I believe I've added it to
all the content policies in tree to make sure it behaves the same as TYPE_OTHER
used to.

The webextension test shows that the webextension proxy API sees speculative
lookups requested through the IO service.

MozReview-Commit-ID: DQ4Kq0xdUOD
2018-03-23 15:27:08 -07: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
Shane Caraveo
616ecb3d39 Bug 1149250 add support for https upgrades from webextensions, r=bz,mayhemer,rpl
MozReview-Commit-ID: ChIs2Q6bgEn
2017-12-08 12:12:37 -08:00
Peter Snyder
9308fe1009 Bug 1377689 - merge identical headers in set{Request,Response}Header, r=bz,mixedpuppy
MozReview-Commit-ID: Kpli9YzEvlt
2017-12-04 22:48:54 -06:00
Kris Maglione
a7853ee371 Bug 1402944: Follow-up: Clean up isProxy matching exemptions a bit. r=trivial
MozReview-Commit-ID: 8fbwNPXsCkI
2017-10-25 13:54:00 -07:00
Kris Maglione
12b1b432af Bug 1405286: Part 3 - Test that filterResponseData from cached onHeadersReceived doesn't crash. r=mixedpuppy
It currently isn't possible to suspend a channel from onHeadersReceived for a
cached response. And since it's not possible to add a new stream filter after
a response has started, adding a stream filter at that point will crash if the
channel is still registered.

This test is a basic sanity check for that scenario.

MozReview-Commit-ID: ALYUtxX7mci
2017-10-14 19:25:35 -07:00
Shane Caraveo
cf8c5452ed Bug 1305237 Expose frameAncestors to webextensions, r=bz,kmag
MozReview-Commit-ID: 64lIMu6neaD
2017-10-10 09:54:22 -07: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
Wes Kocher
ce6083bc04 Backed out 2 changesets (bug 1305237) for crashtest failures in 403574-1.xhtml and 1282985-1.svg a=backout
Backed out changeset 96b5d596cc27 (bug 1305237)
Backed out changeset 5fe72402746f (bug 1305237)

MozReview-Commit-ID: CjCWY73Hps1
2017-10-02 16:41:56 -07:00
Shane Caraveo
a7b37edbc1 Bug 1305237 Expose frameAncestors to webextensions, r=bz,kmag
MozReview-Commit-ID: 8gvEiqJEsP3
2017-10-02 15:11:54 -07:00
Wes Kocher
26e25c2519 Backed out 2 changesets (bug 1305237) for bc failures in browser_WebRequest_ancestors.js a=backout
Backed out changeset 163a2b0bb0a0 (bug 1305237)
Backed out changeset e05bab140564 (bug 1305237)

MozReview-Commit-ID: GLlbWYZqyVS
2017-10-02 13:35:03 -07:00
Shane Caraveo
29494e6337 Bug 1305237 Expose frameAncestors to webextensions, r=bz,kmag
MozReview-Commit-ID: Dcf2AaUqBsb
2017-10-02 11:06:31 -07:00
Wes Kocher
4253ce7dce Merge inbound to m-c a=merge
MozReview-Commit-ID: 7zOjePOWzOM
2017-09-28 16:56:44 -07:00
Ryan VanderMeulen
252c89b8d4 Backed out changesets d0d30a90efa1 and fd1d81b93380 (bug 1305237) for causing bug 1403932. 2017-09-28 17:55:43 -04:00
Shane Caraveo
d7ebe7ee66 Bug 1305237 Expose frameAncestors to webextensions, r=bz,kmag
MozReview-Commit-ID: HpneTIKPoS1
2017-09-27 07:58:17 -07:00
Kris Maglione
baa806b321 Bug 1402944: Part 9 - Optimize request/response header handling. r=mixedpuppy,ehsan
We don't use the initial Map returned by ChannelWrapper as a map, so there's no
need for the overhead involved in creating it. We also don't need the header map
generated by HeaderChanger unless headers are actually being modified, which
for many listeners they never are, so there's no need for the map creation and
string lower-casing overhead prior to modification time.

MozReview-Commit-ID: K2uK93Oo542
2017-09-23 16:25:19 -07: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
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
Kris Maglione
d4776d075c Bug 1402944: Part 4 - Fold start/stop listener into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 52zZNjgaCEj
2017-09-26 13:39:30 -07:00
Kris Maglione
7f5cb37174 Bug 1402944: Part 3 - Move error checks into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 7uLonYWnLcX
2017-09-26 13:38:54 -07:00
Kris Maglione
b0e7882fea Bug 1402944: Part 2 - Move error string logic into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 4rOeoliLTV7
2017-09-22 18:43:18 -07: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
Kris Maglione
77ecf1916f Bug 1396856: Part 3 - Add a WebIDL wrapper class for necko channels. r=ehsan,mixedpuppy
Ehsan, can you please review the DOM bindings, and Shane the request logic?

The bulk of the overhead WebRequest API is in its access to nsIChannel and
friends through XPConnect. Since it's not really feasible to convert channels
to use WebIDL bindings directly, this generic channel wrapper class serves the
same purpose.

MozReview-Commit-ID: 4mNP8HiKWK
2017-09-06 14:38:23 -07:00