Commit Graph

16695 Commits

Author SHA1 Message Date
Tom Ritter
2dbc80baea Bug 1392617 Fix comparison between signed and unsigned integer expressions r=aklotz
The return of these functions is actually (DWORD) –1

MozReview-Commit-ID: 112d6BTBt8O

--HG--
extra : rebase_source : f36ec05d9a1e85d4d2dd844d8024189971aaeb46
2017-08-22 06:35:12 -05:00
Sebastian Hengst
75955d0246 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Bevis Tseng
88a5ee396a Bug 1392201 - Label nsThreadShutdownAckEvent. r=froydnj 2017-08-21 17:30:22 +08:00
Nicholas Nethercote
8a72cf2251 Bug 1390428 (part 2, attempt 2) - Remove more nsXPIDLCString local variables. r=erahm.
--HG--
extra : rebase_source : 69d58b0cfb56efc6b03d8e2d7be2ce3c3e6cd843
2017-08-21 20:01:27 +10:00
Olli Pettay
6e1dc494d2 Bug 1391423, add a nursery for purple buffer to allow faster addref/release on the main thread, r=mccr8
--HG--
extra : rebase_source : 4dcb8af2d3f2518ab0fd00b65fbf1d0096d8e810
2017-08-22 00:01:47 +03:00
Cervantes Yu
102fb1453d Bug 1320134 - Part 4: Remove the debug patches for running out of TLS slots on Windows. r=froydnj
Revert revision f760842b14a2, 051b765ca8f2 and 01125b5142e5 since the original
bug that we run out of TLS slots on Windows is no longer showing up after
firefox55. It should have been fixed elsewhere, very likely in the rust part.

MozReview-Commit-ID: 9j5hFSGT3OE
2017-08-21 16:24:29 +08:00
Nicholas Nethercote
4e54a99900 Bug 1385172 - Move some comments in nsEscape.h. r=erahm.
Comments about functions should go before the declaration, not after!

--HG--
extra : rebase_source : 7cfdb2cc7fd926bec36673d8ca334920c07d0a43
2017-08-21 08:58:28 +10:00
Nicholas Nethercote
4a623e6df4 Bug 1385172 - Replace nsEscapeHTML{,2}() with new nsAppendEscapedHTML() function. r=erahm.
The existing functions work with C strings but almost all the call sites use
Mozilla strings.

The replacement function has the following properties.

- It works with Mozilla strings, which makes it much simpler and also improves
  the call sites.

- It appends to the destination string because that's what a lot of the call
  sites need. For those that don't, we can just append to an empty string.

- It is declared outside the |extern "C"| section because there is no need for
  it to be in that section.

Note: there is no 16-bit variant of nsAppendEscapedHTML(). This is because
there are only two places that need 16-bit variants, both rarely executed,
and so converting to and from 8-bit is good enough.

The patch also adds some testing of the new function, renaming
TestEscapeURL.cpp as TestEscape.cpp in the process, because that file is now
testing other kinds of escaping.

--HG--
rename : xpcom/tests/gtest/TestEscapeURL.cpp => xpcom/tests/gtest/TestEscape.cpp
extra : rebase_source : 51145ae2c9b0b4573c7ea0c342dcb246f9f14fb9
2017-08-18 12:00:59 +10:00
Bevis Tseng
eb2adceca7 Bug 1373046 - Use idle dispatch for IncrementalFinalizeRunnable. r=billm
MozReview-Commit-ID: 2xVjTSHTcFb
2017-08-15 17:30:24 +08:00
Wes Kocher
bb19458d5f Merge m-c to inbound, a=merge
MozReview-Commit-ID: EgYue63nSkv
2017-08-18 16:29:11 -07:00
Wes Kocher
b1fc5e008c Merge inbound to central, a=merge
MozReview-Commit-ID: 4cWGBbMEU2x
2017-08-18 15:53:07 -07:00
Bill McCloskey
e7ca33ec9e Bug 1391657 - Fix missing member initialization for input prioritization (r=mccr8)
MozReview-Commit-ID: AaleTbntJ7U
2017-08-18 14:18:07 -07:00
Eric Rahm
0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Wes Kocher
91f1f19054 Merge m-c to autoland, a=merge
MozReview-Commit-ID: IMdYxijQ9ie
2017-08-21 17:20:06 -07:00
Mike Shal
5b41b430f9 Bug 1390916 - Always use --track instead of --no-remove for install manifests; r=gps
The --track flag provides a more accurate accounting of what files were
installed by the manifest, so they can be appropriately removed. For
example, test files are now removed from _tests if an entry in a test
file is deleted.

The --no-remove flag is removed as an alternative, and the --track flag
is now mandatory.

MozReview-Commit-ID: Wiup4Gzwkb

--HG--
extra : rebase_source : 4a44c7fe066ba9b5f1e37ec682464f7f4f6cb2cf
2017-08-08 17:07:07 -04:00
Wes Kocher
c1383cebf3 Merge m-c to autoland, a=merge
MozReview-Commit-ID: KLrOCT1a7El
2017-08-17 16:23:45 -07:00
Sebastian Hengst
9d5f4bffd9 Backed out changeset 9c364b2c35d3 (bug 1391306) for failing selftest.py during build. r=backout 2017-08-17 20:27:37 +02:00
Ehsan Akhgari
cfd7f1c957 Bug 1391306 - Reduce the hashtable lookups in CycleCollectedJSRuntime::Add/RemoveJSHolder by one each; r=mccr8 2017-08-17 13:46:06 -04:00
Carsten "Tomcat" Book
99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Bill McCloskey
a5168688f9 Bug 1382922 - Fix test bustage on a CLOSED TREE
MozReview-Commit-ID: D03XhT1oTP0
2017-08-16 21:27:14 -07:00
Bill McCloskey
12e61085ce Bug 1382922 - Fix build bustage on a CLOSED TREE
MozReview-Commit-ID: 2Ls9zhiXXgS
2017-08-16 21:11:59 -07:00
Bill McCloskey
9edd615af7 Bug 1382922 - Refactor event queue to allow multiple implementations (r=erahm)
This patch refactors the nsThread event queue to clean it up and to make it easier to restructure. The fundamental concepts are as follows:

Each nsThread will have a pointer to a refcounted SynchronizedEventQueue. A SynchronizedEQ takes care of doing the locking and condition variable work when posting and popping events. For the actual storage of events, it delegates to an AbstractEventQueue data structure. It keeps a UniquePtr to the AbstractEventQueue that it uses for storage.

Both SynchronizedEQ and AbstractEventQueue are abstract classes. There is only one concrete implementation of SynchronizedEQ in this patch, which is called ThreadEventQueue. ThreadEventQueue uses locks and condition variables to post and pop events the same way nsThread does. It also encapsulates the functionality that DOM workers need to implement their special event loops (PushEventQueue and PopEventQueue). In later Quantum DOM work, I plan to have another SynchronizedEQ implementation for the main thread, called SchedulerEventQueue. It will have special code for the cooperatively scheduling threads in Quantum DOM.

There are two concrete implementations of AbstractEventQueue in this patch: EventQueue and PrioritizedEventQueue. EventQueue replaces the old nsEventQueue. The other AbstractEventQueue implementation is PrioritizedEventQueue, which uses multiple queues for different event priorities.

The final major piece here is ThreadEventTarget, which splits some of the code for posting events out of nsThread. Eventually, my plan is for multiple cooperatively scheduled nsThreads to be able to share a ThreadEventTarget. In this patch, though, each nsThread has its own ThreadEventTarget. The class's purpose is just to collect some related code together.

One final note: I tried to avoid virtual dispatch overhead as much as possible. Calls to SynchronizedEQ methods do use virtual dispatch, since I plan to use different implementations for different threads with Quantum DOM. But all the calls to EventQueue methods should be non-virtual. Although the methods are declared virtual, all the classes used are final and the concrete classes involved should all be known through templatization.

MozReview-Commit-ID: 9Evtr9oIJvx
2017-08-16 20:55:43 -07:00
Chris Pearce
f2902bdf82 Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya
MozReview-Commit-ID: 1aTncGfBicu

--HG--
extra : rebase_source : 8ad085eb81d195732c385718c283b4752e5e3c80
2017-08-15 16:13:00 +12:00
Michael Kaply
73bafcec5e Bug 1389168 - Remove unnecessary IBM license text. r=gerv
MozReview-Commit-ID: 8HdaBppsJsc

--HG--
extra : rebase_source : 617c17b1162265e44810597fa69d533316da1a6b
2017-08-16 16:10:56 -05:00
Wes Kocher
22fd8d166d Backed out changeset 00e918528ce0 (bug 1388608) for build bustage a=backout CLOSED TREE
MozReview-Commit-ID: H6g0kvzH6tT
2017-08-16 16:22:30 -07:00
Kris Maglione
ff1cab15a3 Bug 1388608: Add profiler labels for dispatching named runnables. r=mstange
MozReview-Commit-ID: 2vmVY38Kdll

--HG--
extra : rebase_source : 59415696d2d59becb541a950d4077ddebeeef3ca
extra : amend_source : 81c9b683e83abe370088e80716ea63d74c783700
2017-08-08 20:19:10 -07:00
Luke Wagner
9b038447f4 Bug 1347644 - Simplify/rename JS::AsyncTask (r=till,bkelly,mccr8)
MozReview-Commit-ID: BahNzYPv0AO
2017-08-16 14:38:53 -05:00
Carsten "Tomcat" Book
eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Nicholas Nethercote
4d15e13fc4 Bug 1390036 (part 3) - Remove nsXPIDLString. r=erahm.
--HG--
extra : rebase_source : 87094fef8b919094926ec1be26867985a7fe8708
2017-08-14 15:25:04 +10:00
Nicholas Nethercote
64c9cd5e75 Bug 1390036 (part 2) - Remove nsXPIDLString use from NullString(). r=dbaron.
This requires adding a new constructor for ns[C]String that can be used to
create an IsVoid string.

--HG--
extra : rebase_source : 8cb078bd0a41e63af0d9d144b9eef369875a05e0
2017-08-14 14:46:53 +10:00
Michael Layzell
65ece3dba5 Bug 1380081 - Part 11: Simplify the HangAnnotations abstraction, r=froydnj
HangAnnotations was very complex, required a separate allocation, and used this
unfortunate virtual interface implementation which made it harder to do
interesting things with it (such as serialize it over IPC).

This new implementation is much simpler and more concrete, making
HangAnnotations simply be a nsTArray<Annotation>. This also simplifies some of
the IPC code which was added in part 7.

MozReview-Commit-ID: EzaaxdHpW1t
2017-08-15 16:35:46 -04:00
Michael Layzell
916fbaa397 Bug 1380081 - Part 5: Add some helper methods to HangAnnotations, r=froydnj
These will be used to implement IPC serialization and deserialization of the
HangDetails object to send over IPC. This is a temporary measure as
HangAnnotations is rewritten in part 11.

MozReview-Commit-ID: 1WHNvhDrMF5
2017-08-15 16:35:06 -04:00
Michael Layzell
b7564c8ece Bug 1380081 - Part 4: Move BHR into its own component, r=froydnj
MozReview-Commit-ID: 7TOGofAYM6W


--HG--
rename : xpcom/threads/BackgroundHangMonitor.cpp => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.cpp
rename : xpcom/threads/BackgroundHangMonitor.h => toolkit/components/backgroundhangmonitor/BackgroundHangMonitor.h
rename : toolkit/components/telemetry/ThreadHangStats.h => toolkit/components/backgroundhangmonitor/ThreadHangStats.h
rename : xpcom/threads/ThreadStackHelper.cpp => toolkit/components/backgroundhangmonitor/ThreadStackHelper.cpp
rename : xpcom/threads/ThreadStackHelper.h => toolkit/components/backgroundhangmonitor/ThreadStackHelper.h
rename : xpcom/threads/nsIHangDetails.idl => toolkit/components/backgroundhangmonitor/nsIHangDetails.idl
2017-08-15 16:35:00 -04:00
Michael Layzell
cd973809f7 Bug 1380081 - Part 3: Remove the ThreadHangStats object and related code, r=froydnj
MozReview-Commit-ID: EtrktVmc3vP
2017-08-15 16:34:21 -04:00
Andrew Osmond
42266555ed Bug 1389479 - Part 1. Add nsExpirationTracker::NotifyEndTransaction(Locked) callbacks for subclasses to know when an aging iteration is complete. r=froydnj 2017-08-15 15:02:14 -04:00
Wes Kocher
3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Valentin Gosu
97a44a506c Bug 1369317 - Filter and escape URI string in only one pass r=mcmanus
MozReview-Commit-ID: KU4C4cS3jZC

--HG--
extra : rebase_source : 4995b4d8a133b8568af5b130be2077ee90f8b4e4
2017-08-13 10:03:34 +02:00
Masatoshi Kimura
f7fb96c7e5 Bug 1390106 - Stop using versioned scripts in tests. r=jmaher
MozReview-Commit-ID: ErqU4M1f7Oj

--HG--
extra : rebase_source : 968490c3f787949324c44ba75b6daf5c346f54c3
2017-08-14 20:46:55 +09:00
Bill McCloskey
268004b056 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 22:42:42 -07:00
Phil Ringnalda
6bfeb0577d Backed out changeset c0c52209c8f2 (bug 1382172) for static build bustage
CLOSED TREE

MozReview-Commit-ID: 9GzjXjoIrp5
2017-08-14 22:23:57 -07:00
Kris Maglione
1e4b0c194f Bug 1389848: Make isServiceInstantiated*() return false rather than throw for uninstantiated services. r=ehsan
MozReview-Commit-ID: J8w7eQ6R3eS

--HG--
extra : rebase_source : 5fabd584d645267b72bbcd15bbdfc01dd15f2386
2017-08-12 16:15:19 -07:00
Bill McCloskey
96944ff355 Bug 1382172 - Compute names for all JS-implemented XPCOM objects (r=mrbkap)
MozReview-Commit-ID: 4kPbqOpGYnq
2017-08-14 21:10:14 -07:00
Bevis Tseng
b31fd1ee95 Backed out changeset c29f8828b859
--HG--
extra : rebase_source : 4a32c7d30c128dd9041e209c6226030c7fba567c
2017-08-15 10:45:28 +08:00
Bevis Tseng
41242cf89a Bug 1367497 - Part 1: Improve Error Handling in {Add|Remove}ObjectLocked(). r=froydnj
MozReview-Commit-ID: 6ecIS6PnVdj

--HG--
extra : source : 0a273c823e19e1048d78f9e6b1ddedf8cc034bd6
2017-05-26 14:36:17 +08:00
Sebastian Hengst
7b4e0b8924 Backed out changeset 0a273c823e19 (bug 1367497) for intermittently crashing in mochitest-chrome-3's layout/style/test/chrome/test_stylesheet_clone_import_rule.html on debug. r=backout 2017-08-15 18:47:29 +02:00
Bevis Tseng
c12623dcbe Bug 1367497 - Part 1: Improve Error Handling in {Add|Remove}ObjectLocked(). r=froydnj
MozReview-Commit-ID: 6ecIS6PnVdj
2017-05-26 14:36:17 +08:00
Wes Kocher
7a772df5bf Merge m-c to inbound, a=merge
MozReview-Commit-ID: BYZASFIrXxp
2017-08-14 17:58:17 -07:00
Masatoshi Kimura
e698863015 Bug 1389702 - Remove MOZ_DEPRECATED. r=froydnj
MozReview-Commit-ID: 4pOKIFXc4wa

--HG--
extra : rebase_source : 57d503f2253d87fbd422e28c34f49e48115be478
2017-08-13 21:00:10 +09:00
Bevis Tseng
4b1a41e00e Bug 1367497 - Part 1: Improve Error Handling in {Add|Remove}ObjectLocked(). r=froydnj
MozReview-Commit-ID: 6ecIS6PnVdj
2017-05-26 14:36:17 +08:00
Ehsan Akhgari
047b7f969e Bug 1384821 - Optimize inherited cycle-collectible QueryInterface() implementations for nsCycleCollectionISupports; r=peterv 2017-08-14 12:42:01 -04:00