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

125 Коммитов

Автор SHA1 Сообщение Дата
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