Kyle Huey
fe5f7b4105
Bug 1259290: Part 5 - Remove the cx from WorkerFeature::Notify. r=bz
2016-03-28 10:28:14 -07:00
Kyle Huey
2b94386d24
Bug 1259290: Part 4 - Remove JS_ReportError for a situation that can never happen. r=bz
2016-03-28 10:28:14 -07:00
Boris Zbarsky
e3b2de6aa9
Bug 1255817 part 2. Get rid of AutoJSAPI::OwnsErrorReporting and AutoJSAPI::TakeOwnershipOfErrorReporting. r=bholley
2016-03-23 11:44:54 -04:00
Ben Kelly
cbc3ebad39
Bug 1253793 Update ScriptLoader assertion to handle cancelation case. r=khuey
2016-03-22 13:22:15 -07:00
Eddy Bruel
6894a80365
Bug 1047663 - Disabling the cache in a tab should also disable it for all workers in that tab;r=khuey
2016-03-17 11:03:05 +01:00
Kyle Huey
d11b9db617
Bug 1257032: Make files in dom/workers actually build without unification. r=baku
2016-03-16 11:51:11 -07:00
Ehsan Akhgari
38637e2005
Bug 1251872 - Part 1: Implement Request.referrerPolicy; r=jdm
2016-03-03 16:43:55 -05:00
Boris Zbarsky
9679610dbb
Bug 1072144
part 4. Add a WorkerRunnable::PreRun so that we can move worker global creation to it and always have an AutoEntryScript by the time we're evaluating the main worker script. r=khuey
2016-03-01 16:52:26 -05:00
Wes Kocher
af73c13ee2
Backed out 6 changesets (bug 1072144
) for test_recursion.html failures
...
Backed out changeset ac15fe0e71fd (bug 1072144
)
Backed out changeset b666d48a267d (bug 1072144
)
Backed out changeset 0f0464ef08ed (bug 1072144
)
Backed out changeset 7ba5f3b95022 (bug 1072144
)
Backed out changeset 1912f838fcaa (bug 1072144
)
Backed out changeset 145c9bb59b97 (bug 1072144
)
MozReview-Commit-ID: 7cl4RtpHSfl
2016-03-01 15:41:24 -08:00
Boris Zbarsky
de208d989a
Bug 1072144
part 4. Add a WorkerRunnable::PreRun so that we can move worker global creation to it and always have an AutoEntryScript by the time we're evaluating the main worker script. r=khuey
2016-03-01 16:52:26 -05:00
Boris Zbarsky
2a1057f5b2
Bug 1252221. When GetOrCreateGlobalScope fails while trying to run a ScriptExecutorRunnable::WorkerRun, just suppress the exception, because there is no way to report it without a compartment to work with. r=khuey
2016-03-01 13:49:21 -05:00
Boris Zbarsky
69924c14ce
Bug 1252123. Remove some unnecessary JSContext arguments from worker ScriptLoader methods. 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
7413f2bf46
Bug 1251369. Use an AutoJSAPI that reports its own exceptions around the main runloop in workers. r=khuey
...
The silly leading ": " on the error messages is due to bug 1251518
.
2016-02-26 15:23:13 -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
44f8a852c3
Bug 1249673. Muted errors should be turned into NetworkError DOMExceptions when returning from importScripts on workers, instead of becoming NS_ERROR_FAILURE. r=baku
2016-02-24 10:38:31 -05:00
Boris Zbarsky
bb7c756f0e
Bug 1249652 part 3. Simplify way we handle canceling when ScriptLoaderRunnable::RunInternal fails by canceling things with its actual failure code, so we don't have to guess which failed loads are actual failures and which are just canceled via this mechanism. r=baku,khuey
...
There is a bit of subtlety here with NS_BINDING_ABORTED. Before these changes,
we would land in ReportLoadError, not do anything with NS_BINDING_ABORTED, and
just return. If called from WorkerPrivate::Constructor we'd then go ahead and
throw it on the ErrorResult, but I'm pretty sure we never ended up with
NS_BINDING_ABORTED there. If called from ScriptExecutorRunnable::WorkerRun, we
would proceed on to ScriptExecutorRunnable::PostRun and hence
ShutdownScriptLoader where we would throw on the ErrorResult but NOT on the
JSContext. Then we would unwind to our consumer and if that consumer was a
toplevel script load we would suppress the exception on the ErrorResult.
Otherwise we'd go ahead and throw the exception we ended up with to the caller.
The upshot is that we used to not fire error events on a worker whose main
script load was canceled with NS_BINDING_ABORTED. So we try to preserve that
behavior explicitly for toplevel scripts.
2016-02-24 10:38:31 -05:00
Boris Zbarsky
2ac6ce9202
Bug 1249652 part 2. ScriptExecutorRunnable::WorkerRun should immediately move JS exceptions to its ErrorResult instead of allowing them to linger on the JSContext. r=baku,khuey
2016-02-24 10:38:31 -05:00
Boris Zbarsky
8b630a7187
Bug 1249351 part 1. When doing importScripts of multiple scripts in a service worker, make sure to track the cache streams per-loadinfo, instead of trying to make them all wait on the same stream. r=bkelly
2016-02-22 17:13:38 -05:00
Chris Peterson
c824bef9fe
Bug 1240265 - Annotate intentional switch fallthroughs in dom/. r=mrbkap
...
dom/base/Element.cpp:2920:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/Element.cpp:2935:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsDocument.cpp:6595:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsDocument.cpp:7631:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsDocument.cpp:7922:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsGlobalWindow.cpp:7573:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsXMLContentSerializer.cpp:1393:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/cache/AutoUtils.cpp:487:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/html/HTMLInputElement.cpp:3808:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/html/HTMLInputElement.cpp:3836:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/storage/DOMStorageDBThread.cpp:224:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/workers/ScriptLoader.cpp:1994:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
--HG--
extra : rebase_source : ba9bd93b2c65e2db05b26e7b4c203dd7710516f3
2015-11-25 23:26:32 -08:00
Ben Kelly
1d9e5fddae
Bug 1233171 Cancel channel when ScriptLoader is aborted during service worker script load. r=khuey
2015-12-17 10:11:26 -05:00
Ben Kelly
3e447dafea
Bug 1229970 Abort script loading start requests if a load has been canceled. r=khuey
2015-12-09 18:21:00 -05:00
Andrea Marchesini
bae9fd5f6c
Bug 1229071 - importScripts should throw the correct error result in case the loading of one of scripts fails, r=bz
2015-12-02 13:02:58 +00:00
Andrea Marchesini
fe6be4c172
Bug 1218433 - Use AsyncOpen2 in dom/workers/ScriptLoader.cpp - part 1, r=sicking
2015-11-16 22:41:03 +00:00
Wes Kocher
9d1f194cbb
Backed out 2 changesets (bug 1218433) for wpt failures CLOSED TREE
...
Backed out changeset 1cc8cc0444c0 (bug 1218433)
Backed out changeset 5418ca0e0378 (bug 1218433)
--HG--
extra : commitid : H1h8VHrzxx8
2015-11-16 11:13:43 -08:00
Andrea Marchesini
d35be12a6d
Bug 1218433 - Use AsyncOpen2 in dom/workers/ScriptLoader.cpp - part 1, r=sicking
2015-11-16 16:57:29 +00:00
Sebastian Hengst
a0cf7d50ad
Backed out 2 changesets (22360424ed15, 325a67608df0) (bug 1218433) for W(1,2) failures. r=backout on a CLOSED TREE
...
Backed out changeset 22360424ed15 (bug 1218433)
Backed out changeset 325a67608df0 (bug 1218433)
2015-11-15 15:56:45 +01:00
Andrea Marchesini
9137d7e47b
Bug 1218433 - Use AsyncOpen2 in dom/workers/ScriptLoader.cpp - part 1, r=sicking
2015-11-15 11:57:06 +00:00
Jonas Sicking
27c89ea082
Bug 1223647: CSP erroneously inherited into dedicated workers. r=ckerschb
...
--HG--
rename : dom/workers/test/serviceworkers/test_eval_not_allowed.html^headers^ => dom/workers/test/serviceworkers/test_eval_allowed.html^headers^
2015-11-10 21:16:12 -08:00
Sebastian Hengst
c7cc4bc5c8
Backed out changesets 5a3092c456c0,8dcbfd14f1e5 (bug 1218433) for M3, W3 failures and M10 failure on Android. r=backout
...
* * *
Backed out changeset 8dcbfd14f1e5 (bug 1218433)
462 INFO TEST-UNEXPECTED-FAIL | dom/security/test/csp/test_child-src_worker-redirect.html | CSP child-src worker test other-src-worker_redir-same - got "Error: Failed to load script (nsresult = 0x805e0006)", expected "blocked"
479 INFO TEST-UNEXPECTED-FAIL | dom/security/test/csp/test_child-src_worker.html | Test timed out.
486 INFO TEST-UNEXPECTED-FAIL | dom/security/test/csp/test_child-src_worker_data.html | Test timed out.
2015-11-12 18:44:51 +01:00
Andrea Marchesini
f55a08e614
Bug 1218433 - Use AsyncOpen2 in dom/workers/ScriptLoader.cpp - part 1, r=sicking
2015-11-12 14:51:17 +00:00
Wes Kocher
2e6d1e7dfb
Backed out changeset d12f758f5f36 (bug 1223647) for android csp test failures
...
--HG--
extra : commitid : GRTvvKDy9Ki
2015-11-11 14:27:52 -08:00
Jonas Sicking
ea6cf63b0f
Bug 1223647: CSP erroneously inherited into dedicated workers. r=ckerschb
2015-11-10 21:16:12 -08:00
Wes Kocher
9e8bd5977f
Backed out 2 changesets (bug 1218433) for android CSP test failures in m(10) CLOSED TREE
...
Backed out changeset 50af9a9ba6d9 (bug 1218433)
Backed out changeset 5d8b8744419f (bug 1218433)
--HG--
extra : commitid : 625lyUcSwAk
2015-11-11 10:22:08 -08:00
Andrea Marchesini
934e4c3ba4
Bug 1218433 - Use AsyncOpen2 in dom/workers/ScriptLoader.cpp - part 1, r=sicking
2015-11-11 16:59:46 +00:00
Phil Ringnalda
b98d58e46d
Back out changeset 4d6d9c1e52e4 (bug 1223647) for failures in test_csp.html, csp/test_redirects.html and csp/test_worker_redirect.html
...
--HG--
extra : rebase_source : a4a53053968cfa19e6544dd3e59e36ef23fcf353
2015-11-10 23:10:04 -08:00
Jonas Sicking
426e42e7f9
Bug 1223647: CSP erroneously inherited into dedicated workers. r=ckerschb
2015-11-10 21:16:12 -08:00
Andrea Marchesini
24cd451d65
Bug 1211967 - Fix how we report errors when loading a worker from a data url, r=bz
2015-10-26 17:28:45 +00: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
Andrea Marchesini
f93604eafb
Bug 1211970 - "Muted errors in workers are not correctly reported to the console". r=bz
2015-10-15 05:05:00 +02:00
Andrea Marchesini
ef38daea39
Bug 1160890
, r=smaug
2015-10-15 14:06:55 +02:00
Ben Kelly
323efab6af
Bug 1210941 P11 Use LOAD_BYPASS_SERVICE_WORKER in worker ScriptLoader. r=ehsan
2015-10-06 06:37:07 -07:00
Ehsan Akhgari
59c135c176
Bug 1198078 - Add support for TYPE_INTERNAL_SERVICE_WORKER; r=ckerschb,tanvi
2015-09-16 19:15:30 -04:00
Kyle Huey
d4f49ff9e9
Bug 1198982: Don't fail the SW load for an importScripts failure. r=bkelly
2015-08-30 10:31:52 -07:00
Phil Ringnalda
700dfcd3d1
Back out f9edb5fe8fb9 (bug 1198982) for webplatform registration.https.html failures
...
CLOSED TREE
2015-08-26 21:36:40 -07:00
Kyle Huey
517ebc93c6
Bug 1198982: Don't fail the SW load for an importScripts failure. r=bkelly
2015-08-26 19:21:03 -07:00
Nikhil Marathe
b5681e95be
Bug 1193911 - Ensure synthetic Responses gets a valid channel info. r=ehsan
...
Right now, synthetic Responses did not have a valid channel info. When these
were saved in the Cache, and then restored, the restored Response did have
a ChannelInfo, but that ChannelInfo did not have a valid security info.
Passing this to respondWith() then caused the interception to fail.
This patch modifies Response::Constructor() to initialize its ChannelInfo from
the global. ChannelInfo can now initialize itself from a nsIDocument. All
workers now store their ChannelInfo on the WorkerLoadInfo.
--HG--
extra : commitid : L1wltwPICd8
extra : rebase_source : 8dab4c414eb50e02a00dd2cb3ee848b811060e70
2015-08-17 15:08:58 -07:00
Andrew McCreight
621e57b2b7
Bug 1176341 - De-holder nsIXPConnect::CreateSandbox. r=baku,gabor
2015-07-21 11:31:44 -07:00
Ryan VanderMeulen
fb3e0b058e
Backed out changeset 553a3e1e7b18 (bug 1176341) for bustage.
...
CLOSED TREE
2015-07-21 13:00:55 -04:00
Andrew McCreight
5cbc3abf39
Bug 1176341 - De-holder nsIXPConnect::CreateSandbox. r=baku,gabor
2015-07-21 09:44:37 -07:00