Commit Graph

3366 Commits

Author SHA1 Message Date
Andrea Marchesini
561e3f5ffd Bug 1346247 - Bug 1346247 - Avoid race conditions when SW are updated - part 1 - PServiceWorkerUpdater actor, r=bkelly
In this patch I introduce a new actor: PServiceWorkerUpdater managed by
PServiceWorkerManager and running on PBackground. Each time a SoftUpdate() or
Update() operation starts, a PServiceWorkerUpdater is used for having a unique
lock for the update of a particular scope+originAttributes.
The implementation happens on the PBackground thread of the parent process,
where all these PServiceWorkerUpdater actors are taken in an array and, only
the first one for each scope+originAttributes is activated.
2017-03-24 13:21:18 +01:00
Ehsan Akhgari
e67d3e5c18 Bug 1348453 - Make the second argument to ImageBitmap::ExtensionsEnabled() optional; r=baku 2017-03-23 10:27:41 -04:00
Andrea Marchesini
67c2c118a3 Bug 1349572 - FileSystemSync must be able to work also with non nsISeekableStream, r=smaug 2017-03-23 10:53:40 +01:00
Carsten "Tomcat" Book
5f3ac554bc Backed out changeset aa77848f51ee (bug 1349572) for test failures in test_fileReadSlice.xul and others 2017-03-23 08:50:13 +01:00
Andrea Marchesini
15ee5f552d Bug 1349572 - FileSystemSync must be able to work also with non nsISeekableStream, r=smaug 2017-03-23 07:19:55 +01:00
Andrea Marchesini
cd6bd71606 Bug 1341738 - Implement FetchController and FetObserver - part 4 - FetchObserver WebIDL, r=bkelly 2017-03-22 11:06:23 +01:00
Andrea Marchesini
8552a5e7ba Bug 1341738 - Implement FetchController and FetObserver - part 1 - FetchController in WebIDL, r=bkelly 2017-03-22 11:04:57 +01:00
Boris Zbarsky
246fba64e9 Bug 1348331 part 3. Change Preferences::RegisterCallback/RegisterCallbackAndCall/UnregisterCallback to do exact matching on the pref name, not prefix matching. r=froydnj.
MozReview-Commit-ID: GY6J62yWkfk
2017-03-21 14:59:02 -04:00
Boris Zbarsky
ec233151ac Bug 1348331 part 2. Switch Preferences::RegisterCallback/RegisterCallbackAndCall consumers that want prefix matches to the new RefisterPrefixCallback(AndCall) APIs. r=froydnj,padenot
MozReview-Commit-ID: 2ebVZO4fN6i
2017-03-21 14:59:02 -04:00
Andrea Marchesini
50f7937e84 Bug 1340163 - Introducing originNoSuffix as attribute in ContentPrincipalInfo, r=smaug 2017-03-20 16:03:45 +01:00
Catalin Badea
a1b8a7905d Bug 1342255 - Fix crash in respondWith resolved callback. Don't reset interception if the sw throws after .respondWith(). r=asuth 2017-03-20 15:01:04 +00:00
Sebastian Hengst
a472d9b04f Backed out changeset 54a1f0cb64d9 (bug 1340163) for crashing e.g. in browser/components/originattributes/test/browser/browser_cacheAPI.js. r=backout 2017-03-20 15:38:19 +01:00
Andrea Marchesini
38c6ab4035 Bug 1340163 - Introducing originNoSuffix as attribute in ContentPrincipalInfo, r=smaug 2017-03-20 14:51:54 +01:00
Ehsan Akhgari
adb77fecec Bug 1348452 - Give createImageBitmap() an implicit JSContext*; r=baku 2017-03-18 11:55:31 -04:00
Boris Zbarsky
7d85fda7ff Bug 1348215. Fix the SIMPLE_WORKER_PREF setup to not mishandle pref names that start with the worker pref name. r=ehsan
Without this change, we will call WorkerPrefChanged if a pref whose name just
_starts_ with the name of one of our WORKER_SIMPLE_PREF prefs changes.  Then in
WorkerPrefChanged we will get the value of the pref that changed, and store it
under the key identified by the closure, thus writing the value of an incorrect
pref in there.

MozReview-Commit-ID: JTsvvtC5P1o
2017-03-17 14:10:40 -04:00
Ehsan Akhgari
3c91e7a4b7 Bug 1348168 - Disable Mozilla custom ImageBitmap extensions that didn't go through proper API review; r=bzbarsky 2017-03-17 00:10:37 -04:00
Ben Kelly
b9628517d0 Bug 1347739 Don't crash if an ExtendableMessageEvent object has a null source. r=asuth 2017-03-16 21:25:42 -04:00
Till Schneidereit
c7c5b5fa85 Bug 1067942 - Change error message for attempted getter-only property writes to include the property name. r=terrence,ms2ger
MozReview-Commit-ID: 2IyEPyAaoNt
2014-09-30 01:17:55 +02:00
Nicholas Nethercote
8876b32323 Bug 1345262 (part 5) - Fix how JS sampling is started/stopped by the profiler. r=mstange,djvj.
Currently, JS sampling has major problems.

- JS sampling is enabled for all JS threads from the thread that runs
  locked_profiler_start() -- currently only the main thread -- but the JS
  engine can't handle enabling from off-thread, and asserts. This makes
  profiling workers impossible in a debug build.

- No JS thread will be JS sampled unless enableJSSampling() is called, but that
  only happens in locked_profiler_start(). That means any worker threads
  created while the profiler is active won't be JS sampled.

- Only the thread that runs locked_profiler_stop() -- currently only the main
  thread -- ever calls disableJSSampling(). This means that worker threads that
  start being JS sampled never stop being JS sampled.

This patch fixes these three problems in the following ways.

- locked_profiler_start() now sets a flag in PseudoStack that indicates
  JS sampling is desired, but doesn't directly enable it. Instead, the JS
  thread polls that flag and enables JS sampling itself when it sees the flag
  is set. The polling is done by the interrupt callback. There was already a
  flag of this sort (mJSSampling) but the new one is better.

  This required adding a call to profiler_js_operation_callback() to the
  InterruptCallback() in XPCJSContext.cpp. (In comparison, the
  InterruptCallback() in dom/workers/RuntimeService.cpp already had such a
  call.)

- RegisterCurrentThread() now requests JS sampling of a JS thread when the
  profiler is active, the thread is being profiled, and JS sampling is enabled.

- locked_profiler_stop() now calls stopJSSampling() on all live threads.

The patch makes the following smaller changes as well.

- Renames profiler_js_operation_callback() as profiler_js_interrupt_callback(),
  because "interrupt callback" is the standard name (viz.
  JS_AddInterruptCallback()).

- Calls js::RegisterContextProfilingEventMarker() with nullptr when stopping
  JS sampling, so that ProfilerJSEventMarker won't fire unnecessarily.

- Some minor formatting changes.

--HG--
extra : rebase_source : 372f94c963a9e5b2493389892499b1ca205ebc2f
2017-03-10 09:04:23 +11:00
Nicholas Nethercote
d8023679e3 Bug 1345262 (part 2) - Add profiler_{set,clear}_js_context(). r=mstange.
PseudoContext::sampleContext() is always called immediately after
profiler_get_pseudo_stack(). This patch introduces profiler_set_js_context()
and profiler_clear_js_context(), which replace the profiler_get_pseudo_stack()
+ sampleContext() pairs. This takes us a step closer to not having to export
PseudoStack outside the profiler.

--HG--
extra : rebase_source : 8558d1600eafd395cc696d31f3d21fb52a1a74b0
2017-03-09 17:06:35 +11:00
Ben Kelly
12ef9421b4 Bug 1345943 P1 Set the MessageEvent.source to ServiceWorker that called Client.postMessage(). r=asuth 2017-03-10 12:15:07 -05:00
Ben Kelly
546d811304 Bug 1311324 P2 Replace usage of ServiceWorkerMessageEvent with MessageEvent. r=bz 2017-03-09 20:50:13 -05:00
Valentin Gosu
1c5fbd8c6e Bug 1342438 - Remove url .hash encoding/decoding prefs r=bagder
These prefs have been added close to two years ago:
dom.url.encode_decode_hash and dom.url.getters_decode_hash
The main reason for their existence was in case we encounter any web-compat issues. At this point the extra code is mostly useless, and flipping the pref may lead to crashes.

MozReview-Commit-ID: LhAHkYmv0TR

--HG--
extra : rebase_source : 8f2d50d5633496cf165b3925d952bb6475bce3e0
2017-03-08 22:19:34 +01:00
Andrea Marchesini
9749d1a888 Bug 1345277 - Initialize nsIStreamTransportService before dispatching the first worker, r=ehsan 2017-03-08 18:37:08 +01:00
Ben Kelly
7300a549b0 Bug 1345251 Make MozPromise usable on worker threads. r=gerald 2017-03-08 11:45:07 -05:00
Ben Kelly
8325eed6e7 Bug 1345132 Fix races in test_claim.html mochitest. r=catalinb 2017-03-08 10:19:26 -05:00
Shawn Huang
ff64db551b Bug 1339786 - Disable Storage API on Android, r=baku 2017-03-08 19:55:50 +08:00
Michael Layzell
67c4d0b3c1 Bug 1331434 - Part 7: Handle custom cleanup after throwing in /dom/workers, r=baku
MozReview-Commit-ID: 1hKUDi9Oxg7
2017-03-07 19:06:48 -05:00
Carsten "Tomcat" Book
087da3f0d9 merge mozilla-inbound to mozilla-central a=merge 2017-03-07 15:13:31 +01:00
Shawn Huang
9c76c33226 Bug 1268804 Part 4: Add isSecureContext pref in test_interfaces for StorageManager, r=bz 2017-03-07 16:28:56 +08:00
Shawn Huang
9bcc4a5ca9 Bug 1343463 - Move indexeddb service worker test to serviceworkers folder, r=baku
--HG--
rename : dom/indexedDB/test/service_worker.js => dom/workers/test/serviceworkers/service_worker.js
rename : dom/indexedDB/test/service_worker_client.html => dom/workers/test/serviceworkers/service_worker_client.html
rename : dom/indexedDB/test/test_serviceworker.html => dom/workers/test/serviceworkers/test_serviceworker.html
2017-03-07 13:40:37 +08:00
Wei-Cheng Pan
510ba75c20 Bug 1310127 - Part 17: Use MOZ_MUST_USE in netwerk/protocol/http r=smaug
MozReview-Commit-ID: 5gvVZtsa3yS

--HG--
extra : rebase_source : 5e1ab2fc06ae58f18abb8909ac93f9512abbe220
2016-12-20 11:49:32 +08:00
Ben Kelly
50f268f7ad Bug 1343308 P1 Make Clients.matchAll() only return Clients controlled by the current service worker. r=baku 2017-03-01 13:08:54 -05:00
Ho-Pang Hsu
e4dd777d56 Bug 1175163 - Part 1: Migrate claim_fetch_worker to wpt. r=bkelly 2017-03-01 11:30:15 +08:00
Andrea Marchesini
9d68a92efe Bug 1298823 - Make Request constructor throw less often, r=qdot 2017-03-01 11:44:38 +01:00
Joel Maher
f297f17181 Bug 1339232 - annotate more dom/* moz.build files with BUG_COMPONENT. r=overholt
MozReview-Commit-ID: 2HbPxGkrVfv
2017-03-01 08:20:25 -05:00
Ben Kelly
d03573312b Bug 1266747 P3 Sort output of Clients.matchAll(). r=smaug 2017-02-28 22:12:27 -05:00
Ben Kelly
68348a54d1 Bug 1266747 P2 Track last focus time on ServiceWorkerClient. r=smaug 2017-02-28 22:12:27 -05:00
Sebastian Hengst
4a1eb5e2a6 Backed out changeset e54c8d21e4c1 (bug 1266747) 2017-02-28 18:54:24 +01:00
Sebastian Hengst
78abfe9e2f Backed out changeset 274999e28c07 (bug 1266747) 2017-02-28 18:54:20 +01:00
Ben Kelly
b019e8eace Bug 1266747 P3 Sort output of Clients.matchAll(). r=smaug 2017-02-28 10:48:51 -05:00
Ben Kelly
21c36b41bf Bug 1266747 P2 Track last focus time on ServiceWorkerClient. r=smaug 2017-02-28 10:48:51 -05:00
Jan Varga
e161ee742d Bug 1311057 - Part 1: Remove support for packaged apps from asmjscache; r=luke 2017-03-06 18:38:40 +01:00
Carsten "Tomcat" Book
e5ba19f18b Backed out changeset 271dd75925bd (bug 1343463) for causing test failures in test_navigator_secureContext.html
--HG--
rename : dom/workers/test/service_worker.js => dom/indexedDB/test/service_worker.js
rename : dom/workers/test/service_worker_client.html => dom/indexedDB/test/service_worker_client.html
rename : dom/workers/test/test_serviceworker.html => dom/indexedDB/test/test_serviceworker.html
2017-03-06 13:57:47 +01:00
Shawn Huang
4f875a9b13 Bug 1343463 - Move indexeddb service worker test to workers folder, r=baku
--HG--
rename : dom/indexedDB/test/service_worker.js => dom/workers/test/service_worker.js
rename : dom/indexedDB/test/service_worker_client.html => dom/workers/test/service_worker_client.html
rename : dom/indexedDB/test/test_serviceworker.html => dom/workers/test/test_serviceworker.html
2017-03-06 16:24:33 +08:00
Masatoshi Kimura
7be7b11a1c Bug 1342144 - Remove version parameter from the type attribute of script elements. r=jmaher
This patch is generated by the following sed script:
find . ! -wholename '*/.hg*' -type f \( -iname '*.html' -o -iname '*.xhtml' -o -iname '*.xul' -o -iname '*.js' \) -exec sed -i -e 's/\(\(text\|application\)\/javascript\);version=1.[0-9]/\1/g' {} \;

MozReview-Commit-ID: AzhtdwJwVNg

--HG--
extra : rebase_source : e8f90249454c0779d926f87777f457352961748d
2017-02-23 06:10:07 +09:00
Luke Wagner
4c0bba7f15 Bug 1342060 - Followup to 391047948db4 to fix Android tests (r=jorendorff)
MozReview-Commit-ID: HDD8v9tIEe7

--HG--
extra : rebase_source : 0236e646038b0c145e34d5cedb18b8034d0c4aa4
2017-02-23 16:38:39 -06:00
Luke Wagner
6f8ce1e317 Bug 1342060 - wasm: enable by default (r=bbouvier,sr=jorendorff)
MozReview-Commit-ID: LozhxKgleFc

--HG--
extra : rebase_source : 1821c3965c46044e99a132398ea862f49eb6aca0
2017-02-23 13:02:40 -06:00
Ben Kelly
e070aa7b47 Bug 1340654 P1 Set referrer policy in service workers. r=baku 2017-02-23 10:54:42 -05:00
Ben Kelly
0599debb95 Bug 1340652 P2 Override worker principal after channel load completes to get correct principal URL. r=baku 2017-02-23 10:54:41 -05:00