Граф коммитов

196 Коммитов

Автор SHA1 Сообщение Дата
Florian Quèze 682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Christoph Kerschbaumer a6c1ffb498 Bug 1434357: Exempt Web Extensions from insecure redirects to data: URIs. r=kmag,mayhemer 2018-02-18 19:52:52 +01:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione 6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Luca Greco ce3db38de1 Bug 1428094 - Exception raised from a webRequest blocking listener should report the original error message and filename. r=mixedpuppy
MozReview-Commit-ID: KiCg6dKaVd5

--HG--
extra : rebase_source : fc98846dc960fc148718299e9750196018342565
2017-12-07 21:19:03 +01:00
Andreea Pavel 5ba2665757 Merge inbound to mozilla-central r=merge a=merge 2017-12-09 22:21:17 +02:00
Kris Maglione 4a4c4fdfd4 Bug 1421459: Update to ESLint 4 "indent" rule. r=aswan
MozReview-Commit-ID: LxLDWlsIlSk

--HG--
extra : rebase_source : 5762bdf08ff6c09c1b29f87366bddb552e4c74b2
extra : amend_source : 922a0c03722bd5a81daace7f0289ec3228191cfb
2017-11-28 14:13:59 -08:00
Shane Caraveo 76ee06b331 Bug 1149250 add support for https upgrades from webextensions, r=bz,mayhemer,rpl
MozReview-Commit-ID: ChIs2Q6bgEn

--HG--
extra : rebase_source : 942d6ee111df39fdd19d1d035e8eefa9280430f3
2017-12-08 12:12:37 -08:00
Peter Snyder 28001d0dce Bug 1377689 - merge identical headers in set{Request,Response}Header, r=bz,mixedpuppy
MozReview-Commit-ID: Kpli9YzEvlt

--HG--
extra : rebase_source : 717c44a3b4b55f3ff0fa40ddb4778bca5265b8d4
2017-12-04 22:48:54 -06:00
Shane Caraveo 90fbe28861 Bug 1406453 fix http/ws regex r=kmag
MozReview-Commit-ID: CWPipPGV9vG

--HG--
extra : rebase_source : 08d6bf12864363fb965e6fae574a2d4059601d85
2017-11-15 13:48:30 -08:00
Luca Greco f02af2dbb2 Bug 1403349 - Prevent WebNavigation jsm to leak the sourceTab browser on unpaired CreatedNavigationTarget messages. r=aswan
This applies the following changes:

- store a weak reference to the browser element in the WebNavigation.jsm Manager's map
  of pending CreatedNavigationTarget messages

- when a CreatedNavigationTarget message is received from a sourceTab
  for a created window that is not currently tracked in the map
  (e.g. it has been immediately closed), the message received from the sourceTab
  is not saved in the map of the pending CreatedNavigationTarget (and a message
  is logged in the console to make easier to investigate issues related to discarded
  CreatedNavigationTarget events).

- adds an additional assertion to the related test case to ensure that no CreatedNavigationTarget
  message is still pending in the WebNavigation/jsm's Manager.

MozReview-Commit-ID: FijQ8IqiY8L

--HG--
extra : rebase_source : cd3c072301a1eb24de368c655a96891dd1287c7b
2017-09-27 19:07:41 +02:00
Luca Greco 5b52ad7584 Bug 1403349 - Fix wrong sourceTabId on webNavigation.onCreatedTarget event. r=aswan
This changes fixes the regression introduced by Bug 1355120 and adds a new
test case which contains a browserAction popup which open and immediately
close a new window and ensure that the received onCreatedNavigationTarget
is the expected one.

MozReview-Commit-ID: JIcVCpBTpxj

--HG--
extra : rebase_source : 37a7db29fa91d0e3f0593f7d5d996ccd3fba719d
2017-09-27 14:24:54 +02:00
Kris Maglione f0b1b98a83 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

--HG--
extra : rebase_source : 120889fd8f9edd097a7dae807b54eb3fd283f0f6
2017-10-14 19:25:35 -07:00
Kris Maglione 5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
Shane Caraveo 3a90ea2602 Bug 1305237 Expose frameAncestors to webextensions, r=bz,kmag
MozReview-Commit-ID: 64lIMu6neaD

--HG--
extra : rebase_source : 36fef9a014a7f4bb2db66fb8736de06298008e36
2017-10-10 09:54:22 -07:00
Kris Maglione 3676137220 Bug 1404172: Remove MatchPattern.jsm. r=aswan
MozReview-Commit-ID: ItGMuChHS3z

--HG--
rename : toolkit/modules/addons/MatchPattern.jsm => toolkit/modules/addons/MatchURLFilters.jsm
extra : rebase_source : 986542ba4270799ca1d213d5b4807d12ab7ac148
2017-09-28 18:27:44 -07:00
Wes Kocher 1674eb3e4f Merge inbound to m-c a=merge
MozReview-Commit-ID: 7zOjePOWzOM
2017-09-28 16:56:44 -07:00
Ryan VanderMeulen 2ccfaf0697 Backed out changesets d0d30a90efa1 and fd1d81b93380 (bug 1305237) for causing bug 1403932. 2017-09-28 17:55:43 -04:00
Shane Caraveo 088c63f6e5 Bug 1305237 Expose frameAncestors to webextensions, r=bz,kmag
MozReview-Commit-ID: HpneTIKPoS1

--HG--
extra : rebase_source : d4c7e9146b4156f7e429e6427628bbf7cd25cbe7
2017-09-27 07:58:17 -07:00
Shane Caraveo 86d45aba67 Bug 1401350 fix proxy auth for system requests, r=kmag
MozReview-Commit-ID: CAh89djQobI

--HG--
extra : rebase_source : c85ff5148d4ac1df4e21622d2d615040ba9e09d7
2017-09-25 15:14:09 -07:00
Kris Maglione c6acdfdad4 Bug 1402944: Part 10 - Minor runChannelListener cleanups/optimizaitons. r=mixedpuppy
Moving the event type lists to constants avoids array construction overhead
for each event, and allows us to use the much faster Set.has rather than
Array.includes.

Using Object.create to add the base request info to the listener-specific info
allows us to avoid object copy overhead.

Switching to a .forEach() loop lets us avoid creating expensive live Map
iterator objects, and also GC pressure caused by the huge number of iterator
result objects and intermediate array objects created by for-of-entries().
It's otherwise just as fast as for-of in Ion.

MozReview-Commit-ID: 53Fw1tJbuMY

--HG--
extra : rebase_source : 7fd7095239fec790347d3febb8bf9af17fffc1af
2017-09-25 14:01:12 -07:00
Kris Maglione ee47ab1f43 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

--HG--
extra : rebase_source : f50574fb0eb32878aee3f68b3a73d46ba53987e5
2017-09-23 16:25:19 -07:00
Kris Maglione 30a2ef9ec1 Bug 1402944: Part 7 - Move traceable channel registration to ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 6hGmh4VpJMQ

--HG--
extra : rebase_source : 082f3cb19ec957b81536b67a56969ba714e81e79
2017-09-27 18:15:39 -07:00
Kris Maglione 89ae1721a0 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

--HG--
extra : rebase_source : 71c19fd8b432c16a3f13f7d0bd0424064f3e5661
2017-09-27 18:15:12 -07:00
Kris Maglione e3089ef89e Bug 1402944: Part 4 - Fold start/stop listener into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 52zZNjgaCEj

--HG--
extra : rebase_source : c608625921d6cbf35dd7c4719df2438a9b0e3905
2017-09-26 13:39:30 -07:00
Kris Maglione ff2dd2a70a Bug 1402944: Part 3 - Move error checks into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 7uLonYWnLcX

--HG--
extra : rebase_source : cf89bfe98adc699b74230356ce3cb99cc16d5af6
2017-09-26 13:38:54 -07:00
Kris Maglione f80c50c88d Bug 1402944: Part 2 - Move error string logic into ChannelWrapper. r=mixedpuppy,ehsan
MozReview-Commit-ID: 4rOeoliLTV7

--HG--
extra : rebase_source : 3e9b1151e8dbc812623ae2fd05895b7362e322f1
2017-09-22 18:43:18 -07:00
Kris Maglione a444efbbd7 Bug 1399346: Make sure channel is QIed to nsIChannel before wrapping. r=trivial
MozReview-Commit-ID: EyKcc9irD8H

--HG--
extra : rebase_source : 792b380f82b018328e7f1745874f4189961001da
extra : amend_source : 853be08c5463d550280f6e1f55e87f4858b24647
2017-09-11 21:44:30 -07:00
Sebastian Hengst ecf716b8bb merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CmMBcpJapLy
2017-09-12 11:35:15 +02:00
Kris Maglione 6a54373b00 Bug 1398642: Bustage fix bustage fix. r=me CLOSED TREE
MozReview-Commit-ID: 4jTSVg6L3is

--HG--
extra : amend_source : 0b56c8b05f5b44cfb30e47a8561ed251bc9201c4
2017-09-11 21:59:15 -07:00
Kris Maglione 82c8480c2b Bug 1398642: Follow-up: Fix terrible error checking code. r=me CLOSED TREE
MozReview-Commit-ID: 1xQNYwZiqsj

--HG--
extra : rebase_source : a32457e8b1078978623657c2ad0587eb7eda4765
2017-09-11 21:18:42 -07:00
Kris Maglione a4c190dad7 Bug 1398642: Several minor WebRequest optimizations. r=mixedpuppy
MozReview-Commit-ID: 4vsDScMkyzA

--HG--
extra : rebase_source : 96e778aea729300c4629bff7da83c960b8e011ff
2017-09-10 18:37:52 -07:00
Kris Maglione a6c6de086a Bug 1397448: Part 1 - Generate WebRequest message objects in WebRequest.jsm. r=mixedpuppy
Aside from moving this logic closer to the place the input data is generated,
this significantly reduces the number of cross-compartment wrappers involved
in creating those messages, especially with JSM global sharing enabled.

MozReview-Commit-ID: 6IvetcHnMfC

--HG--
extra : rebase_source : 0f97464ee9840ac40a6882e70e99d5b6c566c5ef
2017-09-06 17:43:38 -07:00
Shane Caraveo dbbc61a4fc Bug 1398622 fix ws handling in contentpolicymanager, and fix stupid error. r=kmag
MozReview-Commit-ID: EmPvtRrnrnI

--HG--
extra : rebase_source : 3db1fa7ea2046710208bbaf66a76e02e7c9a6df3
2017-09-10 21:37:27 -07:00
Kris Maglione d6b735f9d2 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

--HG--
extra : rebase_source : 585a1c3c136ed1c5014f680ae81f635c8d1a2931
2017-09-06 21:56:45 -07:00
Kris Maglione 025991aa30 Bug 1396856: Part 4 - Update WebRequest.jsm to use ChannelWrapper bindings. r=mixedpuppy
MozReview-Commit-ID: 7s7SOQ1XVaw

--HG--
extra : rebase_source : 9fb6fabffd3c32e52e4b94dba476483a7118c660
2017-09-06 21:52:24 -07:00
Kris Maglione 587f846f5f Bug 1255894: Part 7 - Expose response stream filtering via the webRequest API. r=mixedpuppy
MozReview-Commit-ID: AErBFGJyFg5

--HG--
extra : rebase_source : 0718ae27322c60a1ef8b67464dbca7d705f23628
2017-09-02 13:37:31 -07:00
Shane Caraveo 59020b3a07 Bug 1388889 fix null principal handling for webrequest, r=kmag
MozReview-Commit-ID: B8qK4ZnaO9i

--HG--
extra : rebase_source : d8f1abed1f46bd6a57a0140443fb2e34e8f20497
2017-08-25 14:12:42 -07:00
Shane Caraveo 9b513f8bd3 Bug 1373646 add nsIProxyInfo to webrequest, r=kmag
MozReview-Commit-ID: pc98rgtkVc

--HG--
extra : rebase_source : d4655e6851a402616908bc32a2e119cb679a340f
2017-08-23 10:43:04 -07:00
Shane Caraveo 0012e18180 Bug 1388289 fix challenger info for proxy auth requests, r=kmag
MozReview-Commit-ID: D0Tin2bK8R4

--HG--
extra : rebase_source : b4f299fd9c2fe404f7450c16da4a5127fa3cfd9f
2017-08-17 19:56:22 -07:00
Shane Caraveo 75156ec5c2 Bug 1393909 remove sync messaging from WebRequest, r=kmag
MozReview-Commit-ID: BrZ6FgP7Uyj

--HG--
extra : rebase_source : 349b30cf05508ca1232fc7d60efec6e394d05bdc
2017-08-25 12:36:28 -07:00
Shane Caraveo 340c39b332 Bug 1368527 add new on-before-connect notification to httpChannel, r=dragana,kmag
MozReview-Commit-ID: 8hiAgY4KzDB

--HG--
extra : rebase_source : d18bbf2ce011cf2236a3cebdc65a750e9ef66c10
2017-08-15 13:11:50 -07:00
Shane Caraveo f911224d12 Bug 1386533 fix host permitted matching, r=kmag
MozReview-Commit-ID: 81ANT5R1671

--HG--
extra : rebase_source : 3f40a2483c997690cae40deb10a4aff4305928d4
2017-08-02 15:33:17 -07:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Shane Caraveo 824d3d0d57 Bug 1380186 implement SimpleChannel Parent/Child IPC, r=kmag,mayhemer
MozReview-Commit-ID: 8zgF2MLwdu2

--HG--
extra : rebase_source : a5adcddb0119b8308a7beef74df998263dc8b620
2017-07-27 13:34:54 -07:00