396 Commits

Author SHA1 Message Date
Frederik Braun
a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Logan Smyth
8ae3774a1c Bug 780269 - Pass (X-)SourceMap header to SpiderMonkey for workers. r=perry
Differential Revision: https://phabricator.services.mozilla.com/D70293
2020-07-07 21:19:58 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Simon Giesecke
50f1f5f460 Bug 1648449 - Use NotNull for CacheCreator::mLoaders. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81076
2020-06-30 08:35:19 +00:00
Simon Giesecke
1abd166cd2 Bug 1648449 - Use TransformIntoNewArray in Load. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81075
2020-06-30 08:35:01 +00:00
Simon Giesecke
5518dacaf3 Bug 1648449 - Remove intermediate conversion from iterators to indexes. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81073
2020-06-30 08:34:49 +00:00
Simon Giesecke
41eebf733e Bug 1648449 - Pass Span instead of indexes to ScriptExecutorRunnable. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81072
2020-06-30 08:34:36 +00:00
Simon Giesecke
db4e38fa9b Bug 1648449 - Use range-based for for iterating mLoadInfos. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81070
2020-06-30 08:34:21 +00:00
Simon Giesecke
2bada650b6 Bug 1648449 - Stop passing around indexes to mLoadInfos. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81069
2020-06-30 08:34:09 +00:00
Simon Giesecke
7c7f51528f Bug 1648449 - Improve variable naming and comments related to script scheduling. r=asuth,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D81499
2020-06-30 08:33:51 +00:00
Simon Giesecke
622eb0d974 Bug 1648449 - Use nsTArrayView for ScriptLoaderRunnable::mLoadInfos. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81068
2020-06-29 11:58:28 +00:00
Simon Giesecke
ea7a3f8c57 Bug 1648440 - Use std::find_if and IIFE instead of custom loops in ScriptLoader. r=dom-workers-and-storage-reviewers,asuth
Differential Revision: https://phabricator.services.mozilla.com/D81057
2020-06-26 16:17:29 +00:00
Eden Chuang
8cd5966dac Bug 1642149 - P2 ImportScript() in workers must respect the coressponding COEP header r=dom-workers-and-storage-reviewers,perry
When loading a sub-script in workers, the corresponding COEP must be set on the channel's nsILoadInfo, such that its CORP header can be checked as expected.

Differential Revision: https://phabricator.services.mozilla.com/D77720
2020-06-19 13:23:35 +00:00
Coroiu Cristina
541f448731 Backed out 2 changesets (bug 1642149) for perma wpt failures at /fetch/cross-origin-resource-policy/iframe-loads.html
Backed out changeset bc5cfb22c1d7 (bug 1642149)
Backed out changeset c7a1a36d6d91 (bug 1642149)
2020-06-19 07:41:47 +03:00
Eden Chuang
8c86a3e215 Bug 1642149 - P2 ImportScript() in workers must respect the coressponding COEP header r=dom-workers-and-storage-reviewers,perry
When loading a sub-script in workers, the corresponding COEP must be set on the channel's nsILoadInfo, such that its CORP header can be checked as expected.

Differential Revision: https://phabricator.services.mozilla.com/D77720
2020-06-18 10:02:51 +00:00
Andrea Marchesini
22d905d24e Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-03 06:09:52 +00:00
Csoregi Natalia
2d5cafc841 Backed out 5 changesets (bug 1639833) for failures on browser_blockingIndexedDbInWorkers.js. CLOSED TREE
Backed out changeset 6b4f76d65540 (bug 1639833)
Backed out changeset c77acba1aacb (bug 1639833)
Backed out changeset 30c97666919e (bug 1639833)
Backed out changeset d769b313441a (bug 1639833)
Backed out changeset ed41b41d1b03 (bug 1639833)
2020-06-02 15:02:31 +03:00
Andrea Marchesini
e31c7313ca Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-02 08:28:05 +00:00
Noemi Erli
f08b043cf6 Backed out 5 changesets (bug 1639833) for causing sessionstorage related failures CLOSED TREE
Backed out changeset b36af8d9db34 (bug 1639833)
Backed out changeset 712c11904dbe (bug 1639833)
Backed out changeset 14f1e4783582 (bug 1639833)
Backed out changeset b7f14c4cfe5d (bug 1639833)
Backed out changeset b4b25034dd83 (bug 1639833)
2020-06-01 19:31:50 +03:00
Andrea Marchesini
8c0df411d1 Bug 1639833 - IntrisincStoragePrincipal should always be partitioned - part 2 - Expose PartitionedPrincipal, r=dimi
Differential Revision: https://phabricator.services.mozilla.com/D76915
2020-06-01 11:57:46 +00:00
Eden Chuang
501eb4718d Bug 1603168 - Reject Cache.match and Cache.matchAll if the response doesn't match the caller context coep r=dom-workers-and-storage-reviewers,perry
Differential Revision: https://phabricator.services.mozilla.com/D70020
2020-05-23 01:44:58 +00:00
Eden Chuang
c42e8d4e87 Bug 1532287 - P1 Saving the loading document/worker's COEP in InternalRequest. r=dom-workers-and-storage-reviewers,perry
Currently, the worker's COEP value is saved in WorkerPrivate and it is not respected for fetch/cache API in workers.
This patch saving the COEP value which fetch/cache API should be respected when using in workers.
Notice that for the dedicated workers, it is not only respected to worker's COEP but also its owner's.

For fetch in workers, P2 will propagate the COEP value through nsILoadInfo to HttpChannels, such that COEP can be respected in parent process when calling ProcessCrossOriginResourcePolicyHeader() and ProcessCrossOriginEmbedderPolicyHeader().

For cache in workers. We handle it in bug 1603168. COEP will be propagated through CacheRequest to the parent process and respected in CacheOpParent::OnOpComplete().

Differential Revision: https://phabricator.services.mozilla.com/D73689
2020-05-19 12:50:36 +00:00
Philip Chimento
672dc17ff4 Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D73522
2020-05-14 04:44:33 +00:00
Philip Chimento
f93330de3e Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-14 04:44:15 +00:00
Narcis Beleuzu
a12e8bbd08 Backed out 5 changesets (bug 1505129, bug 1506323, bug 1629293) for bustages on testPrintError.cpp . CLOSED TREE
Backed out changeset ad1ccad76686 (bug 1629293)
Backed out changeset 452e9ab721bd (bug 1629293)
Backed out changeset 72a63e290177 (bug 1629293)
Backed out changeset faeed99f813e (bug 1505129)
Backed out changeset 7bd84a644d2b (bug 1506323)
2020-05-13 21:23:59 +03:00
Philip Chimento
d6b8de58f7 Bug 1629293 - Make JS::ErrorReportBuilder::init exclusively support JS::ExceptionStack. r=evilpie,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D73522
2020-05-13 16:10:47 +00:00
Philip Chimento
5606c63575 Bug 1629293 - Expose js::ErrorReport in public API. r=evilpie
Renames it to JS::ErrorReportBuilder, since it is used to 'build' a
JSErrorReport object.

Differential Revision: https://phabricator.services.mozilla.com/D73521
2020-05-13 16:10:39 +00:00
ssengupta
cf852bbfb9 Bug 1635399 - Function PrincipalInfoToPrincipal now returns Result<nsCOMPtr<nsIPrincipal>, nsresult> r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73868
2020-05-12 19:02:05 +00:00
Perry Jiang
3446310d6c Bug 1618546 - give worker debugger globals their own clients r=asuth,webidl,smaug
- Worker debugger globals gets a client with a null principal
- Ensure globals are created before script loads
- Introduce WorkerGlobalScopeBase to share code
- Transfer ClientSource ownership from WorkerPrivate to worker globals
- Require getting clients from the globals instead of WorkerPrivate with the
  exception of getting the reserved client before the non-debugger global is
  created

Differential Revision: https://phabricator.services.mozilla.com/D68936
2020-04-21 06:50:53 +00:00
Eden Chuang
1ddbdbc6f0 Bug 1575090 - add NS_GetCrossOriginEmbedderPolicyFromHeader r=JuniorHsu,necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D46178
2020-04-20 17:21:23 +00:00
Eden Chuang
a5a3b2d7b7 Bug 1575090 - set COEP for all workers and enforce it when loading Dedicated Workers r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D46177
2020-04-20 17:21:15 +00:00
Jeff Walden
a655b1ae65 Bug 1626105 - Convert |JS::Evaluate| to |JS::EvaluateDontInflate| semantics, and remove |JS::EvaluateDontInflate|. r=evilpie
Differential Revision: https://phabricator.services.mozilla.com/D68911

--HG--
extra : moz-landing-system : lando
2020-03-31 01:32:46 +00:00
Kristen Wright
5094f72a18 Bug 1622111 - Convert security.data_uri.unique_opaque_origin to static pref and remove ClientPrefs. r=njn
Converts security.data_uri.unique_opaque_origin to a static pref. This pref was initialized by the ClientManager in ClientPrefs, so this commit also removes those files. Somehow this pref was getting added in VarCache twice, so it also removes the places where the pref was added in Networking.

Differential Revision: https://phabricator.services.mozilla.com/D67185

--HG--
extra : moz-landing-system : lando
2020-03-23 16:08:52 +00:00
Stefan Hindli
5f419e4b50 Backed out 9 changesets (bug 1622111) for causing mochitest failures in dom/animation/test/mozilla/test_restyles.html CLOSED TREE
Backed out changeset c244160797f8 (bug 1622111)
Backed out changeset dd9209f6bd8b (bug 1622111)
Backed out changeset d694c9e7061f (bug 1622111)
Backed out changeset 486aae809f6d (bug 1622111)
Backed out changeset 709266168c41 (bug 1622111)
Backed out changeset ca0d47bb86a8 (bug 1622111)
Backed out changeset caa735c8bb91 (bug 1622111)
Backed out changeset 12397711ab25 (bug 1622111)
Backed out changeset b66002fd1480 (bug 1622111)
2020-03-19 02:47:51 +02:00
Kristen Wright
54ef9a89c8 Bug 1622111 - Convert security.data_uri.unique_opaque_origin to static pref and remove ClientPrefs. r=njn
Converts security.data_uri.unique_opaque_origin to a static pref. This pref was initialized by the ClientManager in ClientPrefs, so this commit also removes those files. Somehow this pref was getting added in VarCache twice, so it also removes the places where the pref was added in Networking.

Differential Revision: https://phabricator.services.mozilla.com/D67185

--HG--
extra : moz-landing-system : lando
2020-03-18 22:12:20 +00:00
Tim Huang
04d44bae12 Bug 1616570 - Part 1: Rename CookieSettings to CookieJarSettings. r=Ehsan
Given that we are going to add ContentBlockingAllowList in
CookieSettings, so CookieSettings will be responsible for more stuff than the
cookie behavior and cookie permission. We should use a proper name to
reflect the purpose of it. The name 'CookieSettings' is misleading that
this is only for cookie related stuff. So, we decide to rename
'CookieSettins' to 'CookieJarSettings' which serves better meaning here.

Differential Revision: https://phabricator.services.mozilla.com/D63935

--HG--
rename : netwerk/cookie/CookieSettings.cpp => netwerk/cookie/CookieJarSettings.cpp
rename : netwerk/cookie/nsICookieSettings.idl => netwerk/cookie/nsICookieJarSettings.idl
extra : moz-landing-system : lando
2020-03-04 08:59:08 +00:00
Matt Woodrow
73d8cfc1f5 Bug 1617434 - Move reserved client creation to parent-side with DocumentChannel. r=perry
Rather than creating a ClientSource in the content process for the initial URL, this changes us to just create the ClientInfo in the parent, as we do for redirects.

Differential Revision: https://phabricator.services.mozilla.com/D63807

--HG--
extra : moz-landing-system : lando
2020-03-01 04:14:00 +00:00
Dorel Luca
109ac83385 Backed out 7 changesets (bug 1617500, bug 1617789, bug 1617434) for build bustage in dom/clients/manager/ClientChannelHelper.cpp
Backed out changeset 1a62904bfcb7 (bug 1617500)
Backed out changeset 592a5ddf6acf (bug 1617789)
Backed out changeset 995edb2e7f98 (bug 1617789)
Backed out changeset f3518664d654 (bug 1617789)
Backed out changeset 98ea95f7fe87 (bug 1617789)
Backed out changeset c5f1f70efb88 (bug 1617434)
Backed out changeset 1563faa24d15 (bug 1617434)
2020-03-01 05:57:57 +02:00
Matt Woodrow
78a45f7c57 Bug 1617434 - Move reserved client creation to parent-side with DocumentChannel. r=perry
Rather than creating a ClientSource in the content process for the initial URL, this changes us to just create the ClientInfo in the parent, as we do for redirects.

Differential Revision: https://phabricator.services.mozilla.com/D63807

--HG--
extra : moz-landing-system : lando
2020-03-01 01:23:18 +00:00
Boris Zbarsky
6c66fa85a4 Bug 1615022 part 2. Require an rvalue reference to reject a Promise with an ErrorResult. r=farre,kvark
The rejection process consumes the ErrorResult, so an rvalue reference is the honest thing here.

Differential Revision: https://phabricator.services.mozilla.com/D62632

--HG--
extra : moz-landing-system : lando
2020-02-14 15:42:30 +00:00
Simon Giesecke
b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +00:00
shindli
91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke
f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Simon Giesecke
0cc72577b5 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/workers. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D62562

--HG--
extra : moz-landing-system : lando
2020-02-12 10:38:22 +00:00
Boris Zbarsky
b88d5ac5a8 Bug 1612213 part 1. Switch most consumers of ThrowDOMException to the new methods. r=smaug,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D61267

--HG--
extra : moz-landing-system : lando
2020-02-03 20:19:11 +00:00
Cosmin Sabou
b8017d296c Backed out changeset 92d629854868 (bug 1603484) for wpt failures on service-worker/import-scripts-updated-flag.https.html.
CLOSED TREE
2020-01-30 15:02:06 +02:00
Yaron Tausky
ecc24c8aea Bug 1603484 - Allow new script imports in subsequent service worker runs r=dom-workers-and-storage-reviewers,asuth
We used to forbid service worker from importing new scripts after
installation, restricting them to scripts they already imported.
This restriction never actually worked before the inception of
parent intercept mode, and now it turns out that the Walmart
Grocery site depends on this ability to function properly. This
commit removes the restriction altogether in order to avoid
breaking sites that already depend on it.

Differential Revision: https://phabricator.services.mozilla.com/D60698

--HG--
extra : moz-landing-system : lando
2020-01-30 10:41:20 +00:00
Emilio Cobos Álvarez
b2fe832c7b Bug 1603313 - Remove some silly patterns. r=bzbarsky
foo ? true : false

or:

  foo ? false : true

Have always a nicer way to be written.

Differential Revision: https://phabricator.services.mozilla.com/D56842

--HG--
extra : moz-landing-system : lando
2019-12-14 05:05:01 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca
a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00