Commit Graph

528571 Commits

Author SHA1 Message Date
Saurav Sachidanand
16f14ffd75 Bug 1351986 - Remove DOCTYPE, version, xmlns:xlink from SVG files; r=dao 2017-04-04 09:10:07 +02:00
Tooru Fujisawa
61524c3df7 Bug 1352323 - Add JS_NewMaybeExternalString function that creates either an external string or returns a static string. r=jandem 2017-04-04 15:45:49 +09:00
Phil Ringnalda
3c97553fda Backed out 2 changesets (bug 1349699) for Win8 opt xpcshell crashes at mozilla::ipc::MessageChannel::WillDestroyCurrentMessageLoop
Backed out changeset 5cc766c0864e (bug 1349699)
Backed out changeset 13f1d3918fe5 (bug 1349699)
2017-04-03 22:54:59 -07:00
L. David Baron
6f4077b7ee Backed out changeset 74eb0b08e42b (bug 1353187 patch 2) for test failures (assertions firing). 2017-04-03 22:47:57 -07:00
Nicholas Nethercote
f91e7e7672 Bug 1351963 (part 9) - Improve SetSampleContext(). r=jseward.
SetSampleContext() sets the TickSample's register fields, and the two callers
of SetSampleContext() set the TickSample's mContext.

This patch changes SetSampleContext() so it sets all the fields in one place.
It also renames SetSampleContext() as FillInSample(), because it sets more than
just the context.

--HG--
extra : rebase_source : 9b9f749fe3de687a7fd32f5c38e2321c2abebfdc
2017-03-31 11:13:28 +11:00
Nicholas Nethercote
c29e97d66d Bug 1351963 (part 8) - Simplify PseudoStack ownership. r=jseward.
Currently each live thread has a PseudoStack that is owned by tlsPseudoStack,
and a ThreadInfo that has a non-owning pointer to the same PseudoStack.
Then, if the profile is active when the thread dies, ownership of the
PseudoStack is transferred to the ThreadInfo.

This patch simplifies the ownership rules. Every ThreadInfo now always owns its
PseudoStack and is responsible for destroying it. tlsPseudoStack is a
non-owning pointer, and so must be cleared when a PseudoStack is destroyed.
This simplifies the code in a few places.

--HG--
extra : rebase_source : 1012b6590380091d60eff98b4e0c5b1ba946cc7e
2017-03-31 11:01:50 +11:00
Nicholas Nethercote
00f3bc4e23 Bug 1351963 (part 7) - Factor out repeated thread-finding code. r=jseward.
The patch also adds a MOZ_RELEASE_ASSERT in profiler_unregister_thread() for
the case where the ThreadInfo isn't found, which is informative.

--HG--
extra : rebase_source : 11a86914db235e4a60955ff1c9b77d46109af548
2017-03-24 09:24:45 +11:00
Nicholas Nethercote
28cde67779 Bug 1351963 (part 6) - Remove ThreadInfo from TickSample. r=jseward.
This avoids the need for the fake ThreadInfo in profiler_get_backtrace(). It
requires adding a few extra fields to TickSample.

--HG--
extra : rebase_source : c28e5493edc7db96a7160e78b297ae09dc05ca7c
2017-03-31 10:49:36 +11:00
Nicholas Nethercote
f76f4f4892 Bug 1351963 (part 5) - Improve TickSample. r=jseward.
This patch does the following.

- Splits TickSample's constructor in two, one for the periodic sample case, and
  one for the synchronous sample case, and initializes more stuff in them. (The
  two constructors aren't that different right now, but they will become more
  different when I remove TickSample::mThreadInfo.)

- Makes all the constructor-filled fields in TickSample |const|.

- Reorders the fields so that the constructor-filled ones are before the ones
  that get filled in later.

- Omits mContext on Mac via conditional compilation, to make the omission
  clearer.

--HG--
extra : rebase_source : f3e392c4cf777df5b9f39577af82615890137018
2017-03-31 10:35:54 +11:00
Nicholas Nethercote
25993378b9 Bug 1351963 (part 4) - Make the LastSample argument to addTagThreadId optional. r=jseward.
LastSample only makes sense for periodic samples, which are written to the
global ProfileBuffer. It doesn't make sense for synchronous samples which are
written to their own unshared buffer. At the moment it doesn't hurt to use
them in this nonsensical way, but the ThreadInfo profiler_get_backtrace()
will be removed soon, and we won't even have a LastSample to use nonsensically.

So this patch makes the LastSample argument to addTagThreadId() optional. Which
means we have to pass in a ThreadId, so there's no longer much point
duplicating the ThreadId in LastSample, so the patch removes that field too.
This avoids the possibility of the duplicate ThreadId failing to match, which
is nice.

--HG--
extra : rebase_source : dad76ff8b33663398e6f45f85da500b0fd7a598f
2017-03-31 10:13:13 +11:00
Timothy Nikkel
3f354b21bf Bug 1352074. Remove high precision timer mode from refresh driver because it is not needed with vsync based refresh drivers. r=mchang
Bug 731974 added this code to get more accurate timer callbacks back when the refresh driver was based on timers. It shouldn't be needed anymore now that the refresh driver is based on vsync.
2017-04-04 00:14:28 -05:00
Bill McCloskey
48196dd880 Bug 1349699 - Assert that the Chromium channel is closed when MessageLoop is destroyed (r=dvander)
MozReview-Commit-ID: I7HyjVanlxJ
2017-04-03 21:54:49 -07:00
Bill McCloskey
754aae1913 Bug 1349699 - Assert when destroying a MessageLoop that a live MessageChannel is attached to (r=dvander)
MozReview-Commit-ID: GGr5UqJl3ui
2017-04-03 21:54:19 -07:00
Phil Ringnalda
884bc64271 Backed out 3 changesets (bug 1349699) for Android mozilla::ipc::MessageChannel::WillDestroyCurrentMessageLoop crashes
Backed out changeset 8a50c2d76afc (bug 1349699)
Backed out changeset 3b9eadd61e26 (bug 1349699)
Backed out changeset 16e000b3fe0c (bug 1349699)
2017-04-03 21:07:49 -07:00
L. David Baron
24c39a87ef Bug 1353187 - Guard access to the frame property table with a frame state bit. r=dholbert
This protects all accesses to the frame property table with a bit stored
on the frame.  This means we avoid hashtable operations when asking
about frame properties on frames that have no properties.

The changes to RestyleManager, and the new HasSkippingBitCheck API, are
needed because RestyleManager depended on being able to ask for
properties on a deleted frame (knowing that the property in question
could not have been set on any new frames since the deleted frame was
destroyed), in order to use the destruction of the properties that
happens at frame destruction as a mechanism for learning that the frame
was destroyed.  The changes there preserve the use of that mechanism,
although it becomes a bit uglier.  The ugliness is well-deserved.

MozReview-Commit-ID: BScmDUlWq65

--HG--
extra : transplant_source : %95%A2%9B%A1M%1F%86%A8%E0%FF%7B%E4%83%24%83%16%BE%FA%08T
2017-04-03 20:43:31 -07:00
L. David Baron
c2af2e1613 Bug 1353187 - Give frame properties the const-ness semantics of member variables. r=dholbert
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed.  I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.

This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.

MozReview-Commit-ID: IJ9JnGzdH51

--HG--
extra : transplant_source : %91%D6%C7%01hC%B3z%90%B6%93%93qcAK%CB%09%D6z
2017-04-03 20:43:30 -07:00
L. David Baron
4d700b54f1 Bug 1352889 - Ensure that PLDHashTable's second hash doesn't have padding with 0 bits for tables with capacity larger than 2^16. r=njn
PLDHashTable takes the result of the hash function and multiplies it by
kGoldenRatio to ensure that it has a good distribution of bits across
the 32-bit hash value, and then zeroes out the low bit so that it can be
used for the collision flag.  This result is called hash0.  From hash0
it computes two different numbers used to find entries in the table
storage:  hash1 is used to find an initial position in the table to
begin searching for an entry; hash2 is then used to repeatedly offset
that position (mod the size of the table) to build a chain of positions
to search.

In a table with capacity 2^c entries, hash1 is simply the upper c bits
of hash0.  This patch does not change this.

Prior to this patch, hash2 was the c bits below hash1, padded at the low
end with zeroes when c > 16.  (Note that bug 927705, changeset
1a02bec165e16f370cace3da21bb2b377a0a7242, increased the maximum capacity
from 2^23 to 2^26 since 2^23 was sometimes insufficient!)  This manner
of computing hash2 is problematic because it increases the risk of long
chains for very large tables, since there is less variation in the hash2
result due to the zero padding.

So this patch changes the hash2 computation by using the low bits of
hash0 instead of shifting it around, thus avoiding 0 bits in parts of
the hash2 value that are significant.

Note that this changes what hash2 is in all cases except when the table
capacity is exactly 2^16, so it does change our hashing characteristics.
For tables with capacity less than 2^16, it should be using a different
second hash, but with the same amount of random-ish data.  For tables
with capacity greater than 2^16, it should be using more random-ish
data.

MozReview-Commit-ID: JvnxAMBY711

--HG--
extra : transplant_source : %8A%25%FB%E3H%B8_%F1G%F6%3E%0B%29%DF%20%FF%D8%E1%AEw
2017-04-03 20:43:30 -07:00
L. David Baron
db2f1da78f Bug 1352888 - Don't set the collision flag when adding to PLDHashTable if we've already found the entry we're going to add. r=njn
PLDHashTable's entry store has two types of unoccupied entries:  free
entries and removed entries.  The search of a chain of entries
(determined by the hash value) in the entry store to search for an entry
can stop at free entries, but it continues across removed entries,
because removed entries are entries that may have been skipped over when
we were adding the value we're searching for to the hash, but have since
been removed.  For live entries, we also maintain this distinction by
using one bit of storage for a collision flag, which notes that if the
hashtable entry is removed, its place in the entry store must become a
removed entry rather than a free entry.

When we add a new entry to the table, Add's semantics require that we
return an existing entry if there is one, and only create a new entry if
no existing entry exists.  (Bug 1352198 suggests the possibility of a
faster alternative Add API where the caller guarantees that the key is
not already in the hashtable.)  When we search for the existing entry,
we must thus continue the search across removed entries, even though we
record the first removed entry found to return if the search for an
existing entry fails.

The existing code adds the collision flag through the entire table
search during an Add.  This patch changes that behavior so that we only
add the collision flag prior to finding the first removed entry.  Adding
it after we find the first removed entry is unnecessary, since we are
not making that entry part of a path to a new entry.  If it is part of a
path to an existing entry, it will already have the collision flag set.

This patch effectively puts an if (!firstRemoved) around the else branch
of the if (MOZ_UNLIKELY(EntryIsRemoved(entry))), and then refactors that
condition outwards since it is now around the contents of both the if
and else branches.

MozReview-Commit-ID: CsXnMYttHVy

--HG--
extra : transplant_source : 0T%B0%FA%C0%85v%8B%16%E7%81%03p%F5K%97%B1%9E%92%27
2017-04-03 20:43:29 -07:00
L. David Baron
0b145fb182 Bug 1277709 - Make threadsafe reference counting use the minimum memory sychronization needed. r=froydnj
This uses std::atomic rather than mozilla::Atomic since mozilla::Atomic
does not support using different memory synchronization for different
atomic operations on the same variable.

The added comments could use careful review since, while they reflect my
understanding of the issue, I don't consider myself an expert on the
topic.

MozReview-Commit-ID: 7xByCXt17Dr

--HG--
extra : transplant_source : 8%8Ci%CC%EA%0F%CF%C7%3E%F1%93%F5%C9%ED9%84%F9%3Evx
2017-04-03 20:43:29 -07:00
Bill McCloskey
e83663c320 Bug 1349699 - Fix ASAN builds
MozReview-Commit-ID: 9tsL7nzjbpS
2017-04-03 20:08:02 -07:00
Bill McCloskey
4d6c01074f Bug 1349699 - Assert that the Chromium channel is closed when MessageLoop is destroyed (r=dvander)
MozReview-Commit-ID: I7HyjVanlxJ
2017-04-03 19:41:13 -07:00
Bill McCloskey
c3bd8c6e5b Bug 1349699 - Assert when destroying a MessageLoop that a live MessageChannel is attached to (r=dvander)
MozReview-Commit-ID: GGr5UqJl3ui
2017-04-03 19:41:13 -07:00
Bill McCloskey
4b205424a5 Bug 1350724 - Remove telemetry for tab cache position (r=mconley)
MozReview-Commit-ID: 5yJUeC2HxPs
2017-04-03 19:41:13 -07:00
Matthew Gregan
2174e12534 Bug 1352929 - Update libcubeb to 04826edb. r=padenot 2017-04-04 14:02:04 +12:00
Eric Rahm
2fb2f1cb55 Bug 1244091 - Switch nsUpdateDriver to LazyLogModule. r=froydnj 2017-04-03 18:36:18 -07:00
Nicholas Nethercote
f9ffeeb27b Bug 1351963 (part 3, attempt 2) - Remove ThreadInfo from ProfilerBacktrace. r=mstange. 2017-04-04 09:41:53 +10:00
Nicholas Nethercote
44c0cb1064 Bug 1351963 (part 2, attempt 2) - Move StreamSamplesAndMarkers() out of ThreadInfo. r=mstange. 2017-04-04 09:41:11 +10:00
Paul Bignier
799ce6cc86 Bug 1352825 - Fix comment typos of 'docshell'. r=MattN
--HG--
extra : rebase_source : 54695797cb5b1e340a487988b4cf4f00a1209147
2017-04-03 09:09:00 -04:00
Hideki Takeoka
613f5321ec Bug 1351948 - Refuse ws messages that don't use minimal encoding. r=michal
--HG--
extra : rebase_source : 269bb3854d523e4100e5c1eda65b006bb15ae00d
2017-04-03 10:49:22 -04:00
Mihai Tabara
c4ac3e36d2 Bug 1341352 - add balrogworker support for releases. r=aki a=release DONTBUILD"
MozReview-Commit-ID: KbkKMdKmQpG

--HG--
extra : source : dae947786d0c56bd96e63cf4d40e702db4694e16
2017-04-04 07:37:24 +08:00
Kris Maglione
0638745d18 Bug 1352893: Handle non-UTF-8 data in Unix environment variables. r=mstange
MozReview-Commit-ID: 5aRVYQICc7O

--HG--
extra : rebase_source : 6244a8ba08bad6da90496f27e9bb4eaace5e6fb9
extra : amend_source : f997353c8b075c989ace2790ae73330fd375b558
2017-04-02 18:46:10 -07:00
Geoff Brown
1fd72486a0 Bug 1353016 - Add more test chunks for linux debug mochitest-bc; r=jmaher 2017-04-03 16:50:15 -06:00
Geoff Brown
fbf67d9039 Bug 1341337 - Split test browser_extension_update_background.js; r=kmag 2017-04-03 16:50:13 -06:00
Luke Wagner
b02d193813 Bug 1353189 - Baldr: remove CodeSegment::vtune_method_id (r=sstangl)
MozReview-Commit-ID: 5WzMfxXB8M5
2017-04-03 17:45:37 -05:00
Paul Bignier
166ed99e17 Bug 1352805 - Typo fixes in comments around "unfortunately". r=MattN
MozReview-Commit-ID: B76JuHabq9T
2017-04-03 09:23:00 -07:00
Paul Bignier
bc0c1045c5 Bug 1352848 - Fix spelling of 'settings' in comment. r=MattN
MozReview-Commit-ID: J6PjvNRKhEm

--HG--
extra : rebase_source : 09e4d07f42767e63a604015d18871ae1fb92bac7
2017-04-03 15:24:46 -07:00
Paul Bignier
9103ac60ef Bug 1352808 - Typo fixes for 'browser' in comments. r=MattN
MozReview-Commit-ID: IA42yQO5Sb8

--HG--
extra : rebase_source : b5426724c5b740639f71e5d058742b01868085e2
2017-04-03 15:26:11 -07:00
Paul Bignier
ff2e59d1cd Bug 1352802 - Typo fixes around 'accessible'. r=MattN
MozReview-Commit-ID: 27CyNOMXkRq

--HG--
extra : rebase_source : 30e8891fa40cb497ab695e72b179c850a3a5c8d9
2017-04-03 09:47:00 -07:00
David Anderson
c10c9d57eb Don't synchronously send the initial layer tree mapping list to the GPU process. (bug 1350660 part 2, r=rhunt) 2017-04-03 15:13:38 -07:00
David Anderson
0f3b97ed9c When using the GPU process, combine layer ownership and window mapping into a single IPC message. (bug 1350660 part 1, r=rhunt, r=billm) 2017-04-03 15:13:37 -07:00
David Anderson
dfbf7fe0d0 Add crash reporter annotations for the GPU process status. (bug 1343650, r=billm)
--HG--
extra : rebase_source : 28e0d023e99f66f518047f1a468c899ff52c590a
2017-04-03 15:11:27 -07:00
Wes Kocher
734b25e05c Merge m-c to inbound, a=merge 2017-04-03 14:51:06 -07:00
Wes Kocher
53dde6a1d2 Merge inbound to central, a=merge 2017-04-03 14:50:18 -07:00
Wes Kocher
ad3c125e24 Merge autoland to central, a=merge 2017-04-03 14:43:05 -07:00
Randell Jesup
d5d480e33d Bug 1349581: defer nativeRegistration for android Jni to avoid thread issues r=gcp
MozReview-Commit-ID: Ep0ej5HkGE3
2017-04-03 16:58:44 -04:00
Olli Pettay
c30a0ed796 Bug 1351303, make HTML parser to use faster atomization in main thread, r=froydnj
--HG--
extra : rebase_source : 60b5877f237644d99e97c19e8086e2302b2aad84
2017-04-03 23:13:55 +03:00
Olli Pettay
98fff73826 Bug 1351303, add main thread only cache for nsIAtoms to speed up atomization, r=froydnj
--HG--
extra : rebase_source : 9c67cd71c0721329eaeaaa96a295e90abc480042
2017-04-03 23:13:18 +03:00
Olli Pettay
d5caa7c6c0 Bug 1352687, try to recycle HTMLInputElement's nsTextEditorState, r=baku
--HG--
extra : rebase_source : 05c8dc2bd0c29ce3064548e1cabac2d62803cabc
2017-04-03 20:40:48 +03:00
Tom Schuster
7c9aab27bc Bug 1352006 - Inline NewArrayIterator in Ion. r=jandem 2017-04-03 22:24:03 +02:00
Nathan Froyd
e0317a08e6 Bug 1346814 - don't export sStartupTimeline{,Desc}; r=bsmedberg
Fewer symbols exported = more better.
2017-04-03 16:02:31 -04:00