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

317 Коммитов

Автор SHA1 Сообщение Дата
Sebastian Streich ac5daf49e7 Bug 1594766: Respect Nosniff header for empty content-types r=ckerschb
Backed out changeset 35436d4e7917

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

--HG--
extra : moz-landing-system : lando
2020-02-12 16:20:46 +00:00
Andrew Osmond 52c022a178 Bug 1612589 - Improve image memory reporting even further. r=tnikkel
This patch adds reporting the surface types used by the image frame in a
bit mask (such if it is a CAPTURE including a DATA_SHARED, the mask will
be 1 << CAPTURE | 1 << DATA_SHARED), as well as an estimated size
included in the report as decoded-unknown for when we do not know if the
surface is on the heap or the non-heap specifically. This is the default
implementation for a SourceSurface as well, so we should no longer have
the case where surfaces appear empty despite being in the cache. It also
makes requests being validated as always notable for reporting purposes.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 22:22:13 +00:00
Gijs Kruitbosch c229dbc8a1 Bug 1526731 - handle image.http.accept pref inside netwerk instead of forcing all consumers to do the same dance, r=valentin,aosmond
Differential Revision: https://phabricator.services.mozilla.com/D60568

--HG--
extra : moz-landing-system : lando
2020-01-23 08:36:48 +00:00
pbz c5cd6f9c64 Bug 1357107 - Move the handling of the permissions.default.image pref to ImageBlocker.cpp. Original patch by ehsan. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D59695

--HG--
extra : moz-landing-system : lando
2020-01-22 10:45:15 +00:00
Andrew Osmond bf8cd36674 Bug 1610381 - Part 3. Improve image memory reporting by including validation state. r=jrmuizel
This patch adds an annotation to an image cache entry if it is in the
process of being validated. This is very useful to know when debugging
missing images because state notifications are suppressed when we are
validating and may prevent the image from being displayed.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 16:32:11 +00:00
Andrew Osmond 3fb86e5d59 Bug 1610381 - Part 2. Improve image memory reporting with more state information. r=jrmuizel
This patch adds error and progress tracker states to the memory dump. It
also now will include requests that have yet to create an image, and
fills in what information it is able to without it (such as URI, error
and progress tracker states).

Additionally the notability of an image has changed. If there are any
errors, missing progress trackers, or incomplete surfaces, they will
also now be notable. This is a departure from just the memory footprint.

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

--HG--
extra : moz-landing-system : lando
2020-01-21 14:39:59 +00:00
Andrew Osmond da3cf4fd77 Bug 1610381 - Improve image memory reporting for missing/incomplete surfaces. r=tnikkel
This dumps more information about the surface cache. Each surface has a
flag indicating whether or not it has finished decoding; incomplete
surfaces are now marked as such in the cache reports. We now also have
counters for various insertion errors, as well as the composition of the
cache (total vs locked images, total vs locked surfaces).

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:59:15 +00:00
Emilio Cobos Álvarez 256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ 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/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
Sebastian Streich 0ccaa6de78 Bug 1591932 - Enable Sniffing on No Mime+ XCTO nosniff r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D50816

--HG--
extra : moz-landing-system : lando
2019-11-13 12:12:34 +00:00
Timothy Nikkel c860a49663 Bug 1580820. Update the inner window id as well as the context (document) pointer on an imgRequest if we validate it for that document/inner window id. r=aosmond
If we just update the document pointer and not the inner window id then the request is unusable by any document since both the inner window id and the document pointer must match for it to be re-usable.

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

--HG--
extra : moz-landing-system : lando
2019-09-17 13:16:19 +00:00
championshuttler 7141b73975 Bug 1552317 - Fix codespell errors for image/. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D45553

--HG--
extra : moz-landing-system : lando
2019-09-12 09:00:52 +00:00
Eric Rahm f6aea79235 Bug 1577867 - Remove using namespace std from image/ r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D44250

--HG--
extra : moz-landing-system : lando
2019-08-30 19:58:25 +00:00
Thomas Nguyen 32ab8293ff Bug 1528697 - Expose ReferrerPolicy.webidl and use referrerpolicy enum r=smaug
ReferrerPolicy gets tossed back and forth as a uint32_t and
ReferrerPolicy enum in header file. Expose ReferrerPolicyValues from
webidl file and use consistently in native code.

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

--HG--
extra : moz-landing-system : lando
2019-08-21 13:24:45 +00:00
Sebastian Streich 6658520ea2 Bug 1571742 - Move Nosniff-Check into Sniffers r=ckerschb,dragana
Differential Revision: https://phabricator.services.mozilla.com/D41504

--HG--
extra : moz-landing-system : lando
2019-08-14 13:59:06 +00:00
Tom Schuster 4e01ab1787 Bug 1558915 - Use infallible nsIURI::SchemeIs in image/ r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D40459

--HG--
extra : moz-landing-system : lando
2019-08-03 09:44:12 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Thomas Nguyen db9e147a01 Bug 1566411 Use ReferrerInfo class in imgLoader.idl r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D38177

--HG--
extra : moz-landing-system : lando
2019-07-25 08:23:32 +00:00
Nicholas Nethercote 7974362afd Bug 1567329 - Append `_AtStartup` to `once` static pref getters. r=erahm
Currently it's completely unclear at use sites that the getters for `once`
static prefs return the pref value from startup, rather than the current pref
value. (Bugs have been caused by this.) This commit improves things by changing
the getter name to make it clear that the pref value obtained is from startup.

This required changing things within libpref so it distinguishes between the
"base id" (`foo_bar`) and the "full id" (`foo_bar` or
`foo_bar_DoNotUseDirectly` or `foo_bar_AtStartup` or
`foo_bar_AtStartup_DoNotUseDirectly`; the name used depends on the `mirror` and
`do_not_use_directly` values in the YAML definition.) The "full id" is used in
most places, while the "base id" is used for the `GetPrefName_*` and
`GetPrefDefault_*` functions.

(This is a nice demonstration of the benefits of the YAML file, BTW. Making
this change with the old code would have involved adding an entry to every
single pref in StaticPrefList.h.)

The patch also rejigs the comment at the top of StaticPrefList.yaml, to clarify
some things.

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

--HG--
extra : moz-landing-system : lando
2019-07-22 02:10:14 +00:00
Nicholas Nethercote 8b27a136fc Bug 1561491 - Make image.* static prefs follow the naming convention. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D35977

--HG--
extra : rebase_source : 7bf85fbb4f8564969cf9c945dd0ea46002f166a6
2019-06-26 13:24:21 +10:00
Jean-Yves Avenard 23436e1811 Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259

--HG--
extra : moz-landing-system : lando
2019-05-26 14:30:14 +00:00
Jean-Yves Avenard 04a34db033 Bug 1550422 - P12. Convert Live gfxPrefs into StaticPrefs. r=jrmuizel
gfxPrefs Live preferences are almost identical to StaticPrefs.

We leave aside for now those that set a custom change callback as this feature isn't yet supported in StaticPrefs.

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

--HG--
extra : moz-landing-system : lando
2019-05-26 14:29:42 +00:00
Gurzau Raul 967bc2a754 Backed out 31 changesets (bug 1552643, bug 1550422) for xpcshell crash on a CLOSED TREE.
Backed out changeset e30c1aa75529 (bug 1552643)
Backed out changeset caadcd7e02d3 (bug 1552643)
Backed out changeset aa7086ab09be (bug 1552643)
Backed out changeset 0b4029671710 (bug 1550422)
Backed out changeset a16295296035 (bug 1550422)
Backed out changeset 3b70307c0db5 (bug 1550422)
Backed out changeset 69df7818d4a3 (bug 1550422)
Backed out changeset d98dfc565927 (bug 1550422)
Backed out changeset 6f0997976944 (bug 1550422)
Backed out changeset 0edd264464c2 (bug 1550422)
Backed out changeset 9ea6da7a74ec (bug 1550422)
Backed out changeset f855f9309c8b (bug 1550422)
Backed out changeset 1033546224a7 (bug 1550422)
Backed out changeset ade7384c6186 (bug 1550422)
Backed out changeset 75b04de7e99c (bug 1550422)
Backed out changeset 91c3acdb2454 (bug 1550422)
Backed out changeset 77d2f80257d1 (bug 1550422)
Backed out changeset e0cd10d35327 (bug 1550422)
Backed out changeset 097091082423 (bug 1550422)
Backed out changeset 2f328853c1ab (bug 1550422)
Backed out changeset f92f2cc29cb1 (bug 1550422)
Backed out changeset 6dc82f88333d (bug 1550422)
Backed out changeset c20f66494d69 (bug 1550422)
Backed out changeset 2ba22cddeb6f (bug 1550422)
Backed out changeset 3aa72f89e295 (bug 1550422)
Backed out changeset ab4c4e806977 (bug 1550422)
Backed out changeset 72e5de040dda (bug 1550422)
Backed out changeset 7d3c2d486706 (bug 1550422)
Backed out changeset 132e0b8d8468 (bug 1550422)
Backed out changeset 54c85ac75dd0 (bug 1550422)
Backed out changeset d7ba4a18dd54 (bug 1550422)
2019-05-25 09:07:49 +03:00
Jean-Yves Avenard 8d5f292ab5 Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259

--HG--
extra : moz-landing-system : lando
2019-05-24 11:32:54 +00:00
Jean-Yves Avenard af5790cf9b Bug 1550422 - P12. Convert Live gfxPrefs into StaticPrefs. r=jrmuizel
gfxPrefs Live preferences are almost identical to StaticPrefs.

We leave aside for now those that set a custom change callback as this feature isn't yet supported in StaticPrefs.

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

--HG--
extra : moz-landing-system : lando
2019-05-25 00:03:32 +00:00
Gurzau Raul 74c555539e Backed out 28 changesets (bug 1550422) for marionette AssertionError and failing browser_policy_hardware_acceleration.js on a CLOSED TREE.
Backed out changeset 5dd10a365ba9 (bug 1550422)
Backed out changeset 529f5be01ab9 (bug 1550422)
Backed out changeset b6861d3badf8 (bug 1550422)
Backed out changeset 059cff1a3dde (bug 1550422)
Backed out changeset 6ada1116b241 (bug 1550422)
Backed out changeset ca67e8e45262 (bug 1550422)
Backed out changeset a1961a51ae44 (bug 1550422)
Backed out changeset 1c90b9cb3ad4 (bug 1550422)
Backed out changeset 285fa46e4f26 (bug 1550422)
Backed out changeset e2938a444234 (bug 1550422)
Backed out changeset 7a930fc51125 (bug 1550422)
Backed out changeset 898ed02804fe (bug 1550422)
Backed out changeset e1b7abc99ae9 (bug 1550422)
Backed out changeset f781d415cef6 (bug 1550422)
Backed out changeset 2fef10a7cce5 (bug 1550422)
Backed out changeset ea64b4d8d4ff (bug 1550422)
Backed out changeset 86a8ba1b755c (bug 1550422)
Backed out changeset 9c0c9e80f309 (bug 1550422)
Backed out changeset 10c153ddbaea (bug 1550422)
Backed out changeset 60fe635ec2c9 (bug 1550422)
Backed out changeset a38796266b28 (bug 1550422)
Backed out changeset 2db647dcdf1c (bug 1550422)
Backed out changeset 952ddac02972 (bug 1550422)
Backed out changeset ba46b53643ec (bug 1550422)
Backed out changeset ca47ef6c59f7 (bug 1550422)
Backed out changeset f45f471a1a40 (bug 1550422)
Backed out changeset 371b4da5b771 (bug 1550422)
Backed out changeset 02fc78890032 (bug 1550422)
2019-05-23 05:59:44 +03:00
Jean-Yves Avenard 2412878bd9 Bug 1550422 - P15. Move Skip and Once gfxPrefs to StaticPrefs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D31259

--HG--
extra : moz-landing-system : lando
2019-05-22 22:27:37 +00:00
Jean-Yves Avenard 2c0ce1b3ca Bug 1550422 - P12. Convert Live gfxPrefs into StaticPrefs. r=jrmuizel
gfxPrefs Live preferences are almost identical to StaticPrefs.

We leave aside for now those that set a custom change callback as this feature isn't yet supported in StaticPrefs.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 12:43:42 +00:00
Andrew Osmond e187c18d29 Bug 1548835 - Load moz-extension:// URIs from the cache over reloading. r=tnikkel
Similar to bug 1373258 and moz-page-thumb:// URIs, we are getting bitten
by the lack of caching support for non-HTTP channels. This may be
removed once bug 1406134 is implemented.

Differential Revision: https://phabricator.services.mozilla.com/D31515
2019-05-17 07:21:56 -04:00
Thomas Nguyen b0bfbd85aa Bug 1532318 - Part 2 : update changes of nsIHttpChannel in codebase r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D22786

--HG--
extra : moz-landing-system : lando
2019-05-02 12:33:55 +00:00
Andrea Marchesini 4426f8f63b Bug 1548253 - Port pref cache variables of nsContentUtils to StaticPrefs - network.http.tailing.enabled, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D29520

--HG--
extra : moz-landing-system : lando
2019-05-01 21:10:31 +00:00
Emilio Cobos Álvarez 2b46634961 Bug 1546329 - Remove dead skins code. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com//D28459
2019-04-25 14:00:06 +02:00
dlee 9878ae650d Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

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

--HG--
extra : moz-landing-system : lando
2019-03-25 12:47:57 +00:00
Gurzau Raul 2666e16a53 Backed out 7 changesets (bug 1522412) for xpcshell failures at test_shouldclassify.js on a CLOSED TREE.
Backed out changeset 7c998456e1fd (bug 1522412)
Backed out changeset ebb581ddf1d1 (bug 1522412)
Backed out changeset 850e1c68d978 (bug 1522412)
Backed out changeset fe288a48cecb (bug 1522412)
Backed out changeset 5399bca472b1 (bug 1522412)
Backed out changeset 91e5b339fe11 (bug 1522412)
Backed out changeset b80098d0a5c4 (bug 1522412)
2019-03-21 11:02:09 +02:00
Dimi Lee 8f1caf4049 Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan
nsIChannel.LOAD_CLASSIFY_URI is no longer required so we can remove it from
the codebase.
In the mean time, we add a new LOAD_BYPASS_URL_CLASSIFIER load flag for
channel creator to be able to force channel to bypass URL classifier check.
The use of the new LOAD_BYPASS_URL_CLASSIFIER flag will be addressed in
the other patches.

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

--HG--
extra : moz-landing-system : lando
2019-03-21 07:30:51 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Andrea Marchesini 8e20bbbc9a Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-08 09:04:11 +00:00
Ciure Andrei 712dd2bb8c Backed out 16 changesets (bug 1525245) for perma failing test_document_cookie.html CLOSED TREE
Backed out changeset 3fd27215698f (bug 1525245)
Backed out changeset d9a9e8e77873 (bug 1525245)
Backed out changeset 0e6f7be92e3f (bug 1525245)
Backed out changeset 6790802e2fa5 (bug 1525245)
Backed out changeset a5a9e01116ed (bug 1525245)
Backed out changeset 66e19a0c38dd (bug 1525245)
Backed out changeset fb90d51ba853 (bug 1525245)
Backed out changeset 4772db3625b3 (bug 1525245)
Backed out changeset 9affaf0cb998 (bug 1525245)
Backed out changeset a91b7ebe8bdd (bug 1525245)
Backed out changeset c2a13a7480e1 (bug 1525245)
Backed out changeset abe4482fa137 (bug 1525245)
Backed out changeset b3920c0bcf84 (bug 1525245)
Backed out changeset 0821b81f2724 (bug 1525245)
Backed out changeset 70bed2ad7899 (bug 1525245)
Backed out changeset 5f72ba232cc8 (bug 1525245)
2019-03-07 17:54:18 +02:00
Andrea Marchesini 6856f88972 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-07 10:21:15 +00:00
Dorel Luca ac34e1d973 Backed out 16 changesets (bug 1525245) for Android failures. CLOSED TREE
Backed out changeset 9f8a1b410320 (bug 1525245)
Backed out changeset 0ef284a9a1d5 (bug 1525245)
Backed out changeset 835e5f642a03 (bug 1525245)
Backed out changeset 362f5a8d033c (bug 1525245)
Backed out changeset 9da3ab33cf67 (bug 1525245)
Backed out changeset 6aacd2d6e835 (bug 1525245)
Backed out changeset 8ff9e8f45e02 (bug 1525245)
Backed out changeset 2020227181cc (bug 1525245)
Backed out changeset fc3c64c330b9 (bug 1525245)
Backed out changeset 2762bf88e050 (bug 1525245)
Backed out changeset ffc10fdc50a6 (bug 1525245)
Backed out changeset bb6ade1207d7 (bug 1525245)
Backed out changeset 1875eb5085e4 (bug 1525245)
Backed out changeset 7e4f67a6d6f1 (bug 1525245)
Backed out changeset e671fc9581eb (bug 1525245)
Backed out changeset b89f5def8d0d (bug 1525245)
2019-03-06 21:07:49 +02:00
Andrea Marchesini 4fabb4a2a8 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-06 17:04:06 +00:00
Ryan Hunt 1b0980842e Bug 1523969 part 10 - Move method definition inline comments to new line in 'image/'. r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D21110

--HG--
extra : rebase_source : 9898cccd7791d12b8ece17fa489b530fffd89ff6
2019-02-25 16:07:58 -06:00
Jonathan Kingston f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston 2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Ehsan Akhgari 1737eb4583 Bug 1529780 - Compute ImageCacheKey's hash number lazily; r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D20746

--HG--
extra : moz-landing-system : lando
2019-02-22 14:25:04 +00:00
Christoph Kerschbaumer 54df1cb98c Bug 1528677: Remove nullchecks for loadinfo since we have loadinfo on all channels. r=baku 2019-02-20 13:27:25 +01:00
Sylvestre Ledru 41d1d79094 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-02-15 08:15:57 +00:00
Jonathan Kingston 3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Margareta Eliza Balazs 3b70fd88bb Backed out changeset 9fedba33cfa3 (bug 1514396) for causing regression Bug 1521239, requested by jkt. CLOSED TREE 2019-01-21 14:21:30 +02:00
Jonathan Kingston 46c31543ae Bug 1514396 - Only pass the mixedContentBlocker codebase principals for aRequestingLocation. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D16205

--HG--
extra : moz-landing-system : lando
2019-01-16 17:07:52 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Emilio Cobos Álvarez f131713362 Bug 1516366 - Move base classes from nsDocument to nsIDocument. r=smaug
This is a big step in order to merge both.

Also allows to remove some very silly casts, though it causes us to add some
ToSupports around to deal with ambiguity of casts from nsIDocument to
nsISupports, and add a dummy nsISupports implementation that will go away later
in the series.

Differential Revision: https://phabricator.services.mozilla.com/D15352
2018-12-29 20:41:28 +01:00
Jean-Yves Avenard 48517afae6 Bug 1512298 - Make IPDL MozPromise exclusive. r=gerald,froydnj
MozPromise most common use is to have an single or exclusive listener. By making the MozPromise generated by IPDL exclusive we can also use move semantics.

While at it, we also use move semantics for the ResponseRejectReason and via the callback's reject method so that the lambda used with the MozPromise::Then can be identical to the one used by the IPDL callback.
As it currently is, it provides no advantage over a copy as it's just an enum; however, this will facilitate future changes where it may not be.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 19:22:26 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Markus Stange 6604e25fb0 Bug 1504742 - Add a label for imgLoader::LoadImage that has the URL. r=aosmond
Depends on D10928

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

--HG--
extra : moz-landing-system : lando
2018-11-05 18:13:39 +00:00
Andrew Osmond 7d59969d56 Bug 1503850 - Remove expired WebP telemetry probes. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D10550
2018-11-01 16:59:02 -04:00
Andrea Marchesini bfc819fe65 Bug 1495738 - Image cache entry should compare the window ID together with the loadID because the loadID can be a reused pointer, r=aosmond 2018-10-02 17:05:21 +02:00
Andrew Osmond a31bd9b85e Bug 1492930 - Part 6. Integrate extra shared surface memory reporting with imagelib. r=tnikkel 2018-09-25 09:13:52 -04:00
Narcis Beleuzu 3a8485e6e6 Backed out 6 changesets (bug 1492930) for build bustages on ImageMemoryReporter.cpp. CLOSED TREE
Backed out changeset 9d1ff0d0af47 (bug 1492930)
Backed out changeset bdb1bf2d8062 (bug 1492930)
Backed out changeset 2959314ecf7c (bug 1492930)
Backed out changeset 587e01daa080 (bug 1492930)
Backed out changeset 1a6b422c5a90 (bug 1492930)
Backed out changeset a3b3f4cdc9fa (bug 1492930)
2018-09-25 13:33:17 +03:00
Andrew Osmond cb18b15c36 Bug 1492930 - Part 6. Integrate extra shared surface memory reporting with imagelib. r=tnikkel 2018-09-25 06:18:07 -04:00
Andrea Marchesini 44ce53c72e Bug 1476592 - Remove the cache from nsCSPContext - part 2 - sendViolationReports parameter, r=ckerschb, r=aosmond 2018-08-01 06:35:24 +02:00
Andrea Marchesini d3cf48d4ba Bug 1332422 - CSP should not use 'aExtra' to indicate redirects within ContentPolicy, r=ckerschb
Instead, let's pass a nsIURI object to indicate when we have to check a
redirect CSP loading.
2018-07-19 13:25:50 +02:00
Andrea Marchesini a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Andrew Osmond 22361588aa Bug 1472145 - Part 3. Initialize boolean WebP telemetry scalars to ensure accurate reporting. r=aosmond 2018-07-03 08:12:17 -04:00
Andrew Osmond c7ece5c2e5 Bug 1472145 - Part 1. Add support for identifying the WebP images MIME type. r=tnikkel 2018-06-29 20:30:05 -04:00
Andrea Marchesini 1e49c45c00 Bug 1268889 - Implement Clear-Site-Data header - part 4 - cleanup image cache, r=aosmond 2018-06-20 11:57:50 -04:00
Andrew Osmond 594cd79ec7 Bug 920630 - Part 4. Change rest of imagelib to use nsIURI directly instead of ImageURL. r=tnikkel 2018-06-05 20:42:57 -04:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Adrian Wielgosik fff55359ea Bug 1460940 - Remove nsIDOMDocument uses in image/. r=bz
MozReview-Commit-ID: HUiegmeFLo4

--HG--
extra : rebase_source : cd6453dc5d708fc5cdc75114d163ea2389423d55
2018-05-11 19:46:15 +02:00
Andrew Osmond bb48e74870 Bug 1445479 - Ensure we teardown requests on image cache validation failure paths. r=tnikkel
If an imgCacheValidator object is destroyed without calling
imgCacheValidator::OnStartRequest, or imgRequest::Init fails in
OnStartRequest, we left the bound proxies hanging on an update. Now we
cancel the new request, and bind the validating proxies to said request
to ensure their listeners fail gracefully.
2018-04-17 14:42:35 -04:00
Christoph Kerschbaumer a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Andrew Osmond cd7cf0fad3 Bug 1427639 - Part 2. Fix misleading image memory reporting on Android. r=tnikkel
The shared memory handle reporting has been generalized to be an
external handle reporting. This is used for both shared memory, and for
volatile memory (on Android.) This will allow us to have a better sense
of just how many handles are being used by images on Android.

Additionally we were not properly reporting forced heap allocated
memory, if we were putting animated frames on the heap. This is because
we used SourceSurfaceAlignedRawData without implementing
AddSizeOfExcludingThis.
2018-02-22 14:26:29 -05:00
Andrew Osmond dab9b6216c Bug 1383682 - Part 1. Split off imgRequestProxy notification deferrals for validation. r=tnikkel
When cache validation is in progress, imgRequestProxy defers its
notifications to its listener until the validation is complete. This is
because the cache may be discarded, and the current state will change.
It attempted to share the same flags with notification deferrals used by
ProgressTracker to indicate that there is a pending notification, but
this has problematic/confusing. Hence this patch creates dedicated flags
for notification deferrals due to cache validation.
2018-02-07 07:27:27 -05:00
Andrea Marchesini c6da271117 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug
* * *
Bug 1425458 - Resource timing entries Workers - part 10 - Correct parameters in NS_NewChannel in nsDataObj.cpp, r=me
2018-01-24 17:17:31 +01:00
Brindusan Cristian 368c3d5b6b Backed out 12 changesets (bug 1425458) for mochitest failures on WorkerPrivate.cpp on a CLOSED TREE
Backed out changeset 11997de13778 (bug 1425458)
Backed out changeset 100b9d4f36bc (bug 1425458)
Backed out changeset a29e9dbb8c42 (bug 1425458)
Backed out changeset b96d58fd945c (bug 1425458)
Backed out changeset f140da44ba68 (bug 1425458)
Backed out changeset af56400233d9 (bug 1425458)
Backed out changeset 7034af4332e4 (bug 1425458)
Backed out changeset f70500179140 (bug 1425458)
Backed out changeset 793bbfc23257 (bug 1425458)
Backed out changeset 2efb375a8ffc (bug 1425458)
Backed out changeset 07e781e37451 (bug 1425458)
Backed out changeset e875f3702a5f (bug 1425458)
2018-01-24 20:47:48 +02:00
Andrea Marchesini 6480b95ba3 Bug 1425458 - Resource timing entries Workers - part 0 - NS_NewChannel, r=smaug 2018-01-24 17:17:31 +01:00
Kate McKinley e97980a95e Bug 1424917 - Remove support for HSTS Priming. r=mayhemer, r=ckerschb
This patch removes support and tests for HSTS priming from the tree.
2018-01-10 11:07:00 -05:00
Masatoshi Kimura 8b05ff3704 Bug 1427023 - Remove nsCRT::strncmp. r=erahm 2018-01-09 23:49:37 +09:00
Andrew Osmond d84d324b49 Bug 1419889 - Don't force the image cache to validate if it hasn't started yet. r=tnikkel
imgLoader::ValidateEntry would aggressively determine an entry has
expired, even when the request hasn't yet begun. This is because the
expiration time for the entry was not set unless it was for a channel
which supports caching. Now we set the expiration time for all
channels, and if it doesn't support caching, it just expires at the
current time when imgRequest::OnStartRequest is called. Additionally,
imgLoader::ValidateEntry will not consider the expiration time in the
entry until it is non-zero.
2017-12-07 08:28:28 -05:00
Samael Wang 326d642792 Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz
The "current URL" in the spec:
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-currentsrc
maps to imgIRequest.URI, not currentURI.

Rename imgIRequest.currentURI to finalURI to prevent such confusion.

MozReview-Commit-ID: CjBh2V4z8K9

--HG--
extra : rebase_source : 01277d16ef12845e12cc846f9dd4a21ceeca283b
2017-11-13 16:31:24 +08:00
Noemi Erli e90c67896c Backed out 3 changesets (bug 1406253)for build bustage in dom/base/nsCopySupport.cpp r=backout on a CLOSED TREE
Backed out changeset 284f3cc2880c (bug 1406253)
Backed out changeset aecb3d509a39 (bug 1406253)
Backed out changeset 9ce01198e8a1 (bug 1406253)
2017-11-20 13:34:29 +02:00
Samael Wang a22b447e84 Bug 1406253 - Part 1: Rename imgIRequest.currentURI to finalURI to prevent confusion. r=bz
The "current URL" in the spec:
https://html.spec.whatwg.org/multipage/embedded-content.html#dom-img-currentsrc
maps to imgIRequest.URI, not currentURI.

Rename imgIRequest.currentURI to finalURI to prevent such confusion.

MozReview-Commit-ID: CjBh2V4z8K9

--HG--
extra : rebase_source : d3047aed22f116ff9a74099b646a84e597388673
2017-11-13 16:31:24 +08:00
Andrew Osmond 19e321eb9e Bug 1366097 - Part 8. Improve image memory reports to include SVG context information. r=tnikkel 2017-11-17 14:08:52 -05:00
Andrew Osmond a230c70963 Bug 1416774 - Ensure that imgRequestProxy::CancelAndForgetObserver removes itself from the cache validator. r=tnikkel
An imgRequestProxy may defer notifications when it needs to block on an
imgCacheValidator. It may also be cancelled before the validator has
completed its operation, but before this change, we did not remove the
request from the set of proxies, imgCacheValidator::mProxies. When the
deferral was completed, it would assert to ensure each proxy was still
expecting a deferral before issuing the notifications. Cancelling a
request can actually reset that state, which means we fail the assert.

Failing the assert is actually harmless; in release we suffer no
negative consequences as a result of this sequence of events. Now we
just remove the proxy from the validator set to avoid asserting.
2017-11-14 12:02:59 -05:00
Ursula Sarracini df4f8ff8c2 Bug 1373258 - Convert PageThumbsProtocol.js to PageThumbsProtocol.cpp r=adw
MozReview-Commit-ID: tdNee2EPdV

--HG--
extra : rebase_source : 436ef616173f22b6d8386b8e7b3f482f1acabca4
2017-06-05 10:04:06 -04:00
Andrew Osmond b62d4a8ea4 Bug 1404422 - Part 1a. Ensure imgLoader::LoadImage(WithChannel) adds the request to the expected load group. r=tnikkel
imgLoader::LoadImage now asserts in debug builds that the load group
given as a parameter matches that of the given document (if any). If
they mismatch, then we won't be blocking the document's load event as we
expect with the future removal of the imgIOnloadBlocker.

imgLoader::LoadImageWithChannel never actually added the request to the
load group at all, unless it was done as part of the validator. Now it
will consistently add the request to the channel's load group as
expected. Additionally it also asserts in debug builds that the
channel's load group matches that of the given document, as in
LoadImage.
2017-11-01 06:59:09 -04:00
Kris Maglione 5fdcb5a5d2 Bug 1407056: Part 1 - Provide more consistent principal/origin URL to content policies. r=bz,ckerschb
We're currently fairly vague and inconsistent about the values we provide to
content policy implementations for requestOrigin and requestPrincipal. In some
cases they're the triggering principal, sometimes the loading principal,
sometimes the channel principal.

Our existing content policy implementations which require or expect a loading
principal currently retrieve it from the context node. Since no current
callers require the principal to be the loading principal, and some already
expect it to be the triggering principal (which there's currently no other way
to retrieve), I chose to pass the triggering principal whenever possible, but
use the loading principal to determine the origin URL.

As a follow-up, I'd like to change the nsIContentPolicy interface to
explicitly receive loading and triggering principals, or possibly just
LoadInfo instances, rather than poorly-defined request
origin/principal/context args. But since that may cause trouble for
comm-central, I'd rather not do it as part of this bug.

MozReview-Commit-ID: LqD9GxdzMte

--HG--
extra : rebase_source : 41ce439912ae7b895e0a3b0e660fa6ba571eb50f
2017-10-12 15:43:55 -07:00
Kris Maglione 1e39590f6d Bug 1406278: Part 2a - Rename LoadingPrincipal to TriggeringPrincipal in imgLoader. r=bz
The imgLoader code consistently uses the term 'loadingPrincipal' for the
principal that is called the triggeringPrincipal everywhere else it's used.
This is confusing, and since we need to make changes to how those values are
determined, it should be fixed beforehand.

MozReview-Commit-ID: 8CTHwayzcaD

--HG--
extra : rebase_source : d4405b0ecfe1c8dfb9bfdf61fe6ed6cfb180ba83
2017-10-02 20:38:30 -07:00
Chris Peterson 45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Kershaw Chang 53cf0a2a8e Bug 1247843 - Part 3: Set request context ID to the http channel created in imgLoader::LoadImage. r=baku
In order to let necko postpone the load of favicon, we have to set request context ID to the http channel that is created to load favicon.
This patch starts with passing a request context ID to nsContentUtils::LoadImage and makes other necessary changes to set the request context ID to the channel.
2017-09-20 20:09:00 -04:00
Ben Kelly 87d59b1d69 Bug 1397304 Avoid searching the image cache queue for an entry after we just popped it off the queue. r=tnikkel 2017-09-06 13:12:05 -07:00
Ben Kelly 35a2dafbcf Bug 1396982 Make imageCacheQueue use nsTArray instead of std::vector. r=tnikkel 2017-09-05 16:20:18 -07:00
Ben Kelly 437049b633 Bug 1396870 P2 Avoid dirtying when removing front entry or when the queue is empty. r=tnikkel 2017-09-05 16:20:18 -07:00
Ben Kelly 43dc8a817a Bug 1396870 P1 Avoid dirting the image cache queue when inserting a new item into a clean queue. r=tnikkel 2017-09-05 16:20:17 -07:00
Andrew Osmond 277247123d Bug 1370412 - Part 9. Add factor of 2 state to the SurfaceCache memory reports. r=tnikkel 2017-09-05 07:58:46 -04:00
Andrew Osmond 904a5bf8ca Bug 1351869 - Part 2. Make imgCacheExpirationTracker use the system group for its expiration events. r=tnikkel 2017-08-14 20:23:16 -04:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Nicholas Nethercote 49eb219ff5 Bug 1383982 (attempt 2) - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
--HG--
extra : rebase_source : 7075f9570a4262158351ce9ac3ca8360ea4d5394
2017-07-28 20:10:04 +10:00
Sebastian Hengst 744a0a216b Backed out changeset ef5feef07bed (bug 1384835) 2017-07-28 10:29:24 +02:00
Sebastian Hengst 9077ac8886 Backed out changeset a57d8f30d1bf (bug 1383982) for build bustage at nsGlobalWindow.cpp:13826: 'class nsWindowSizes' has no member named 'mMallocSizeOf'. r=backout 2017-07-28 09:50:48 +02:00
Nicholas Nethercote 5c3abe8aab Bug 1383982 - Introduce a general mechanism for measuring memory usage of graph-like structures. r=erahm.
All the SizeOf{In,Ex}cludingThis() functions take a MallocSizeOf function
which measures memory blocks. This patch introduces a new type, SizeOfState,
which includes a MallocSizeOf function *and* a table of already-measured
pointers, called SeenPtrs. This gives us a general mechanism to measure
graph-like data structures, by recording which nodes have already been
measured. (This approach is used in a number of existing reporters, but not in
a uniform fashion.)

The patch also converts the window memory reporting to use SizeOfState in a lot
of places, all the way through to the measurement of Elements. This is a
precursor for bug 1383977 which will measure Stylo elements, which involve
Arcs.

The patch also converts the existing mAlreadyMeasuredOrphanTrees table in the
OrphanReporter to use the new mechanism.

--HG--
extra : rebase_source : 2c23285f8b6c3b667560a9d14014efc4633aed51
2017-07-28 15:03:44 +10:00
Nicholas Nethercote 200d8ec18b Bug 1384835 (part 3) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
This is similar like the previous patch, but for the 8-bit string variants.
Also, it changes assignment to Adopt() in GetCString() and GetDefaultCString()
to avoid an extra copy.

--HG--
extra : rebase_source : eba805c3a7b809d5ccd6e853b1c9010db9477667
2017-07-27 16:45:10 +10:00
Andrew Osmond 02a3031379 Bug 1359833 - Part 4. imgLoader should pass down the loading document to the imgRequest. r=tnikkel 2017-07-19 14:15:11 -04:00
Andrew Osmond f732dc9f43 Bug 1380341 - Fallback on the document's channel to check private browsing status if the load group has no load context. r=baku 2017-07-17 09:38:10 -04:00
Andrew McCreight bf7fff95f0 Bug 1379786, part 4 - Use GetIsSystemPrincipal() method instead of going through secman in CHECK_PRINCIPAL_AND_DATA. r=mrbkap
MozReview-Commit-ID: INBsjjxbXZz

--HG--
extra : rebase_source : fd6d491d01acc70be1bf51e25ec31bbcde81344a
2017-07-10 15:00:03 -07:00
Yoshi Huang 0da35daccc Bug 1267075 - Part 3: cancel imgRequestProxy if asyncOpen2 failed. r=tnikkel
The problem is if we found a cache hit, then we could go through
ValidateRequestWithNewChannel to validate the cache.
Then if the CSP check fail(asyncOpen2() will fail), then the
imgRequestProxy will remain there, and cause the timeout.

I run into problem when running mochitest
browser/base/content/test/general/browser_aboutHome.js in non-e10s mode.
In the beginning, browser.xul will load defaultFavicon.png, will create
an image cache there.
Next time when the test starts to run, when it loads about:home, then it
will try to load defaultFavicon.png, it will found an image cache hit
(loaded previously by browser.xul), and call
ValidateRequestWithNewChannel there, however the asyncOpen2 call failed,
and the imgRequestProxy is added to the loadGroup of about:home, and
never be notified until timeout.
2017-06-16 10:12:09 +08:00
Mats Palmgren bddaa611f0 Bug 1371961 - Use nsRefPtrHashtable::Remove instead of Get + nsBaseHashtable::Remove to avoid unnecessary hashtable lookups. r=froydnj
MozReview-Commit-ID: 2TGVmqDo8YI
2017-06-14 01:54:26 +02:00
Timothy Nikkel 41616c178d Bug 1342567. r=aosmond a=abillings 2017-05-30 14:49:26 -05:00
Timothy Nikkel 09788ebab5 Back out changesets from bug 1342567.
Backed out changeset 06d6f928ed64
* * *
Backed out changeset f577512b1a29
* * *
Backed out changeset 289645ac65c1
* * *
Backed out changeset 600f9d60d76f
* * *
Backed out changeset 445330fd1211
2017-05-17 16:17:23 -05:00
Timothy Nikkel eea47ac6ca Bug 1342567. r=aosmond a=abillings 2017-05-10 17:39:45 -05:00
Tom Tung 0e308b0c4f Bug 1348050 - Part 3: Mark channel as urgent-start for loading image. r=baku,mayhemer
This part is mainly to mark the channel as urgent-start if src related
attributes in HTMLImageElement and HTMLInputElement is set and the channel is
open due to user interaction. Unfortunately, we cannot just check the event
state just after creating channel since some loading image tasks will be queue
and execute in stable state. Thus, I store the event state in elements and
pass it to the place where create the channel.

MozReview-Commit-ID: GBdAkPfVzsn

--HG--
extra : rebase_source : 715352317b4b600f8a7f78b7bc22b894bb272d27
2017-04-25 09:17:38 +08:00
Timothy Nikkel c2119cfed3 Bug 1342567. r=aosmond a=abillings 2017-04-21 00:18:49 -05:00
Timothy Nikkel b97346ec7a Bug 1342567. r=aosmond a=abillings 2017-04-21 00:18:46 -05:00
Timothy Nikkel c12e8c8307 Bug 1342567. r=aosmond a=abillings 2017-04-19 00:36:06 -05:00
Ehsan Akhgari 29071e6146 Backout change fb3c323635d6 (bug 1347400) because the telemetry probe didn't prove to be useful 2017-04-15 17:20:25 -04:00
Timothy Nikkel ff22b71de5 Bug 1342567. r=aosmond a=dveditz 2017-04-11 03:14:11 -05:00
Timothy Nikkel c1bda06e96 Bug 1352408. Restore imgICache::RemoveEntry. r=ehsan
It was removed in bug 1202085 because there were no callers and changes made in that bug would have required it to be updated.
2017-04-11 03:14:09 -05:00
Eric Rahm 0e5acb78bf Bug 943686 - Add imageLoader.cpp to unified sources. r=tn
MozReview-Commit-ID: G9sFOtbFYjP
2017-03-21 11:09:13 -07:00
Sebastian Hengst 1e30641e50 Backed out changeset 8c34803d1392 (bug 943686) for Windows bustage. r=backout 2017-03-20 23:00:43 +01:00
Eric Rahm e9c6b8a437 Bug 943686 - Add imageLoader.cpp to unified sources. r=tn
MozReview-Commit-ID: G9sFOtbFYjP
2017-03-20 14:28:40 -07:00
Ehsan Akhgari f4a03626ab Bug 1347400 - Add telemetry for imgLoader::LoadImage(); r=mystor,francois 2017-03-17 21:19:21 -04:00
Andrea Marchesini e9195daa8d Bug 1345168 - Get rid of OriginAttributes::Inherit, r=tjr 2017-03-08 07:41:51 +01:00
Wei-Cheng Pan a6dc7e9508 Bug 1310127 - Part 14: Use MOZ_MUST_USE in netwerk/protocol/http r=tnikkel
MozReview-Commit-ID: Gvv80wYQ7JI

--HG--
extra : rebase_source : c5cc6b3df2f308e5f825568e731c7a15a5e2e6d7
2016-12-20 11:51:33 +08:00
Christoph Kerschbaumer b76ecf1eed Bug 1314356: Do not reuse insecure chached image when upgrade-insecure-requests is present. r=dveditz 2017-03-02 14:08:19 +01:00
Andrew Osmond 13df27efb8 Bug 1341624 - Include shared handle totals in memory reports for images. r=tnikkel 2017-02-22 09:30:22 -05:00
Tom Tromey 5f8f360823 Bug 1060419 - make log_print use Printf.h, r=froydnj
MozReview-Commit-ID: BIZ1GQEZ1vs

--HG--
extra : rebase_source : 2f1f0aa12493c44f352d9a7e8683e7bb72d2d75b
2016-12-15 20:16:31 -07:00
Sylvestre Ledru a54302b9d6 Bug 1338086 - Remove useless else blocks in order to reduce complexity image/ r=dholbert
MozReview-Commit-ID: 8qUQk8w0QSk

--HG--
extra : rebase_source : c7451383027a14144490d2a8d2639f73cead1a5c
2017-02-10 13:52:27 +01:00
Tim Huang 756cf900c9 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug
--HG--
extra : rebase_source : 22149fd540fd02119afe9fe5c9a815d01cf959c1
2017-02-07 11:49:34 +08:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Thomas Nguyen 0aaea58b69 Bug 1304623 - Create a pref to control the default referrer policy - part 3. r=bkelly
MozReview-Commit-ID: 1A6IHPeNYBQ
2017-01-05 11:29:56 +08:00
Yoshi Huang 2ceecc22f5 Bug 1324115 - Part 2: replace the callers to use C++ helper. r=smaug 2016-12-21 14:59:21 +08:00
Andi-Bogdan Postelnicu ec3eda24ad Bug 1318000 - Use C++11's override and remove virtual where applicable in image/. r=jrmuizel
MozReview-Commit-ID: B0ZIwPnhAIT

--HG--
extra : rebase_source : c1b9408efe2efb301784ef58489d4cb6e0e0d7b1
2016-11-16 17:41:47 +02:00
Andi-Bogdan Postelnicu 0cfd234e69 Bug 1318000 - Replace default bodies of special member functions with = default; in image/. r=jrmuizel
MozReview-Commit-ID: FYzbhclEgyD

--HG--
extra : rebase_source : f9d737670d8c6b963e6c3aff74d8e907b2af45f5
2016-11-16 17:39:43 +02:00
Andi-Bogdan Postelnicu e1f33061ed Bug 1318000 - Use auto type specifier where aplicable for variable declarations to improve code readability and maintainability in image/. r=jrmuizel
MozReview-Commit-ID: DpS7zsWD75j

--HG--
extra : rebase_source : a7f0d1fd49a2d8084d4da6631d466e01df0c8e5e
2016-11-16 17:39:05 +02:00
Ehsan Akhgari 75d4b96af8 Bug 1306800 - Remove support for app theming; r=myk,baku 2016-10-13 13:23:03 -04:00
Tim Huang aeffcdcbe2 Bug 1277803 - Part 3 : Make the image library uses the correct originAttributes and triggering principal when opening a image channel for favicon loading. r=tnikkel 2016-10-13 15:43:57 +08:00
Wes Kocher 2142de26c1 Backed out 8 changesets (bug 1277803) for browser-chrome test failures a=backout
Backed out changeset 477890efdb88 (bug 1277803)
Backed out changeset 49da326bfe68 (bug 1277803)
Backed out changeset 2d17a40a9077 (bug 1277803)
Backed out changeset b1cb0a195ca1 (bug 1277803)
Backed out changeset c7d82459d152 (bug 1277803)
Backed out changeset 3be9a06248af (bug 1277803)
Backed out changeset 8d119ca96999 (bug 1277803)
Backed out changeset be767a6f7ecd (bug 1277803)
2016-10-12 14:26:00 -07:00
Tim Huang 91878c9769 Bug 1277803 - Part 3 : Make the image library uses the correct originAttributes and triggering principal when opening a image channel for favicon loading. r=tnikkel 2016-10-12 17:32:06 +08:00
Andrew Osmond 31ad519348 Bug 1275464 - Part 1. Unregister from handling image memory reports when shutting down. r=njn 2016-09-19 13:29:59 -04:00
James Andreou a47ce92ac2 Bug 1282124 - Remove nsILoadInfo.usePrivateBrowsing and the SEC_FORCE_PRIVATE_BROWSING flag; r=smaug,jryans 2016-09-27 16:56:44 -04:00
Kate McKinley c57d400961 Bug 1246540 - HSTS Priming Proof of Concept. r=ckerschb, r=mayhemer, r=jld, r=smaug, r=dkeeler, r=jmaher, p=ally
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.

MozReview-Commit-ID: ES1JruCtDdX

--HG--
extra : rebase_source : 2ac6c93c49f2862fc0b9e595eb0598cd1ea4bedf
2016-09-27 11:27:00 -04:00
Nicholas Nethercote 3ac8aee67f Bug 1297300 - Add missing checks to GetSpec() calls in image/. r=tnikkel. 2016-08-29 15:34:32 +10:00