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

13 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart b51e0fd0cc Bug 1489944 - Fixed some std::move warnings - r=froydnj
> dom/media/gmp/CDMStorageIdProvider.cpp(63,10):  warning:
> local variable 'storageId' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClip.cpp(581,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClipChain.cpp(88,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/nsDisplayList.cpp(179,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> gfx/thebes/gfxWindowsPlatform.cpp(454,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Will remove std::move().

> gfx/thebes/gfxFontEntry.cpp(245,20):  warning:
> local variable 'name' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> netwerk/cookie/nsCookieService.cpp(4460,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
GetPathFromURI() result is stored in an nsAutoCString, so it might as well return that type.

> toolkit/components/extensions/WebExtensionPolicy.cpp(462,12):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
> toolkit/components/extensions/WebExtensionPolicy.cpp(475,10):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
`result` may be empty or may be arbitrarily long, so I'll use nsCString inside the function.

> toolkit/xre/CmdLineAndEnvUtils.h(349,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Returning an UniquePtr, will remove std::move().
Also will `return s` instead of `return nullptr` when `(!s)`, to avoid extra construction which could also prevent elision (not entirely sure, but it's at least not worse!); and it's clearer that the two `return`s return the same already-constructed on-stack object.

> tools/profiler/core/shared-libraries-win32.cc(111,10):  warning:
> local variable 'version' will be copied despite being returned by name [-Wreturn-std-move]
nsPrintfCString -> nsCString, will add std::move().

> xpcom/glue/FileUtils.cpp(179,10):  warning:
> local variable 'fullName' will be copied despite being returned by name [-Wreturn-std-move]
> xpcom/glue/FileUtils.cpp(209,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
nsAuto{,C}String -> ns{,C}String, will add std::move().

This allowed removals of 'AllowCompilerWarnings' from layout/painting,
netwerk/cookie, and toolkit/components/extensions.

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

--HG--
extra : moz-landing-system : lando
2018-09-10 15:51:48 +00:00
Miko Mynttinen b7eaedb6ea Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow
Depends on D3870

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

--HG--
extra : moz-landing-system : lando
2018-09-04 20:46:21 +00:00
Csoregi Natalia 5984db0879 Backed out 2 changesets (bug 1484966) for bustage on RefPtr.h:42. CLOSED TREE
Backed out changeset 7b246c8f9de8 (bug 1484966)
Backed out changeset 399158a0a9b3 (bug 1484966)
2018-09-04 23:42:36 +03:00
Miko Mynttinen bb2d78e17e Bug 1484966 - Part 3: Clang format layout/painting/ r=mattwoodrow
Depends on D3870

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

--HG--
extra : moz-landing-system : lando
2018-09-04 17:21:36 +00:00
Cosmin Sabou 2cbfcdeacb Backed out changeset be4fd8ee7afd (bug 1483985) for causing build bustages on LookupCache. CLOSED TREE 2018-08-27 18:26:41 +03:00
Alex Gaynor cb45cd7b82 Bug 1483985 - use std::move to avoid a copy in a few places that clang recommends; r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D3543

--HG--
extra : moz-landing-system : lando
2018-08-27 15:06:58 +00:00
Daniel Holbert df4b3ddfcf Bug 1437623 part 3: (layout/painting) Add missing includes/namespaces to preemptively fix unified bustage. r=mattwoodrow
MozReview-Commit-ID: GvYoCro4HAU

--HG--
extra : rebase_source : ffdabc2c26543784218820bdb6d3a95fc1451152
2018-02-13 09:08:42 -08:00
Kartikaya Gupta 9881d74db7 Bug 1428765 - Fix scenario where display item clip chains hash to different values even though they are equal. r=mstange
MozReview-Commit-ID: KOBNjcuMUn

--HG--
extra : rebase_source : e9eff4dfe7b15bd46a9f02ae2555a96d76af4c37
2018-01-09 12:31:58 -05:00
Kartikaya Gupta 12596acf72 Bug 1422057 - Add hash function and boilerplate for deduplicating DisplayItemClipChain via std::set. r=mstange
MozReview-Commit-ID: I2eos3vwFF0

--HG--
extra : rebase_source : 79f99ef1d7fdc9a8f65703e880c66beea9b81de0
2018-01-06 09:52:58 -05:00
Kartikaya Gupta 25d94ecc40 Bug 1422057 - Adjust some logging-related things to be more useful. r=mstange
MozReview-Commit-ID: Idheevum5Fd

--HG--
extra : rebase_source : a441cc0b65c763763a4a417cc1d713cd771e467d
2018-01-06 09:52:57 -05:00
Daniel Holbert 680815cd6e Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: EuRsDue63tK

--HG--
extra : rebase_source : 3356d4b80ff6213935192e87cdbc9103fec6084c
2017-10-27 10:33:53 -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
Markus Stange b9c74f8bdc Bug 1298218 - Add DisplayItemClipChain. r=mattwoodrow,tnikkel
MozReview-Commit-ID: K9mg86VgK10

--HG--
extra : rebase_source : 3b234829ec7dbe0ad7dff8ca55f813b082b21b0c
2017-01-27 12:57:44 +01:00