Commit Graph

1949 Commits

Author SHA1 Message Date
Brendan Dahl
73b1e91ce7 Bug 1399956 - Disable some mochitests in headless. r=jrmuizel
These tests will need more work and are low priority.

MozReview-Commit-ID: H0J16E8FqNr
2017-10-16 16:15:45 -07:00
Kris Maglione
edb5338a4e Bug 1405286: Part 4 - Don't overwrite existing state with finishedtransferringdata. r=mixedpuppy
In cases where data transfer finishes immediately after we close a request, we
can sometimes wind up overwriting that state information with
"finishedtransferringdata", which allows scripted callers to break certain
invariants and cause crashes.

MozReview-Commit-ID: Do3GttF3M9S
2017-10-14 20:01:18 -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
Kris Maglione
dc934d5217 Bug 1405286: Part 2 - Ensure ordered processing of StreamFilter events. r=mixedpuppy
Our current StreamFilter code doesn't behave well when data delivery is
targeted to a thread pool, rather than a single thread.

Thread pools don't guarantee ordered processing of events. It's theoretically
always possible for multiple events dispatched to a pool to be processed in
parallel, or even slightly out of order.

For the most part, this should only be a theoretical concern, unless several
data events are dispatched at the same time, and the pool has enough available
threads to service all of them (which is an unlikely scenario in this code).
However, when data delivery is targeted to a thread pool, the OnDataAvailable
callbacks do not have access to the thread pool itself, only the thread that
the callback was dispatched to. This means that after each OnDataAvailable
call, we likely store a new IO thread, and writes end up queued to a different
single thread depending on exactly when they happen.

Threads in thread pools often wind up executing long-running runnables, such
as synchronous IO or network operations. Which means that we introduce
arbitrary delays for some writes, and are likely to wind up with highly
arbitrary ordering.


This patch solves both of these problems by introducing strict event queue
ordering, and also dispatching IO events to the original explicit delivery
target, rather than whatever the current thread happened to be at the time of
the last data event.

MozReview-Commit-ID: 1SdYjS6ltqw
2017-10-14 18:58:53 -07:00
Boris Zbarsky
6b54ed77bb Back out bug 1354730 to reopen CLOSED TREE.
MozReview-Commit-ID: RzUofi384C
2017-10-16 14:34:23 -04:00
Boris Zbarsky
8710ee90ff Bug 1354730. Disable named property object (aka global scope polluter) behavior for all Xrays. r=kmag
MozReview-Commit-ID: KmbXFfSzH0N
2017-10-16 10:58:09 -04:00
Kirk Steuber
63ae96269e Bug 1394851 - downloads.download API should default to use Firefox's "Save As" pref r=kmag
This patch changes the behavior of the downloads.download API's saveAs option. Previously, the behavior when neither value is provided (the "default behavior") was not defined by our documentation or Chrome's. Now, the default behavior is changing to rely on the Firefox "Save As" pref (browser.download.useDownloadDir). If Firefox is configured to open the "Save As" dialog for all downloads (browser.download.useDownloadDir == false), that behavior will be the default for the downloads.download API. Otherwise, the default behavior will be not to show the dialog.

This patch also moves some test functionality out of test_chrome_ext_downloads_saveAs.html. Previously, that test would test the saveAs option and also the conflictAction:"uniquify" option. In order to add testing for the new default behavior, it was necessary to move the testing of the conflictAction:"uniquify" option to a new test: test_chrome_ext_downloads_uniquify.html

MozReview-Commit-ID: u6VA4kexlr
2017-10-04 14:39:58 -07:00
Bob Silverberg
67a5cde2e4 Bug 1408099 - Fix ExtensionPreferencesManager.getLevelOfControl to deal with undefined settings, r=aswan
Prior to this, if getLevelOfControl was called before the setting was defined to the EPM, an
exception was thrown. This fixes it by returning a level of control of "not_controllable"
if the setting has not yet been defined.

MozReview-Commit-ID: 96jXLoJlUI
2017-10-12 17:31:27 -04:00
Sebastian Hengst
ded2f7a0dd Merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 5oI3jfNbQVt
2017-10-13 11:12:47 +02:00
Kris Maglione
0b33e0da90 Bug 1407056: Follow-up: Skip test on Android debug for flakiness. r=bustage
MozReview-Commit-ID: 39slYE2zP95
2017-10-12 19:48:48 -07:00
Ben Kelly
34cf9299c7 Bug 1380255 P3 Disable channel thread retargeting when webrequest is tracing the channel. r=kmag 2017-10-12 19:23:16 -07:00
Andrew Swan
726384a9e2 Bug 1408179 Fix manifestCacheKey for langpacks r=gandalf
MozReview-Commit-ID: Et0EyyTAi8x
2017-10-12 15:27:40 -07:00
Sebastian Hengst
fc3c7e1a08 merge mozilla-central to autoland. r=merge a=merge on a CLOSED TREE 2017-10-13 00:53:56 +02:00
Sebastian Hengst
7c300df4d9 Merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-12 12:03:15 +02:00
Kris Maglione
e2676ab417 Bug 1404652: Follow-up: Fix timing issues in webRequest HSTS tests.
MozReview-Commit-ID: HFW73u6wp5S
2017-10-11 20:03:11 -07:00
Kris Maglione
86d70533eb Bug 1407056: Part 3 - Test that CSP overrides apply correctly based on triggering principals. r=bz
MozReview-Commit-ID: EbGsI3keeG6
2017-10-12 15:44:32 -07:00
Kris Maglione
5fb4a6a9a0 Bug 1404652: Part 2 - Coalesce multiple event dispatches into a single message during an idle slice. r=zombie
Sending MessageManager messages is expensive, but a lot of the overhead is
per-message more than it's tied to the complexity of the message. In
particular:

- Each sendAsyncMessage call incurs separate XPConnect method call overhead.

- Each message requires acquiring a lock, and separate message setup overhead
  for IPC.

- The message data itself must be structured cloned, which requires
  (expensive) allocation of buffers to hold the serialized data. Each buffer
  segment is 4KB, which is generally enough to hold multiple serialized
  messages, so coalescing messages means fewer buffer allocations.

Moving some of this work into idle slices also means less likelihood of
interfering with UI responsiveness.

MozReview-Commit-ID: 5SAMZNLVaY3
2017-09-28 20:14:17 -07:00
Masatoshi Kimura
16e51e3462 Bug 1406695 - Fail if a browser.test.onMessage handler throws an error. r=aswan
MozReview-Commit-ID: BXOrdtla1qE
2017-10-07 19:24:32 +09:00
Sebastian Hengst
d1a31a8503 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-10-11 00:01:28 +02:00
Kris Maglione
7b3d1e5b27 Bug 1407258: Dowgrade document loads with expanded principals to their last sub-principal. r=bz
There are currently some corner cases where channels that are eventually
loaded into documents (mainly <img src="data:image/svg+xml,") can inherit
expanded principals from a caller. Since documents aren't allowed to have
expanded principals, this causes crashes.

This patch is a short term workaround for the issue, until we have a longer
term solution that prevents the channels from inheriting the expanded
principals to begin with.

MozReview-Commit-ID: JwqqtVynLjj
2017-10-10 14:08:47 -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
Jason Orendorff
6e7ae0564c Bug 1404107 - Test that an Xray expando whose value is a DOM node works when the node is reparented. no_r=me.
Requested by bz, during review of other patches in this bug.
2017-10-07 18:53:02 -05:00
Boris Zbarsky
7fd44fd6e7 Bug 1404107 - Test that Xray expandos are not lost when reparenting wrappers. r=mrbkap 2017-10-03 08:53:13 -05:00
Kris Maglione
84cb9d4cfe Bug 1406278: Part 8b - Use subject principal as triggering principal in style <link> "href" attribute. r=bz
MozReview-Commit-ID: LWMkBcB4WIg
2017-10-05 19:40:48 -07:00
Kris Maglione
cd1637aa78 Bug 1406278: Part 7 - Use subject principal as triggering principal in <input> "src" attribute. r=bz
MozReview-Commit-ID: 8DZOwqBrA2i
2017-10-05 16:19:19 -07:00
Kris Maglione
6efed59589 Bug 1406278: Part 6 - Use subject principal as triggering principal in <source> "srcset" attribute for <picture>. r=bz
MozReview-Commit-ID: DFq3k9PSOgA
2017-10-05 15:59:15 -07:00
Kris Maglione
a3d15ab9ad Bug 1406278: Part 5b - Use subject principal as triggering principal in <source> "src" attribute for <audio>/<video>. r=bz
MozReview-Commit-ID: zZCXpvs719
2017-10-05 15:28:22 -07:00
Kris Maglione
09b72bad18 Bug 1406278: Part 5a - Use subject principal as triggering principal in <audio>/<video> "src" attribute. r=bz
MozReview-Commit-ID: A1JixlTeZGq
2017-10-05 14:47:09 -07:00
Kris Maglione
c2386ba786 Bug 1406278: Part 4 - Use subject principal as triggering principal in <iframe>/<frame> "src" attribute r=bz
MozReview-Commit-ID: AgxZmfRvfTR
2017-10-04 22:59:44 -07:00
Kris Maglione
afc961cdba Bug 1406278: Part 3 - Use subject principal as triggering principal in <script> "src" attribute. r=bz
MozReview-Commit-ID: KwGIE4t7KUx
2017-10-04 22:16:32 -07:00
Kris Maglione
ce86c492cd Bug 1406278: Part 2c - Use subject principal as triggering principal in <img> "srcset" attribute. r=bz
MozReview-Commit-ID: 784EsgwBcS1
2017-10-02 21:30:34 -07:00
Kris Maglione
ae7452e40e Bug 1406278: Part 2b - Use subject principal as triggering principal in <img> "src" attribute. r=bz
MozReview-Commit-ID: DrblTjP99WJ
2017-10-02 20:28:32 -07:00
Kevin Jones
2d1031a927 Bug 1406912 - Fix _serializeRangeData does not handle ranges found in same node properly. r=mixedpuppy 2017-10-09 12:42:00 -04:00
Ian Moody
be771eda15 Bug 1404568 - Improve webext browser_action icon fallbacks. r=mixedpuppy
Currently if there is no default icon at the specified size, the default icon
falls back to the light text icon at that size. This is wrong in two ways:
First, the default theme uses dark text, so it should fallback to the dark icon
Secondly, authors expect the unsized default_icon to be used if specified

This patch fixes both of these issues, so that the default icon first falls back
to the unsized default_icon, and then only if that is not specified falls back
to the dark icon

MozReview-Commit-ID: C3RRTKhYq6r
2017-10-08 13:23:33 +01:00
Ian Moody
da27cf8af2 Bug 1403224 - Add tests for MatchPattern.subsumes(). r=aswan
MozReview-Commit-ID: 8Wi4d4BVApq
2017-09-26 19:36:32 +01:00
Sebastian Hengst
16e90b262d Backed out changeset a1b4287a3427 (bug 1403224) for eslint failure at toolkit/components/extensions/test/xpcshell/test_MatchPattern.js:279:4 | Newline required at end of file but not found. r=backout 2017-10-12 17:26:54 +02:00
Ian Moody
a133919c0b Bug 1403224 - Add tests for MatchPattern.subsumes(). r=aswan
MozReview-Commit-ID: 8Wi4d4BVApq
2017-09-26 19:36:32 +01: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
Sebastian Hengst
5a50c5cb42 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 7Ez95T2ivfR
2017-10-07 10:37:39 +02:00
Joel Maher
37657ef8cd Bug 1398518 - Disable toolkit/components/extensions/test/mochitest/test_ext_notifications.html for high frequency failures. r=gbrown 2017-10-06 10:43:36 -04:00
Andrew Swan
823b49bf3e Bug 1405264 Part 2: Use startupData for new langpacks r=gandalf,kmag
Webextension-formatted langpacks now store their list of chrome
registry resources in startupData so that those resources can be
registered early in startup.

MozReview-Commit-ID: 80eOiPKLlWu
2017-10-04 13:29:20 -07:00
Dan Banner
306e0c888e Bug 1395890 - Change all ESLint rules that are warnings to errors. r=standard8
MozReview-Commit-ID: LJS6m1GppiS
2017-09-18 19:07:17 +01:00
Tomislav Jovanovic
41dd040dde Bug 1402007 - Use $PYTHON environment variable in test_native_manifest r=aswan
MozReview-Commit-ID: L0CYlrGAidy
2017-10-04 22:46:41 +02:00
Kris Maglione
7301784bcf Bug 1404172: Follow-up: Temporarilly disable broken test.
MozReview-Commit-ID: EqWP1pXImm5
2017-10-04 20:36:39 -07:00
Kris Maglione
e498ce8963 Bug 1404172: Remove MatchPattern.jsm. r=aswan
MozReview-Commit-ID: ItGMuChHS3z
2017-09-28 18:27:44 -07:00
Tom Schuster
94725f1c81 Bug 1403721 - Limit management.get to allowed addon types. r=mixedpuppy 2017-10-04 16:06:27 +02:00
Liang-Heng Chen
16493d56ed Bug 1401081 - Wait one more cycle to finish css loading. r=kmag
MozReview-Commit-ID: DSai1moD2Qy
2017-09-29 02:54:00 -04:00
Sebastian Hengst
7942d9a882 Backed out changeset 33ef79c5fe06 (bug 1403721) for failing eslint at toolkit/components/extensions/test/xpcshell/test_ext_experiments.js:162: 'boringAddon' is already declared in the upper scope. r=backout 2017-10-04 17:47:22 +02:00
Tom Schuster
4958899585 Bug 1403721 - Limit management.get to allowed addon types. r=mixedpuppy 2017-10-04 16:06:27 +02:00
Sebastian Hengst
387952c22a merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EVLGo1zCANb
2017-10-04 11:13:24 +02:00