Commit Graph

137 Commits

Author SHA1 Message Date
Yoshi Huang
bd65e48e3f Bug 1233644 - use pattern matching when listening clear-origin-data. r=baku 2015-12-18 18:58:41 +08:00
Ehsan Akhgari
40c82fa10c Bug 1236686 - Remove nsIFetchEventDispatcher; r=jdm 2016-01-05 15:04:41 -05:00
Ben Kelly
9af4ff4976 Bug 1231974 P3 Store the principal on the ServiceWorkerJobBase. r=baku 2015-12-18 11:04:39 -05:00
Ben Kelly
6078977989 Bug 1226443 P2 Make service worker fetch and functional events used scheduled timer updates. r=ehsan 2015-12-11 14:53:11 -05:00
Ben Kelly
3a28ef3617 Bug 1226443 P1 Add a timer based mechanism for firing service worker updates. r=ehsan 2015-12-11 14:53:10 -05:00
Ben Kelly
a27a88c3ed Bug 1227015 P5 Remove ServiceWorkerRegistrationInfo mScriptSpec. r=ehsan 2015-12-11 14:53:10 -05:00
Ben Kelly
6fa639dd7a Bug 1227015 P1 Create ServiceWorkerScriptJobBase as parent class to register and install jobs. r=ehsan 2015-12-11 14:53:10 -05:00
Phil Ringnalda
9229dc1d27 Back out 13 changesets (bug 1226443, bug 1227015) for a variety of serviceworker web-platform-test failures
CLOSED TREE

Backed out changeset d518261eb3b1 (bug 1226443)
Backed out changeset a7def186c1d3 (bug 1226443)
Backed out changeset e2f21ee1cd4c (bug 1226443)
Backed out changeset 8c4aff8bbfaf (bug 1226443)
Backed out changeset 4c85bf5e9bf5 (bug 1226443)
Backed out changeset 8fbc71a2912a (bug 1227015)
Backed out changeset 00ac71165014 (bug 1227015)
Backed out changeset e261f601b14d (bug 1227015)
Backed out changeset 78896c0bcb95 (bug 1227015)
Backed out changeset 244093d57c03 (bug 1227015)
Backed out changeset 03abf4d48e38 (bug 1227015)
Backed out changeset 2090c1e30933 (bug 1227015)
Backed out changeset 84e011be4e35 (bug 1227015)
2015-12-10 18:49:48 -08:00
Ben Kelly
33b46308aa Bug 1226443 P2 Make service worker fetch and functional events used scheduled timer updates. r=ehsan 2015-12-10 18:08:14 -05:00
Ben Kelly
7c8d5aa8c3 Bug 1226443 P1 Add a timer based mechanism for firing service worker updates. r=ehsan 2015-12-10 18:08:14 -05:00
Ben Kelly
5488438bfc Bug 1227015 P5 Remove ServiceWorkerRegistrationInfo mScriptSpec. r=ehsan 2015-12-10 18:08:13 -05:00
Ben Kelly
5a2acd2b46 Bug 1227015 P1 Create ServiceWorkerScriptJobBase as parent class to register and install jobs. r=ehsan 2015-12-10 18:08:13 -05:00
Phil Ringnalda
9af3731499 Back out 7 changesets (bug 1227015) for serviceworker bustage
CLOSED TREE

Backed out changeset a267542e8cb7 (bug 1227015)
Backed out changeset 03c28b711e1f (bug 1227015)
Backed out changeset 5fc6fca28ddf (bug 1227015)
Backed out changeset 7fb0c56916d2 (bug 1227015)
Backed out changeset 4bef51e9c8ae (bug 1227015)
Backed out changeset c46b5abddec5 (bug 1227015)
Backed out changeset fb4554bd3bde (bug 1227015)
2015-12-08 20:37:16 -08:00
Ben Kelly
58de757508 Bug 1227015 P5 Remove ServiceWorkerRegistrationInfo mScriptSpec. r=ehsan 2015-12-08 11:58:45 -05:00
Ben Kelly
48d0ba6249 Bug 1227015 P1 Create ServiceWorkerScriptJobBase as parent class to register and install jobs. r=ehsan 2015-12-08 11:58:44 -05:00
Ehsan Akhgari
6c4573cf9e Bug 1229056 - Implement ClientQueryOptions.includeUncontrolled; r=jdm 2015-12-02 20:37:03 -05:00
Ehsan Akhgari
5ac100af7e Bug 1222464 - Part 3: Implement Clients.get(); r=jdm 2015-12-02 20:37:01 -05:00
Ehsan Akhgari
d8cef2d841 Bug 1222464 - Part 2: Implement FetchEvent.clientId; r=jdm 2015-12-02 20:36:59 -05:00
Ehsan Akhgari
f9035eb119 Bug 1222464 - Part 1: Save a client ID for top-level navigations on the docshell and assign it as the document ID when we start loading the document; r=jdm
For top-level navigations, we need to compute the client ID when we decide to
intercept the document load, and we need to make sure the document that will
be created later will end up using that same ID.
2015-12-02 20:36:56 -05:00
Ehsan Akhgari
8ec3d68db3 Bug 1201127 - Return the same ServiceWorkerRegistration object from service worker APIs dealing with the same underlying registration object; r=jdm 2015-11-26 15:13:33 -05:00
Catalin Badea
8497aa95e5 Bug 1189659 - Part 3 - Use separate synchronization queues for service worker register jobs and install jobs. r=bkelly 2015-11-26 19:03:10 +02:00
Catalin Badea
e91f080be7 Bug 1227932 - Fix Service Workers SoftUpdate and registration.update code paths. r=ehsan
This patch splits the code paths for registration.update and soft update
since they have different behaviour. Next, it changes ServiceWorkerRegisterJob
to use just one callback and just prevents soft update from queuing a new
task if another one is pending.
2015-11-26 19:03:10 +02:00
Yoshi Huang
4b500464f5 Bug 1209162 - Create OriginAttributes subtypes. IGNORE IDL r=sicking. 2015-11-03 09:50:54 +08:00
Ben Kelly
9aa47b7280 Bug 1226441 - Part 2: Delay functional event dispatch until service worker is activated; r=catalinb 2015-11-24 10:49:00 -05:00
Andrea Marchesini
ef9b1a937a Bug 1227113 - Fix some indentation issues in ServiceWorkerManager, r=janv 2015-11-23 13:47:53 +00:00
dimi
251af3768d Bug 1217367 - Service workers update algorithm optimization. r=bkelly 2015-11-20 16:43:07 +08:00
Kyle Huey
7e1d1b1868 Bug 1224436: Remove enumerator usage in ServiceWorkerManager.cpp. r=njn 2015-11-19 16:03:29 +08:00
Ben Kelly
d6cd5e961e Bug 1217909 P8 Track navigation interceptions per scope in ServiceWorkerManager. r=catalinb 2015-11-16 08:04:11 -08:00
Ben Kelly
a670404ca2 Bug 1217909 P3 Refactor service worker register()/update() to reject only with SecurityErr or TypeErr. r=catalinb
* * *
Bug 1217909 P3 interdiff 001 fix try build
2015-11-16 08:04:11 -08:00
Ben Kelly
086c599374 Bug 1217909 P2 Track registering documents as weak reference so SWM can report errors to them. r=catalinb 2015-11-16 08:04:11 -08:00
Ben Kelly
c311fd953d Bug 1217909 P1 Report service worker exceptions to controlled documents. r=catalinb
* * *
Bug 1217909 P1 interdiff 001 refactor
2015-11-16 08:04:11 -08:00
Eddy Bruel
f2221b7a7f Bug 1220740 - nsIServiceWorkerRegistrationInfo should emit an event when its scriptSpec property changes;r=amarchesini 2015-11-13 21:54:45 +01:00
Eddy Bruel
e12ab5ca8b Bug 1219205 - ServiceWorkerInfo should be an XPCOM object;r=catalinb 2015-11-05 07:15:49 +01:00
Eddy Bruel
4bad6b08ad Bug 1218363 - nsIServiceWorkerManager should notify its listeners when a service worker is (un)registered;r=catalinb 2015-11-04 15:17:02 +01:00
Carsten "Tomcat" Book
fb394133cc Backed out changeset 6e4244690d03 (bug 1218363) for m-oth bustage
--HG--
extra : rebase_source : 33397d7b8bd802aad355ebbdb7ee4cb30171ceb0
2015-11-04 14:26:43 +01:00
Eddy Bruel
03e4076412 Bug 1218363 - nsIServiceWorkerManager should notify its listeners when a service worker is (un)registered;r=catalinb 2015-11-04 11:08:39 +01:00
Eddy Bruel
4bc69d6082 Bug 1216566 - Fix a bug in nsIServiceWorkerManager.getAllRegistrations;r=catalinb 2015-11-02 15:04:41 +01:00
dimi
0a7f5412e3 Bug 1207727 - Rework updating service workers according to the latest spec. r=bkelly 2015-10-26 10:59:48 +08:00
Catalin Badea
cc62c14549 Bug 1172870 - Implement service workers clients.openWindow for desktop (non-e10s). r=baku,smaug
Based on patches from:
  Nikhil Marathe <nsm.nikhil@gmail.com>
  Alberto Crespell Perez <alberto.crespell@gmail.com>
2015-10-24 15:16:23 +03:00
Nathan Froyd
01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Catalin Badea
76c7d43fd9 Bug 1188545 - Disentangle service workers from shared workers and refactor event dispatching code into a separate class. r=nsm,mrbkap 2015-09-30 19:11:03 -04:00
Wes Kocher
6fbdec2422 Backed out 12 changesets (bug 1188545) for test_fetch_cors failures CLOSED TREE
Backed out changeset e04738ee72a3 (bug 1188545)
Backed out changeset 1989893b59de (bug 1188545)
Backed out changeset 11ff29cc25d8 (bug 1188545)
Backed out changeset 4b6bdf859845 (bug 1188545)
Backed out changeset 76eb7ffeca2a (bug 1188545)
Backed out changeset 4473e036b52e (bug 1188545)
Backed out changeset 2a28cb794b23 (bug 1188545)
Backed out changeset 1fa2f55727f3 (bug 1188545)
Backed out changeset 032f4c24fc34 (bug 1188545)
Backed out changeset 4be675dc1b37 (bug 1188545)
Backed out changeset d5d05def5b17 (bug 1188545)
Backed out changeset e94f12b0bcf3 (bug 1188545)
2015-09-30 11:11:47 -07:00
Catalin Badea
c537f8c503 Bug 1188545 - Disentangle service workers from shared workers and refactor event dispatching code into a separate class. r=nsm,mrbkap 2015-09-30 10:14:33 -04:00
Andrea Marchesini
144da2ac21 Bug 1205676 - Enable WPT service-worker/unregister-then-register-new-script.https.html in e10s, r=nsm 2015-09-23 19:40:51 +01:00
Nikhil Marathe
48d53f38df Bug 1184798 - Ensure workers loads are treated as non-subresource fetches. r=jdm
--HG--
extra : commitid : KSrA2sDx3MI
extra : rebase_source : c28988811316aa40e38752669a928d27750001b6
2015-09-17 11:56:41 -07:00
Ehsan Akhgari
5d40efa578 Bug 1206894 - Enable asynchronous dispatching of fetch events; r=jdm
This refactoring patch separates the preparation of the fetch event
object from its dispatching, so that consumers would be able to
dispatch the event asynchronously.
2015-09-21 20:59:27 -04:00
Nikhil Marathe
fe819ad8d7 Bug 1180861 - Various ServiceWorker registration fixes to get test passing. r=bkelly,jgraham.
This commit implements the following changes to get registration.https.html working.
1) Fail with NS_ERROR_DOM_SECURITY_ERR where the spec requires it.
2) Propagate JSExnType to ServiceWorkerManager::HandleError() so that a JS
   exception object with the correct .name can be created.
3) Fail with security error on redirect failure.
4) Check fetched script's mimetype.
5) Add missing python server files for web-platform-tests.
6) Update web-platform-tests expected data.
7) Several tests have been changed to use TypeError or more appropriate JS
   errors based on my reading of the spec.

--HG--
extra : commitid : IxWo2IVUweU
extra : rebase_source : c3c1ead153027bf84e7f239fd7125224fe25c3c0
2015-08-19 16:21:25 -07:00
Nikhil Marathe
0047229d92 Bug 1187350 - update() should return a Promise. r=ehsan,catalinb
--HG--
extra : commitid : 2SkKnobC9jo
extra : rebase_source : 5f5d5c3ca57237fb63044c66a48861a1a4bf19f3
extra : amend_source : 5ea042fc5cc2be52594eca1fd6cda2f36057b3eb
2015-08-14 15:06:00 -07:00
dimi
758be55430 Bug 1191647 - Listen to clear-origin-data in ServiceWorkerManager.cpp. r=bkelly
--HG--
extra : source : ee8d28602bc21f5d5c32c66e3bb7e3e78d18ad4f
2015-08-19 14:46:53 +08:00
Wes Kocher
7548b216ca Backed out changeset ee8d28602bc2 (bug 1191647) for build bustage CLOSED TREE 2015-08-19 15:55:05 -07:00