Commit Graph

85 Commits

Author SHA1 Message Date
Mats Palmgren
b6ef1b3ae7 Bug 1467483 - Assert that PresArena is only used on the main thread. r=mattwoodrow 2018-06-07 22:39:11 +02:00
Xidorn Quan
1455d40f7d Bug 1448728 followup 2 - Remove style structs from nsPresArena::AddSizeOfExcludingThis on a CLOSED TREE. r=emilio
--HG--
extra : amend_source : 9dd6fded1258e4586d6e6fd8a03f669ebed4b0b5
2018-03-28 11:17:19 +11:00
Xidorn Quan
cae93b8fe4 Bug 1448728 part 0 - Remove objects only used in the old style system from nsPresArena::AddSizeOfExcludingThis. r=emilio
This patch was part of Bug 1448535 part 5 and reviewed there. It is
split out because bug 1448728 doesn't need to be blocked by other parts
of bug 1448535.

MozReview-Commit-ID: C74w6FWAxMB

--HG--
extra : source : 1a537bb710a0ab31afdad0ef6e95fee518800737
extra : amend_source : 1dbcd7b3cfb4ccb4732b4a2ba7842436ac4b215d
2018-03-28 10:42:07 +11:00
Emilio Cobos Álvarez
152f1f8377 Bug 1448526: followup: Fix remaining macro declaration on a CLOSED TREE. r=me
MozReview-Commit-ID: X2Sx55WbWt
2018-03-26 11:50:38 +02:00
Emilio Cobos Álvarez
e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez
5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez
ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01:00
Emilio Cobos Álvarez
f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Cameron McCormack
d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11: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
Nicholas Nethercote
ccabc0fa19 Bug 1393636 (part 5) - Report memory usage of Gecko style structs separately. r=heycam.
A lot of this involves copy-pasting the existing Servo style structs code.

Note that nsArenaSizes had to be moved after nsStyleSizes, because the former
now contains an instance of the latter.

MozReview-Commit-ID: 3hrkobxbX9b

--HG--
extra : rebase_source : f6b29bd7cb9bd60f2da65f5f907e161299333287
2017-08-25 14:59:44 +10:00
Nicholas Nethercote
9ab2597a8d Bug 1387956 (part 2) - Overhaul handling of nsWindowSizes. r=mccr8.
This patch does the following.

- Moves nsWindowSizes from nsWindowMemoryReporter.h to its own file,
  nsWindowSizes.h, so it can be included more widely without exposing
  nsWindowMemoryReporter.

- Merges nsArenaMemoryStats.h (which defines nsTabSizes and nsArenaMemoryStats)
  into nsWindowSizes.h.

- Renames nsArenaMemoryStats as nsArenaSizes, and nsWindowSizes::mArenaStats as
  nsWindowSizes::mArenaSizes. This is the more usual naming scheme for such
  types.

- Renames FRAME_ID_STAT_FIELD as NS_ARENA_SIZES_FIELD.

- Passes nsWindowSizes to PresShell::AddSizeOfIncludingThis() and
  nsPresArena::AddSizeOfExcludingThis(), instead of a bunch of smaller things.
  One nice consequence is that the odd nsArenaMemoryStats::mOther field is no
  longer necessary, because we can update nsWindowSizes::mLayoutPresShellSize
  directly in nsPresArena::AddSizeOfExcludingThis().

- Adds |const| to a few methods.

MozReview-Commit-ID: EpgFWKFqy7Y
2017-08-10 14:14:09 +10:00
Manish Goregaokar
eead13a553 Bug 1379830 - stylo: Allow ServoStyleContext to participate in ArenaRefPtr; r=bholley
MozReview-Commit-ID: 3uuokS0yAS6
2017-07-19 22:54:21 -07:00
Mats Palmgren
e2227d8864 Bug 1375331 - Retain the array buffer for PresArena free lists if it's 2048 bytes or less to avoid malloc/free churn. r=dbaron
MozReview-Commit-ID: KaABTKyIl1H
2017-06-24 19:23:07 +02:00
Manish Goregaokar
2991af8d79 Bug 1373018 - Part 4: stylo: Rename eArenaObjectID_nsStyleContext to eArenaObjectID_GeckoStyleContext; r=bholley
MozReview-Commit-ID: 5oZwxG8r9Ty

--HG--
extra : rebase_source : 32fdfe60a20b2d90f531df1999b3aee0e4c8a5c2
2017-06-10 22:27:45 -07:00
Mats Palmgren
483a804512 Bug 1364805 part 3 - Implement Type() by indexing a static array using the mClass field. Remove the nsIFrame::mType field. r=jfkthame
In the nsWindowMemoryReporter.cpp / nsArenaMemoryStats.h I'm only
including the concrete frame classes now - we obviously never have
instances of the other IDs so there's no need to collect stats for them.

MozReview-Commit-ID: 48uFCZ3xKBC
2017-05-26 12:11:11 +02:00
L. David Baron
76b64757a7 Bug 1367190 patch 3 - Store nsPresArena::mFreeLists as an array. r=mats
MozReview-Commit-ID: DDJetJaJMb4

--HG--
extra : transplant_source : r%2C1%CA%1B%3B%816/%A7%1A%82%28%E3%B6%EDj%A2W%B1
2017-05-24 09:41:41 -04:00
Bas Schouten
cccd551d50 Bug 1330570: Allocate DisplayItemData into the PresShell Arena. r=mattwoodrow
MozReview-Commit-ID: 8zVPIVSslVA
2017-05-10 05:07:37 +02:00
Carsten "Tomcat" Book
85e7d31eb4 Backed out changeset 9483bb6d8ce6 (bug 1330570) for test failures in test_selection_move_commands.html | cmd_scrollBottom - -300 should equal -300 2017-05-10 12:11:11 +02:00
Bas Schouten
17a260dee8 Bug 1330570: Allocate DisplayItemData into the PresShell Arena. r=mattwoodrow
MozReview-Commit-ID: 8zVPIVSslVA
2017-05-10 05:07:37 +02:00
Eric Rahm
861a58d5a4 Bug 1351904 - Switch layout over to ArenaAllocator. r=xidorn
This switches over layout's usage of PLArena to ArenaAllocator. This allows
us to build more files in unified sources and gets rid of various CONST masks.

MozReview-Commit-ID: Aaf3Dl2kaoz
2017-03-31 14:06:33 -07:00
Cameron McCormack
5cd9b296f7 Bug 1203766 - Part 3: Add ArenaRefPtr support to nsStyleContext. r=bzbarsky 2015-09-17 12:08:20 +10:00
Cameron McCormack
f503baef93 Bug 1203766 - Part 2: Add an ArenaRefPtr class that can have its pointer cleared out when an object's owning nsPresArena goes away. r=bzbarsky 2015-09-17 12:08:19 +10:00
Cameron McCormack
be6487a748 Bug 1203766 - Part 1: Generate nsPresArena::ObjectIDs with a preprocessor-included file. r=bzbarsky 2015-09-17 12:08:19 +10:00
Ting-Yu Lin
ffd909a0f6 Bug 1182963 - Use nsTHashTable::Iterator in nsPresArena. r=njn
--HG--
extra : commitid : DuQQI9pWHsg
extra : rebase_source : a6ab8377a5a61808aa593ff2dba8ad52d1e8834c
2015-07-15 17:05:06 +08:00
Cameron McCormack
7c0c226f2c Bug 1168299 - Break out style struct memory usage reporting from pres-shell. r=njn 2015-05-27 12:08:42 +10:00
Nicholas Nethercote
6731149c55 Bug 1127201 (attempt 2, part 2) - Remove remaining uses of NS_ABORT_IF_FALSE. r=Waldo.
For the poisoning in nsPresArena.cpp I made it print out the details, because
that seems useful. For the other I simply removed the printing of the
unexpected value because that seems less important; we have countless
assertions like that elsewhere in the codebase that don't print the unexpected
value.

--HG--
extra : rebase_source : 34bb135d34c67db8c1db1742a53ea84e472083c6
2015-02-09 17:05:37 -08:00
Nicholas Nethercote
242708cf72 Bug 1127201 (attempt 2, part 1) - Replace most NS_ABORT_IF_FALSE calls with MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 488e401ff87e31a2074c4108c4df0572d9536667
2015-02-09 14:34:50 -08:00
Andrew McCreight
d3826daa16 Back out Bug 1127201 (part 2) for various problems. 2015-02-06 15:04:32 -08:00
Nicholas Nethercote
d34f0301b8 Bug 1127201 (part 2) - Convert all NS_ABORT_IF_FALSE calls to MOZ_ASSERT. r=Waldo.
--HG--
extra : rebase_source : 99182e70335d2b5ff95f8c528ae992d37294be3a
2015-02-04 20:05:36 -08:00
Mats Palmgren
f2d23931c0 Bug 1085701 - Report the allocation size to the OOM abort. r=roc 2014-10-21 15:42:24 +00:00
Andrew McCreight
228d194059 Bug 1046281 - Use the simpler version of nsTHashtable memory reporters. r=njn 2014-08-05 13:27:41 -07:00
Robert O'Callahan
cbb8fdebfc Bug 1015664. Part 1: Remove NS_HIDDEN_() usage. r=bsmedberg 2014-06-03 00:08:21 +12:00
Nicholas Nethercote
75f194c48c Bug 921923 (part 3) - Make multi-output sizeOfFoo() functions more consistent in content/, dom/ and layout/. r=till.
--HG--
extra : rebase_source : ac8aebe86b4b7ee5acc0f541be5645abf73b6a98
2013-09-30 16:20:23 -07:00
Robert O'Callahan
03e7828db2 Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
--HG--
extra : rebase_source : 0787130b1814c74bfb38dc178de94022f0b2e64e
2013-09-02 20:41:57 +12:00
Ehsan Akhgari
c2149cd1cf Bug 906790 follow-up: Unbreak ASAN builds 2013-08-20 17:48:00 -04:00
Ehsan Akhgari
2621b190f1 Bug 906790 - Minimize layout/base #includes; r=roc 2013-08-19 18:55:18 -04:00
Catalin Iacob
6f4758d23e Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
Mats Palmgren
92268718c4 Bug 867530 - Make the current poison consumers use the new API. r=roc 2013-05-07 20:48:59 +02:00
Mats Palmgren
a72cd1a4d3 Bug 867530 - Move PresArena poisoning code to MFBT. r=roc
--HG--
rename : layout/base/tests/cpp-tests/TestPoisonArea.cpp => mfbt/tests/TestPoisonArea.cpp
2013-05-07 20:48:59 +02:00
Mats Palmgren
d7cb6e0ea4 Bug 856368 - Inline the AllocateBy* and FreeBy* methods into the header. r=roc 2013-04-15 22:00:06 +02:00
Mats Palmgren
11a4e4ae9f Bug 856368 - Adjust memory reporter SizeOf methods accordingly. r=roc 2013-04-15 22:00:06 +02:00
Mats Palmgren
62e2d164d6 Bug 856368 - Merge nsPresArena::mState into nsPresArena itself. r=roc 2013-04-15 22:00:06 +02:00
Mats Palmgren
6ce54168af Bug 856368 - Remove DEBUG_TRACEMALLOC_PRESARENA. r=roc 2013-04-15 22:00:06 +02:00
Christian Holler
4a07f7f5e5 Bug 852476 - Fix Valgrind annotations in nsPresArena.cpp. r=mats
--HG--
extra : rebase_source : 0f7ffca296ad5a68ebef0e44b3b5be4b5370c04d
2013-03-25 15:27:43 +01:00
Christian Holler
256a511da6 Bug 838557 - Fix obvious problem with previous patch in nsPresShell.cpp, r=me 2013-02-18 02:48:41 +01:00
Christian Holler
8080e238c0 Bug 838557 - Create a common interface for ASan/Valgrind functions. r=mats,bhackett 2013-02-15 00:50:11 +01:00
Wan-Teh Chang
13d4085355 Bug 807883: Reformat a function call. 2013-02-12 18:48:59 -08:00
Wan-Teh Chang
3417a36828 Bug 807883: Use the new PL_SizeOfArenaPoolExcludingPool function
in NSPR 4.9.6. Portions of the patch were written by Nicholas
Nethercote <n.nethercote@gmail.com>. r=n.nethercote.
2013-02-12 08:54:38 -08:00
Christian Holler
27cd3a543c Bug 838150 - Add ASan and Valgrind annotations to JS LifoAlloc. r=bhackett 2013-02-06 14:30:01 +01:00