Commit Graph

75552 Commits

Author SHA1 Message Date
Ben Kelly
083c06c238 Bug 1462772 P1 Add a fallible nsIGlobalObject::GetServiceWorkerRegistration() method. r=mrbkap 2018-07-02 07:44:18 -07:00
Andrea Marchesini
9c86a8b8ee Bug 1470306 - MessagePort unlinked should start the cleanup/close/shutdown procedure of the object, r=smaug 2018-07-02 12:02:39 +02:00
Jesse Ruderman
b5cbc6c7a9 Bug 607222 - Add crashtest. r=mats 2018-07-01 18:06:49 +02:00
Marcos Cáceres
60e5daf61c Bug 1468356 - Implement onpaymentmethodchange attribute. r=mrbkap
--HG--
extra : rebase_source : 220c160ce0a4ab0568285c276de7326d4a16da23
2018-06-30 10:11:00 +03:00
Robert Longson
e3d84c3b6a Bug 1456004 - Set angle unit type in setOrientToAngle and to UNKNOWN when setting orient to auto or auto-start-reverse r=heycam 2018-07-01 16:12:14 +01:00
Kris Maglione
a2b2bbf6b6 Bug 1470771: Part 2 - Update StringBundle memory reporters to account for sharing. r=erahm
MozReview-Commit-ID: 5xRsvLj4Klu

--HG--
extra : rebase_source : 08cdb56e6260ea03c3b5040013289482b5edd44c
extra : absorb_source : 67a548b588e576913181feca037a28493539de35
2018-06-24 15:47:10 -07:00
Kris Maglione
e6da28f1ce Bug 1470365: Part 3 - Use shared memory for StringBundles loaded in the content process. r=erahm,smaug
MozReview-Commit-ID: LunnQyndnBf

--HG--
extra : rebase_source : f67e08fc83e8c2e280d886b2d69150c09fb48200
extra : absorb_source : 3b9b226aaca168e3b6537f3031ff22275bd27133
2018-06-29 22:53:12 -07:00
Kris Maglione
d89b3482b9 Bug 1470365: Part 2 - Add StringBundle implementation using shared memory maps. r=erahm,gandalf
This adds a basic StringBundle implementation using shared memory maps, but
doesn't yet hook them up to anything. They behave the same as ordinary string
bundles, but have the additional restriction that they are permanent for the
length of the session, and cannot be removed from the cache.

MozReview-Commit-ID: 4juGhhpCWPn

--HG--
extra : rebase_source : 3a9e30eeb64482056ad5c5b1fc480cf1e8333691
extra : absorb_source : e38998a347b641d4fd4243a6a1b7365543fee3c4
2018-06-28 14:45:21 -07:00
Kris Maglione
2bbae5374b Bug 1470365: Part 1 - Add a compact, read-only, shared-memory string map class. r=erahm
This class implements a shared memory key-value store that fits into a single
memory mapped segment. All of the runtime data for its instances are stored in
the shared memory region, which means that memory overhead for each instance
in each process is only a few bytes.

Importantly, the key and value strings returned by this class are also
pointers into the shared memory region, which means that once an instance is
created, its memory cannot be unmapped until process shutdown.

For the uses I intend to put it to, this is a reasonable constraint. If we
need to use it for shorter-lived maps in the future, we can add an option to
return non-literal dependent strings that will be copied if they need to be
kept alive long term.

MozReview-Commit-ID: 5BwAaDsb7HS

--HG--
extra : rebase_source : b472fe628018f88a2c4d6b3de4b7143aeca55e14
extra : absorb_source : 5cdeb568cfd2b4a5a767191402e699e61e653b3b
2018-06-29 22:50:41 -07:00
Kris Maglione
fd093e7cca Bug 1463587: Part 1 - Add helper class for creating snapshots of shared memory regions. r=jld,erahm
This class allows us to map a read-write shared memory region, and then safely
remap it read-only, so that it can be shared with sandboxed content processes.

MozReview-Commit-ID: 2PJMQgOwA4V

--HG--
extra : rebase_source : c556cabfa7d379a91dc9ef7171ac0a7d7d8fb32e
extra : absorb_source : e78e304ed95891c694050f79a0bb5d40d11ee884
2018-06-22 20:30:23 -07:00
Robert Longson
f33096f4f1 Bug 1455854 - Throw a TypeError rather than a SyntaxError for enum out of range. r=heycam 2018-06-30 18:41:37 +01:00
Andreea Pavel
91a9c110e2 Merge mozilla-inbound to mozilla-central. a=merge 2018-06-30 12:49:32 +03:00
Olli Pettay
2e00f64ed1 Bug 1419661, if ExtendedDOMSlots are used before slots, use FatSlots to have fewer allocations, r=mrbkap 2018-06-30 01:30:37 +03:00
Masayuki Nakano
36f73c43d8 Bug 1435717 - Make calling WidgetEvent::PreventDefault*() stop cross process forwarding too r=smaug
Currently, if an event is consumed in the main process, EventStateManager
does not send it to remote process.  However, this is unexpected behavior
for some WidgetKeyboardEvent dispatchers.  OS sometimes has consumed native
key events before sending applications.  For example, Alt key on Windows
should activate menu bar of focused window but Alt key may be consumed before
focused window receives the event.  In such case, we mark Alt keyboard event
as "consumed before dispatch", and chrome treat it like as its preventDefault()
is called in web content.  (Note that for compatibility with other browsers,
the consumed state is not exposed to web content.  So, Event.defaultPrevented
returns false in web content.)

Therefore, we need to treat "consumed" state and "cross process forwarding"
state separately.  This patch makes calling WidgetEvent::PreventDefault()
always stops cross process forwarding for backward compatibility.  Additionally,
for the special case mentioned above, this patch makes
WidgetEvent::PreventDefaultBeforeDispatch() take additional argument,
|aIfStopCrossProcessForwarding|.  If this is CrossProcessForwarding::eStop,
the event won't be sent to remote process as same as calling PreventDefault().
Otherwise, CrossProcessForwarding::eHold, PreventDefaultBeforeDispatch() call
does not change "cross process forwarding" state.  I.e., if the event's
StopCrossProcessForwarding() and PreventDefault() are not called until
EventStateManager::PostHandleEvent(), the event will be sent to remote process
as usual.

MozReview-Commit-ID: IQGWJvXetxV

--HG--
extra : rebase_source : 4ccdd500e80b8fe29e469ac3b85578e1c07c8358
2018-06-25 18:17:18 +09:00
Coroiu Cristina
a4cd34df05 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2018-06-30 01:00:54 +03:00
Coroiu Cristina
4dfea54f1d Merge inbound to mozilla-central a=merge 2018-06-30 00:52:37 +03:00
Andrew Swan
07dcc1c764 Bug 1451519 Convert specialpowers to a webextension r=kmag
This is a quick-and-dirty port.  It might be nice to replace
SpecialPowersObserver with the webextensions content script injection
system at some point, but that isn't practical right now (since WE experiments
cannot implement new APIs visible to content scripts).

MozReview-Commit-ID: GinCu3VcbWK

--HG--
rename : testing/specialpowers/bootstrap.js => testing/specialpowers/api.js
extra : rebase_source : 0faf7d21c8868c957ddc7fede0d56809f27dc161
extra : intermediate-source : ffb9ce93b92dd6396bfe038d3f6a8bcf929ec277
extra : source : cca596eadd0437dc75b75c119b6c7a405805f703
2018-06-27 13:10:51 -07:00
Jeff Gilbert
52a050c9e3 Bug 1471991 - Remove PopulateCapFallbackQueue from WebGLContext creation. - r=kvark
MozReview-Commit-ID: GCYgU8IiFpi

--HG--
extra : rebase_source : 468bbd280e07c71d8d0d8727f1768dc8cdb2b2e4
2018-06-28 13:09:16 -07:00
Jeff Gilbert
4bd9b396fb Bug 1471112 - Update manifest generation and regenerate. r=jgilbert
MozReview-Commit-ID: LvCzwVwYZh0

--HG--
extra : rebase_source : a87a1cafe25b4e6e40c5dd90bd0fafe89edf2e75
2018-06-25 20:21:21 -07:00
Coroiu Cristina
896ef35dfd Backed out changeset 722113b8204d (bug 1451519) for browser-chrome failures at browser/base/content/test/performance/browser_startup_content.js on a CLOSED TREE
--HG--
rename : testing/specialpowers/api.js => testing/specialpowers/bootstrap.js
2018-06-29 22:13:46 +03:00
Dave Townsend
d8b7fb22e3 Bug 1453751: Load favicons in the content process. r=mak, r=gijs, r=aswan, r=mixedpuppy
Summary:
This moves the load of favicons into the content process. We use the same logic
for finding favicons (based on waiting until none have shown up for a short
time) but then load the favicon and convert it to a data uri which we then
dispatch to the parent process. Along the way this fixes asssociating the load
with the tab for WebExtension and devtools, fixes CSP usage for the load, fixes
expiry detection of the favicon and stops us from loading the same resource
twice.

This change also merges the prefs browser.chrome.site_icons and
browser.chrome.favicons leaving just the former controlling favicon loading. It
adds the pref browser.chrome.guess_favicon to allow disabling guessing where
a favicon might be located for a site (at <hostname>/favicon.ico). This is
mainly to allow disabling this in tests where those additional yet automatic
requests are uninteresting for the test.

There are multiple clean-ups that can follow this but this is a first step along
that path.

MozReview-Commit-ID: E0Cs59UnxaF

Reviewers: mak

Tags: #secure-revision

Bug #: 1453751

Differential Revision: https://phabricator.services.mozilla.com/D1672
Differential Revision: https://phabricator.services.mozilla.com/D1673
Differential Revision: https://phabricator.services.mozilla.com/D1674
Differential Revision: https://phabricator.services.mozilla.com/D1850
Differential Revision: https://phabricator.services.mozilla.com/D1869

--HG--
rename : browser/base/content/test/general/browser_bug408415.js => browser/base/content/test/favicons/browser_bug408415.js
rename : browser/base/content/test/general/browser_bug550565.js => browser/base/content/test/favicons/browser_bug550565.js
rename : browser/base/content/test/general/browser_favicon_change.js => browser/base/content/test/favicons/browser_favicon_change.js
rename : browser/base/content/test/general/browser_favicon_change_not_in_document.js => browser/base/content/test/favicons/browser_favicon_change_not_in_document.js
rename : browser/base/content/test/general/browser_subframe_favicons_not_used.js => browser/base/content/test/favicons/browser_subframe_favicons_not_used.js
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_bug970276_favicon1.ico
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_bug970276_favicon2.ico
rename : browser/base/content/test/general/file_bug970276_popup1.html => browser/base/content/test/favicons/file_bug970276_popup1.html
rename : browser/base/content/test/general/file_bug970276_popup2.html => browser/base/content/test/favicons/file_bug970276_popup2.html
rename : browser/base/content/test/general/file_favicon_change.html => browser/base/content/test/favicons/file_favicon_change.html
rename : browser/base/content/test/general/file_favicon_change_not_in_document.html => browser/base/content/test/favicons/file_favicon_change_not_in_document.html
rename : browser/base/content/test/general/file_bug970276_favicon1.ico => browser/base/content/test/favicons/file_generic_favicon.ico
rename : browser/base/content/test/general/file_with_favicon.html => browser/base/content/test/favicons/file_with_favicon.html
extra : rebase_source : 6372b2681a59d267f966e9fa2ca9a54e3ff0cea0
extra : intermediate-source : b11aa832c41ac5beef9065f804d11fb7c9887990
extra : source : 638eb8a41245f6d9932861afda21edd5e0b2618a
2018-06-28 16:06:09 -07:00
Gurzau Raul
4074ba4032 Backed out 2 changesets (bug 1471112) for failing webgl2 tests on OSX
Backed out changeset 7f2d98706144 (bug 1471112)
Backed out changeset 1f26d0868935 (bug 1471112)
2018-06-29 18:20:55 +03:00
Gurzau Raul
787c677e07 Merge inbound to mozilla-central. a=merge 2018-06-29 18:15:07 +03:00
Margareta Eliza Balazs
f5b2c7c8e6 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-29 12:51:31 +03:00
Margareta Eliza Balazs
ee85ffa45d Merge inbound to mozilla-central. a=merge 2018-06-29 12:41:54 +03:00
Michal Novotny
54b4934a24 Bug 756165 - Return close code 1015 to JS when TLS setup fails, r=baku, r=valentin
We cannot simply pass the status code using nsIWebSocketListener::OnServerClose because it's called only when the connection is established. Instead, I'm passing TLS failure from http channel to nsIWebSocketListener::OnStop where the correct status code is set.
2018-06-28 07:54:00 +03:00
Boris Zbarsky
fcb00cb36f Bug 1471095. Don't do extra work we don't need to in ReparentWrappersInSubtree. r=smaug 2018-06-28 23:36:46 -04:00
Brindusan Cristian
1a89c712a8 Backed out changeset cad78897eb06 (bug 1471991) for build bustages on WebGLContext.cpp:394:13. CLOSED TREE 2018-06-29 05:47:01 +03:00
Jeff Gilbert
f7f30ae559 Bug 1471991 - Remove PopulateCapFallbackQueue from WebGLContext creation. - r=kvark
MozReview-Commit-ID: GCYgU8IiFpi
2018-06-28 19:24:57 -07:00
Jeff Gilbert
835bf141fe Bug 1471112 - Update manifest generation and regenerate. r=jgilbert
MozReview-Commit-ID: IVIiRtIEDvV

--HG--
extra : rebase_source : d162d726fee51a7098bd45e8314cdbf0c5b48bb7
2018-06-25 20:21:21 -07:00
shindli
c57ab475c6 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-29 01:51:06 +03:00
shindli
d288e9cae7 Merge inbound to mozilla-central. a=merge 2018-06-29 00:53:32 +03:00
Andrew Halberstadt
9435736ade Bug 1471620 - Skip python-tests locally that don't run with python 3 in CI r=davehunt
This will make sure that when running |mach python-test --python 3| locally,
we only run the tests that also run in CI with python 3 (and therefore pass
presumably).

MozReview-Commit-ID: 3OBr9yLSlSq

--HG--
extra : rebase_source : 456340d0ecdddf1078f2b5b4ebb1eddf3813b26a
2018-06-27 11:10:02 -04:00
Anny Gakhokidze
535e3c83a1 Bug 1470540 - Improve performance of DataTransfer::CacheExternalClipboardFormats, r=baku,mccr8
Currently, in order to retrieve supported clipboard formats
DataTransfer::CacheExternalClipboardFormats repeatedly makes the same calls to
clipboard->HasDataMatchingFlavors.

In the case when aPlainTextOnly == true only 1 call is made -
clipboard->HasDataMatchingFlavors(kUnicodeMime, ...), and when
aPlainTextOnly == false we have 1 call made for every member of the list
{ kCustomTypesMime, kFileMime, kHTMLMime, kRTFMime, kURLMime, kURLDataMime,
kUnicodeMime, kPNGImageMime } - a total of 8 calls.

We can see that in nsClipboardProxy::HasDataMatchingFlavors, there is a call to
ContentChild::GetSingleton()->SendClipboardHasType.
So when aPlainTextOnly == true, we will have 1 sync message, and when
aPlainTextOnly == false, we will have 8 sync messages.

With the proposed solution, in DataTransfer::CacheExternalClipboardFormats
we will only have 1 sync message regardless of the case because
GetExternalClipboardFormats() will retrieve all supported clipboard
formats at once.

MozReview-Commit-ID: CAmBfqB459v

--HG--
extra : rebase_source : 27f1b420f2613e6a747ed63762f1583ab71ba3e0
2018-06-22 14:28:27 -04:00
Gurzau Raul
8895c91208 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-29 18:23:21 +03:00
Bryce Van Dyk
7928956283 Bug 1450952 - If TrackBuffersManager is sent the same init segment, reuse same StreamID. r=jya
Some MSE streams will resend the same init segment. In these cases we can treat
the following data as belonging to the already existing stream. We do this by
reusing the same stream id. This stops us tearing down and restarting decoders
in these cases.  This has the benefit of stopping us introducing gaps to audio
and/or video.

Differential Revision: https://phabricator.services.mozilla.com/D1837

--HG--
extra : moz-landing-system : lando
2018-06-29 07:33:23 +00:00
Coroiu Cristina
faf5fca2f0 Merge mozilla-central to mozilla-inbound a=merge on a CLOSED TREE 2018-06-30 01:02:10 +03:00
Eric Rahm
e36783bdd1 Bug 1472018 - Limit the lock scope in WebCryptoThreadPool::Shutdown. r=bz
In bug 1364624 we switched over to SRWLock on Windows for our internal
implementation of mozilla::Mutex. This doesn't allow for re-entrancy. The
WebCryptoThreadPool shutdown code has potential for re-entrancy due to the
spinning of the main thread event loop while shutting down the worker threads.

By limiting the scope of the lock protecting mPool during shutdown we can avoid
the re-entrancy. Addtionally we track the shutdown status to avoid dispatching
events once shutdown has started.

--HG--
extra : rebase_source : 6e97a1fbdf4033ef93b3ecbafcf4b7898d9b19af
2018-06-28 15:34:40 -07:00
Petru Gurita
b54c9e5044 Bug 1445216 - remove useless initialization of variable atFirstColumn in nsPlainTextSerializer::Write. r=bz
The `atFirstColumn` variable is set on both branches of an 'if' before it's read.

MozReview-Commit-ID: 2HezoWgnOb1

--HG--
extra : rebase_source : 74e0d2d7685c69ddcbf2313ce14e4886d904432b
2018-06-26 23:23:43 +03:00
Chris Pearce
56d56555be Bug 1471800 - Ensure HTMLMediaElement doesn't play its MediaDecoder in a readyState update after it's OwnerDoc has been removed from its DocShell. r=jya
It's possible that if the HTMLMediaElement is loading while we're loading a new
document into a docshell, that the HTMLMediaElement can reach readyState
HAVE_FUTURE_DATA just after its OwnerDoc is removed from the docshell. If the
HTMLMediaElement wasn't paused, then it may start playing due to the readyState
change in HTMLMediaElement::ChangeReadyState().

For years we've had hard to reproduce issues where media started playing after
we've closed the tab; I bet this was the cause!

When we detect that the document has been removed from its DocShell,
HTMLMediaElement::NotifyOwnerDocumentActivityChanged() is called, and that
suspends the MediaDecoder just in case we need to resurrect the media element,
for example if the tab comes out of the BF cache. When we suspend we set
mPausedForInactiveDocumentOrChannel=true, and all other calls to
MediaDecoder::Play() are guarded by checks on
mPausedForInactiveDocumentOrChannel.

So we should also guard the MediaDecoder::Play() call in ChangeReadyState()
with a check on mPausedForInactiveDocumentOrChannel too.

MozReview-Commit-ID: GfmZasT9jdr

--HG--
extra : rebase_source : 5539503795868e9496fe34014b5c04d2ed48241b
extra : source : e94884022fa7df95adf90e44a44e4f168d60f01a
2018-06-28 15:54:36 +12:00
Cosmin Sabou
bc28a91735 Backed out changeset 97499b2f5612 (bug 1471800) as requested by cpearce. 2018-06-28 13:53:42 +03:00
Margareta Eliza Balazs
6ff6f954a0 Backed out changeset cfbcac62d08e (bug 1466182) for causing bustage builds/worker/workspace/build/src/dom/media/webaudio/AudioWorkletProcessor.cpp on a CLOSED TREE 2018-06-29 14:45:37 +03:00
Arnaud Bienner
a2c3715849 Bug 1466182 - Add AudioWorkletProcessor definitions. r=baku,karlt
MozReview-Commit-ID: 7BLS2iDpFf4

--HG--
extra : rebase_source : 8382347002ad28218ee82b596f3fddc6769e4e9e
2018-06-24 20:02:47 +02:00
shindli
ae4d702ed7 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-06-29 02:25:23 +03:00
Brindusan Cristian
a8b9f39ecf Backed out changeset 1edaea454d03 (bug 1450881) for crashtest failures on dom/animation/test/crashtests/1450881-1.html. CLOSED TREE 2018-06-29 00:06:31 +03:00
Narcis Beleuzu
a86766e095 Backed out 2 changesets (bug 1467919, bug 1467921) for xpcshell failures. CLOSED TREE
Backed out changeset f55e78d65936 (bug 1467921)
Backed out changeset e04f93535a93 (bug 1467919)
2018-06-28 23:40:52 +03:00
Hiroyuki Ikezoe
03b9001764 Bug 1450881 - A crash test when setting null target during flush style. r=birtles
MozReview-Commit-ID: Gkj35x2zTD0
2018-06-29 05:27:30 +09:00
Brindusan Cristian
51f77cdfc4 Backed out changeset b11aa832c41a (bug 1453751) for Mochitest-15 failures in toolkit/components/extensions/test/mochitest/test_ext_webrequest_filter.html. CLOSED TREE
--HG--
rename : browser/base/content/test/favicons/browser_bug408415.js => browser/base/content/test/general/browser_bug408415.js
rename : browser/base/content/test/favicons/browser_bug550565.js => browser/base/content/test/general/browser_bug550565.js
rename : browser/base/content/test/favicons/browser_favicon_change.js => browser/base/content/test/general/browser_favicon_change.js
rename : browser/base/content/test/favicons/browser_favicon_change_not_in_document.js => browser/base/content/test/general/browser_favicon_change_not_in_document.js
rename : browser/base/content/test/favicons/browser_subframe_favicons_not_used.js => browser/base/content/test/general/browser_subframe_favicons_not_used.js
rename : browser/base/content/test/favicons/file_generic_favicon.ico => browser/base/content/test/general/file_bug970276_favicon1.ico
rename : browser/base/content/test/favicons/file_bug970276_popup1.html => browser/base/content/test/general/file_bug970276_popup1.html
rename : browser/base/content/test/favicons/file_bug970276_popup2.html => browser/base/content/test/general/file_bug970276_popup2.html
rename : browser/base/content/test/favicons/file_favicon_change.html => browser/base/content/test/general/file_favicon_change.html
rename : browser/base/content/test/favicons/file_favicon_change_not_in_document.html => browser/base/content/test/general/file_favicon_change_not_in_document.html
rename : browser/base/content/test/favicons/file_with_favicon.html => browser/base/content/test/general/file_with_favicon.html
2018-06-28 23:15:49 +03:00
Brindusan Cristian
12da58dd0d Backed out 2 changesets (bug 1471112) for mochitest failures on test_2_conformance2__textures__image__tex-3d-rgba16f-rgba-float.html. CLOSED TREE
Backed out changeset 4c92c4b611c6 (bug 1471112)
Backed out changeset df70300f00cd (bug 1471112)
2018-06-28 23:03:14 +03:00
Ben Kelly
78b42d6228 Bug 1469873 Make ClientSource::Control() fail if storage access is not available and make claim() respect the result. r=mrbkap 2018-06-28 12:58:23 -07:00