Commit Graph

461 Commits

Author SHA1 Message Date
Yoshi Huang
2a51f65d99 Bug 1237152 - rename clear-origin-data to clear-origin-attributes-data, r=smaug
find \( -name '*.cpp' -o -name '*.h' -o -name '*.js' -o -name '*.jsm' -o -name '*.idl' -o -name '*.html' \) \
-a -type f -exec sed -i 's/clear-origin-data/clear-origin-attributes-data/g' {} \;
2016-10-07 17:45:10 +08:00
Tom Tung
c34ee7095c Bug 1187335 - P1 - Add a way to report error to all clients for ServiceWorker and SharedWorker. r=bkelly. 2016-05-23 14:56:46 +08:00
Nicholas Nethercote
b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Gabriele Svelto
fe73634c76 Bug 1296579 - Remove the SimplePush API r=kitcambridge,baku 2016-09-01 20:17:03 +02:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Ben Kelly
d935ad2ac3 Bug 1290116 P5 Make navigator.serviceWorker.getRegistrations() ignore uninstalling registrations. r=asuth 2016-08-18 07:12:09 -07:00
Ben Kelly
846726fe4d Bug 1290116 P3 Delay removing registration until active worker is idle. r=asuth 2016-08-18 07:12:09 -07:00
Ben Kelly
1340a14939 Bug 1290116 P2 Clean up ServiceWorkerManager::StopControllingADocument(). r=asuth 2016-08-18 07:12:08 -07:00
Phil Ringnalda
4083fafafc Backed out 10 changesets (bug 1290116, bug 1293690) for build bustage
CLOSED TREE

Backed out changeset bbc14d107fca (bug 1290116)
Backed out changeset a81b6ce5c25f (bug 1290116)
Backed out changeset e0b9c25b6125 (bug 1290116)
Backed out changeset 8e9a9ba04ce5 (bug 1290116)
Backed out changeset 2d5ad5e9ed20 (bug 1290116)
Backed out changeset eb7da0dbfc72 (bug 1290116)
Backed out changeset 6a4e8c92faae (bug 1290116)
Backed out changeset 0342d98afa10 (bug 1293690)
Backed out changeset d84b0768f0ce (bug 1293690)
Backed out changeset f9f62ade9508 (bug 1293690)
2016-08-17 21:16:43 -07:00
Ben Kelly
91fe27b9bf Bug 1290116 P5 Make navigator.serviceWorker.getRegistrations() ignore uninstalling registrations. r=asuth 2016-08-17 20:03:21 -07:00
Ben Kelly
a921c723d8 Bug 1290116 P3 Delay removing registration until active worker is idle. r=asuth 2016-08-17 20:03:21 -07:00
Ben Kelly
43fa240037 Bug 1290116 P2 Clean up ServiceWorkerManager::StopControllingADocument(). r=asuth 2016-08-17 20:03:20 -07:00
Nicholas Nethercote
bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10:00
Kaku Kuo
a6ed727230 Bug 1292091 - Part 2 - replace MaybeResolve(JS::UndefinedHandleValue) with MaybeResolveWithUndefined(); r=bz
MozReview-Commit-ID: KNbxVcCVqts

--HG--
extra : transplant_source : %1D%18%E5%C9o%F0%29%E7%E0%93%EEcR%C7B%3BeX%B3%87
2016-08-09 17:15:13 +08:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Ben Kelly
d6ce89f9c9 Bug 1170543 P4 Don't active service worker until the previous active service worker is idle. r=asuth 2016-07-27 20:36:10 -04:00
Ben Kelly
1a8803ebd5 Bug 1170543 P3 Expose ServiceWorker idle thread state to ServiceWorkerManager. r=asuth 2016-07-27 20:36:10 -04:00
Ben Kelly
c8cef10a01 Bug 1228277 P2 Make skipWaiting() check the evaluating service worker script. r=asuth 2016-07-27 19:09:15 -04:00
Andrew Sutherland
d1659931b7 Bug 1267473 - Report to console if service worker script 404s. r=bkelly
Add an error message of the following form for when a register/update job
fails for network reasons:

Failed to register/update a ServiceWorker for scope
‘http://mochi.test:8888/tests/dom/workers/test/serviceworkers/network_error/’:
Load failed with status 404 for script
‘http://mochi.test:8888/tests/dom/workers/test/serviceworkers/404.js’.

A mochitest is added that verifies this.

To simplify the process of logging error messages, ServiceWorkerManager gains
a new LocalizeAndReportToAllClients method that always provides the SW scope as
the first argument to the localized string since all good error messages should
include it.

Its argument list takes an nsTArray<nsString> in order to reduce the potential
for use-after-free scenarios from the char16_t** signature that unfortunately
has rippled outwards from the nsIStringBundle interface.  This potentially
results in more memory allocation and byte shuffling than is strictly
necessary, but we're also talking about rare error logging where it's
better to optimize for easily adding the messages without needing to get hung
up on the life-cycle of temporaries.

nsTArray gained a std::initializer_list in bug 1228641.  It is explicit, so
inline argument usages may take a form along the lines of:
`nsTArray<nsString> { string1, string2, ... }`

This change did necessitate a change to nsContentUtils to add an nsTArray
variant of FormatLocalizedString since the existing public function was
slightly too clever.  It used a template function to statically acquire the
number of arguments at compile time, which is not compatible with the dynamic
nsTArray usage. Since nsTArray may be useful to other consumers as well, I
placed the conversion logic in nsContentUtils.
2016-07-10 22:22:27 -04:00
Ben Kelly
d2dad60d4c Bug 1283674 P1 Make ServiceWorkerContainer::GetController() work gracefully when its window is disconnected. r=baku 2016-07-04 06:50:25 -07:00
Andrea Marchesini
82f92bee37 Bug 1279453 - Remove separate worker binding for ServiceWorkerRegistration API, r=bkelly 2016-06-12 16:26:51 +02:00
Jonathan Watt
b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Andrew Sutherland
af016de2cb Bug 1272436 - P0: Implement "only-if-cached" RequestCache mode. r=mayhemer, r=bkelly, r=bzbarsky for WebIDL change
The fetch spec has re-introduced "only-if-cached" mode which loads only from
the cache.  There are privacy implications to this so for the time being it
is required that "same-origin" mode is used.
2016-06-08 12:10:15 -04:00
Kit Cambridge
d9d287a14e Bug 1265841 - Implement the notificationclose service worker event. r=wchen,baku
MozReview-Commit-ID: EQfCbQKqn9H

--HG--
extra : rebase_source : 2dad51a3c148db794769fb7c64c28f81ea2ca6ff
extra : histedit_source : 254e2e372ba605f74c1f5106f40b207e492e85e1
2016-04-19 22:04:09 -07:00
Ben Kelly
05565765eb Bug 1254741 P2 Don't aggressively terminate service workers when last controlled window is closed. r=baku 2016-05-23 02:46:26 -07:00
Andrea Marchesini
b4fdf724ae Bug 1268393 - Some compilation issues in ServiceWorker code, r=ehsan 2016-04-29 09:01:22 +08:00
Jonathan Watt
2bb448cbb2 Bug 1267509 - Make nsContentSecurityManager::IsURIPotentiallyTrustworthy act on an nsIPrincipal. r=bz
MozReview-Commit-ID: Zu1zU4Brkx

--HG--
rename : dom/security/test/unit/test_isURIPotentiallyTrustworthy.js => dom/security/test/unit/test_isOriginPotentiallyTrustworthy.js
2016-04-26 11:30:43 +01:00
Kyle Huey
c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Ben Kelly
e5a1d1af80 Bug 1266857 Make Clients.claim() use observer document list instead of secondary hashtable. r=bz 2016-04-24 08:11:32 -07:00
Phil Ringnalda
296f3a95c3 Back out 4 changesets (bug 1265771, bug 1266857) for leaks in browser_DownloadPDFSaver.js on Windows
CLOSED TREE

Backed out changeset a0c85ccffafd (bug 1266857)
Backed out changeset 1cf8785bdc0c (bug 1265771)
Backed out changeset e411c3ccd7b6 (bug 1265771)
Backed out changeset a298cd2c9417 (bug 1265771)
2016-04-22 21:27:11 -07:00
Ben Kelly
b4090694b7 Bug 1266857 Make Clients.claim() use observer document list instead of secondary hashtable. r=bz 2016-04-22 00:50:13 -07:00
Ben Kelly
d78f4aec16 Bug 1265795 P3 Assert that controlled documents have an outer window. r=bz 2016-04-21 16:10:40 -07:00
Ben Kelly
7ccf656ad3 Bug 1265761 Clients.matchAll() should treat http windows as secure if devtools are open and http testing is enabled. r=ehsan 2016-04-19 11:22:16 -07:00
Ben Kelly
a9a4f7363c Bug 1263307 P2 Make ServiceWorkerRegistrationInfo worker members private. r=jdm 2016-04-17 04:29:53 -07:00
Ben Kelly
6f3adcd11b Bug 1260591 Move ServiceWorkerInfo and ServiceWorkerRegistrationInfo into separate files. r=jdm 2016-04-08 17:28:25 -07:00
Wes Kocher
06cdc2f4b8 Backed out changeset c24f78610523 (bug 1260591) for build bustage on at least Windows CLOSED TREE
MozReview-Commit-ID: AlLfu3CM10S

--HG--
extra : amend_source : ebac1dd7e8731db98da1bf286e7a88bee5c4e171
2016-04-08 16:03:54 -07:00
Ben Kelly
60056e5afe Bug 1260591 Move ServiceWorkerInfo and ServiceWorkerRegistrationInfo into separate files. r=jdm 2016-04-08 15:43:11 -07:00
Ben Kelly
807cba86ca Bug 1256428 P17 Rename service worker job classes to remove "2" suffix. r=jdm 2016-04-06 13:27:23 -07:00
Ben Kelly
bd0809f521 Bug 1256428 P12 ServiceWorkerUnregisterJob2 should not use ServiceWorkerManager internals. r=jdm 2016-04-06 13:27:23 -07:00
Ben Kelly
6bdc298a74 Bug 1256428 P10 Remove ServiceWorkerRegistrationInfo::mUpdating flag. r=jdm 2016-04-06 13:27:23 -07:00
Ben Kelly
1bafe887a8 Bug 1256428 P9 Remove now unused code from ServiceWorkerManager.cpp. r=jdm 2016-04-06 13:27:22 -07:00
Ben Kelly
7358d7c977 Bug 1256428 P6 Use ServiceWorkerJobQueue2 and new job classes in ServiceWorkerManager. r=jdm 2016-04-06 13:27:22 -07:00
Ben Kelly
b49ff12e19 Bug 1261776 Use SafeElementAt() in service worker job queue. r=ehsan 2016-04-06 10:21:36 -07:00
Kit Cambridge
4d03aea7f9 Bug 1255621 - Ignore service workers previously registered in non-private windows. r=bkelly
MozReview-Commit-ID: 8ncS62nJKVD

--HG--
extra : rebase_source : c06bc3a1595e3f5c42ce9dfc1ca78a0845c1c599
2016-04-01 14:17:07 -07:00
John Dai
059fdf21d7 Bug 1220757 - Add report to console when service worker register fails due to mismatching scope path.r=bkelly
MozReview-Commit-ID: 9hRBzWtSAd2

--HG--
extra : rebase_source : 8552934879813ac2bd6ca828b3a2ec99b35893df
2016-03-31 23:08:45 -07:00
Kit Cambridge
c92c8e5179 Bug 1247089 - Add a mode to ReportToConsoleNonLocalized that ignores the calling location. r=bkelly
MozReview-Commit-ID: 3hAP7IgNxYs

--HG--
extra : rebase_source : fa07988a1359863ba12383055a6fbb81722f1363
2016-03-10 20:28:41 -08:00
Kit Cambridge
d55b21e98b Bug 1246341 - Report push event errors and rejections to the Push service. r=baku
MozReview-Commit-ID: D6fRPqojOEh

--HG--
extra : rebase_source : 41c55862cb7393681fdea28e35b689a970a376c3
2016-03-28 11:50:39 -07:00
Kyle Huey
d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Ben Kelly
9856db4da2 Bug 1256411 Simplify and cleanup ServiceWorkerInfo. r=ehsan 2016-03-15 07:29:56 -07:00
Ehsan Akhgari
ac9a100c66 Bug 1120715 - Part 1: Add Necko APIs to preserve the Request cache mode on the channel; r=mayhemer 2016-03-11 14:40:33 -05:00