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

88 Коммитов

Автор SHA1 Сообщение Дата
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Kit Cambridge 2bfd46b860 Bug 1257401 - Remove the worker descriptor for `PushManager`. r=khuey
MozReview-Commit-ID: 4nZElH1K3W5

--HG--
extra : rebase_source : d325e2fc44124acc0bd04b133605bf04a99ab906
2016-04-01 15:25:49 -07:00
Kyle Huey d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Kyle Huey fe5f7b4105 Bug 1259290: Part 5 - Remove the cx from WorkerFeature::Notify. r=bz 2016-03-28 10:28:14 -07:00
Boris Zbarsky 57fc0e989c Bug 1255709. Simplify the JSContext/GlobalObject handling in ServiceWorkerRegistrationMainThread::GetPushManager a bit. r=bkelly 2016-03-11 16:43:31 -05:00
Boris Zbarsky 5a9c81f6df Bug 1255298. Just pass through the JSContext when passing through the NotificationOptions in notification code. r=wchen 2016-03-10 18:07:28 -05:00
Boris Zbarsky f47268eca8 Bug 1252127. Remove unnecessary JSContext argument from PromiseWorkerProxy::CleanUp. r=khuey 2016-02-29 14:52:42 -05:00
Boris Zbarsky 663b9bd562 Bug 1252091. Add/RemoveFeature don't need a JSContext argument. r=khuey 2016-02-29 14:52:42 -05:00
Boris Zbarsky 7345c5edb1 Bug 1251045 part 4. Remove the JSContext argument of WorkerRunnable::Dispatch. r=khuey 2016-02-26 15:23:12 -05:00
Boris Zbarsky 878fd26e89 Bug 1251045 part 3. Remove the JSContext argument of WorkerRunnable::PostDispatch and its overrides. r=khuey 2016-02-26 15:23:12 -05:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Ben Kelly 252fa2e981 Bug 1226443 P6 Ignore update() called during top level service worker script evaluation. r=ehsan 2015-12-11 14:53:11 -05:00
Ben Kelly 98ec7b6543 Bug 1227015 P7 Supress unused ErrorResult exception if the worker runnable failed to dispatch. r=catalinb 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 1caaf57e47 Bug 1227015 P7 Supress unused ErrorResult exception if the worker runnable failed to dispatch. r=catalinb 2015-12-10 18:08:14 -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 9227b3237b Bug 1227015 P7 Supress unused ErrorResult exception if the worker runnable failed to dispatch. r=catalinb 2015-12-08 17:52:16 -05:00
Ben Kelly 0698a4728b Back out rev 4faa4cf68052 (bug 1227015 P7) for bustage 2015-12-08 17:49:05 -05:00
Ben Kelly ac0381ca84 Bug 1227015 P7 Suppress unused ErrorResult exception if the worker runnable failed to dispatch. r=catalinb 2015-12-08 17:15:55 -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 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
Carsten "Tomcat" Book 3d36e0d95d Backed out changeset bc9a43cbbdfa (bug 1227932)
--HG--
extra : rebase_source : a52df07605cf6df721f4d3e0753deb31b66c2d07
2015-11-26 12:02:57 +01:00
Catalin Badea 4390d49a7b 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 01:09:39 +02:00
Boris Zbarsky dd86a620e3 Bug 1224596 part 12. Switch ServiceWorkerRegistration to using the new WorkerMainThreadRunnable::Dispatch signature. r=khuey 2015-11-24 00:04:21 -05:00
Boris Zbarsky df75080cc3 Bug 1226479. Change ErrorResult::ThrowTypeError/ThrowRangeError to take string references, not pointers. r=mccr8 2015-11-20 13:36:46 -05: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 68a7000f5d Bug 1221351 P1 ServiceWorkerContainer and ServiceWorkerRegistration should not crash for null window owner. r=catalinb 2015-11-05 09:33:33 -08: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
Andrew McCreight 5171450b27 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-05 09:38:14 -07:00
Wes Kocher f0d829220d Backed out changeset 821791826960 (bug 1197893) for Nexus build failures CLOSED TREE 2015-10-02 16:17:05 -07:00
Andrew McCreight 35cd15b8de Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 15:09:02 -07:00
Andrew McCreight 7a2c6267d4 Backed out changeset 6fa9cdf4002b for breaking the build. 2015-10-02 10:49:28 -07:00
Andrew McCreight 404740a102 Bug 1197893 - Check the number of arguments for ThrowTypeError() and ThrowRangeError() at compile time. r=peterv 2015-10-02 10:42:08 -07:00
Nikhil Marathe 6d235278db Bug 1203324 - disable notifications on serviceworkers. r=ehsan,wchen
Per the product discussion, the Notification API should be disabled in
ServiceWorker in release builds for 42 since the UX isn't great [1].

The aim is to release in 44.

Apologies for the code duplication for pref checking in Notification and
ServiceWorkerRegistration. There isn't a easy way to get
ServiceWorkerRegistration's generated binding to include Notification.h without
having an attribute/method that uses Notification.

[1]: https://mana.mozilla.org/wiki/x/TgAJAw

--HG--
extra : commitid : 5dtc2E63kuM
extra : rebase_source : 4265dcd154462aa4f3b915e9e898fe7b82bf9afc
2015-09-15 12:58:32 -07:00
Nikhil Marathe d5c8bfc780 Bug 1197012 - Fix ThrowTypeError in Notification. r=mccr8
--HG--
extra : commitid : EfR8HuHT7WA
extra : rebase_source : 9d713b3293a1b0e08f2be6015a81a179e4aa1c0e
2015-08-20 22:18:49 -07:00
Nikhil Marathe 548809dc68 Bug 1197421 - Fix promise worker proxy cleanup and update callers. r=catalinb
Get rid of having users dispatch control runnables. It was error prone and
required too much reasoning. It was also possible to end up in a state where
callers would dispatch a WorkerRunnable, which would succeed, so they would not
dispatch a WorkerControlRunnable. Then the worker would stop Running,
canceling and releasing the runnable leading to releasing the proxy in an
unclean state. Instead, we AddRef() and add the feature and remove the feature
and Release() on Notify(). If callers successfully run a WorkerRunnable they
clean the proxy. If not, the proxy stays alive until the worker switches to
Canceling state.

--HG--
extra : commitid : BnnijSibVYe
extra : rebase_source : 15f6810dfbd0c88a983196de401c55e782b1d1d8
2015-09-02 10:07:26 -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
Nikhil Marathe cf6e7ed78b Bug 1184574 - Allow access to PushManager on ServiceWorker. r=kitcambridge,smaug,catalinb
Refactoring to allow access to PushManager in ServiceWorkerGlobalScope. See comment in PushManager.h for details.

--HG--
extra : commitid : A7RvB9rm8av
extra : transplant_source : %20%99%CA%B0%EB%B9%82%27D%F7e%B8UQ%12%E6%9B%18%BB5
2015-07-23 08:30:15 -07:00
Nikhil Marathe c8a46b6965 Bug 1114554 - Patch 5 - getNotifications() on worker thread. r=wchen
--HG--
extra : rebase_source : 7d42bf40e9228d3729e0a269d66fa427db3eb38f
2015-06-25 18:50:25 -07:00
Nikhil Marathe 0dcce8d9fe Bug 1114554 - Patch 4 - ServiceWorkerRegistration.getNotifications() on main thread. r=wchen
--HG--
extra : rebase_source : 094fa1eca4e3a9e303202ecaad4edf6cd816c065
2015-06-25 18:50:25 -07:00
Nikhil Marathe b3f34da652 Bug 1114554 - Patch 2 - ServiceWorkerRegistration.showNotification(). r=wchen,baku
Refactor creation and show dispatch so Notification constructor and showNotification can use it.
Move persistence to ShowInternal.
NotificationStorage calls callback async even when fetching from cache, simply to have similar semantics.
Calls to Notification::Get() are performed async since persistence is now async after being moved to ShowInternal().
Both are in accordance with the spec where the "append to list of notifications" operation is performed in the "show steps" which are performed in parallel from API invocations.

--HG--
extra : rebase_source : 52d3864fb39aa892d2f70dc2b71f09fb0d2ba533
2015-06-25 18:50:24 -07:00
Nikhil Marathe 0b129137a7 Bug 1114554 - Patch 1 - Notification ServiceWorker API stubs. r=wchen,baku
--HG--
extra : rebase_source : e033641ae9d271d1681c424f533db63671b3e735
2015-06-25 18:50:24 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Randell Jesup b63478816a Bug 1155059: Patch 5 - clean up ServiceWorkers and avoid leaks r=nikhil 2015-07-09 23:21:46 -04:00
Hiroyuki Ikezoe 47d5b2db66 Bug 1179982 - Fix all compile errors in dom/workers on non-unified build. r=mrbkap 2015-07-02 14:54:00 +02:00
Ryan VanderMeulen 84d140a54b Backed out 11 changesets (bug 916893, bug 1114554) for various mochitest and Gij failures.
Backed out changeset 247ca4bf258e (bug 1114554)
Backed out changeset 5578d5c280a6 (bug 1114554)
Backed out changeset 404830c1ecf7 (bug 1114554)
Backed out changeset 15bdf9c78e6e (bug 1114554)
Backed out changeset f92abe5ec784 (bug 1114554)
Backed out changeset 75324b6862a8 (bug 1114554)
Backed out changeset ce8a768782f2 (bug 1114554)
Backed out changeset 0d860fd12534 (bug 1114554)
Backed out changeset 7dc2448065a9 (bug 916893)
Backed out changeset c3b07f0d1a60 (bug 916893)
Backed out changeset 61c3f24cc908 (bug 916893)

CLOSED TREE
2015-06-25 19:52:40 -04:00
Nikhil Marathe 811edc788a Bug 1114554 - Patch 5 - getNotifications() on worker thread. r=wchen
--HG--
extra : rebase_source : b3f68e725be5cbfedc2995c9b20450e4bcaa1aae
2015-05-04 09:04:25 -04:00
Nikhil Marathe 54e0ea7180 Bug 1114554 - Patch 4 - ServiceWorkerRegistration.getNotifications() on main thread. r=wchen
--HG--
extra : rebase_source : 7963829964347156d091c2c8f492c546a9e5fdc0
extra : amend_source : a1bcbf20f5e4ab65b4214bc97d64deba9732b952
2015-04-27 14:18:54 -07:00
Nikhil Marathe 7df5ce7b58 Bug 1114554 - Patch 2 - ServiceWorkerRegistration.showNotification(). r=wchen,baku
Refactor creation and show dispatch so Notification constructor and showNotification can use it.
Move persistence to ShowInternal.
NotificationStorage calls callback async even when fetching from cache, simply to have similar semantics.
Calls to Notification::Get() are performed async since persistence is now async after being moved to ShowInternal().
Both are in accordance with the spec where the "append to list of notifications" operation is performed in the "show steps" which are performed in parallel from API invocations.

--HG--
extra : rebase_source : 1becb5055dc29166dc6445227bab4b9daed213cf
2015-05-06 13:52:41 -07:00
Nikhil Marathe 914907fc27 Bug 1114554 - Patch 1 - Notification ServiceWorker API stubs. r=wchen,baku
--HG--
extra : rebase_source : 10558f76070842454f22356d35b4f6639f990e29
2015-03-10 18:57:09 -07:00