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

18719 Коммитов

Автор SHA1 Сообщение Дата
Andreea Pavel 21ad33d612 Backed out 10 changesets (bug 1513057) for build bustages on a CLOSED TREE
Backed out changeset 56329b5f1844 (bug 1513057)
Backed out changeset 46411c5de3da (bug 1513057)
Backed out changeset de65c456aad6 (bug 1513057)
Backed out changeset f648b5f1a7c2 (bug 1513057)
Backed out changeset 460bbf0849e1 (bug 1513057)
Backed out changeset 86032a14d26f (bug 1513057)
Backed out changeset a81f83df08d5 (bug 1513057)
Backed out changeset edbda5ee5fd5 (bug 1513057)
Backed out changeset c900ac2519f5 (bug 1513057)
Backed out changeset 4e94bbb90315 (bug 1513057)
2019-01-11 17:02:44 +02:00
Kershaw Chang 07a7cc19a1 Bug 1513057 - P3: Setup memory reporter on socket process r=dragana,mayhemer
To setup memory reporter on socket process, this patch modifies the PSocketProcess protocol to implement the same memory reporting functions as the PContent and PGPU protocols.

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

--HG--
extra : moz-landing-system : lando
2019-01-11 13:28:00 +00:00
Kershaw Chang 0c2943008a Bug 1513057 - P1: Start the new socket process basics (prefs, full xpcom init, logging, no sandboxing) r=mayhemer,dragana
Differential Revision: https://phabricator.services.mozilla.com/D14148

--HG--
extra : moz-landing-system : lando
2019-01-11 14:07:47 +00:00
Cameron McCormack 0de25813f2 Bug 1519011 - Make counterstyles.css sharable r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D16240

--HG--
extra : moz-landing-system : lando
2019-01-10 22:27:09 +00:00
Henri Sivonen 2daf725240 Bug 1514664 - Implement TextEncoder.encodeInto(). r=emk. 2019-01-11 12:35:17 +02:00
Olli Pettay 7a31419242 Bug 1518038 - Add nsIThread.hasPendingHighPriorityEvents, r=froydnj
--HG--
extra : rebase_source : 47de7758f551bfe873426c8f92e27ac84ad4d260
2019-01-10 19:07:34 +02:00
Bogdan Tara 3ca870b28b Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-01-10 19:27:05 +02:00
Henri Sivonen b10e89785b Bug 1515351 - Update encoding_rs to 0.8.14. r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D15934

--HG--
extra : moz-landing-system : lando
2019-01-10 09:42:39 +00:00
Nathan Froyd e7964cca4f Bug 1514044 - part 1 - macro-ify process enums, strings, and XRE functions; r=mccr8
Having this information all defined in a single header will make life
easier if we ever add new process types.
2019-01-10 10:52:51 -05:00
Nathan Froyd def9e5efca Bug 1514043 - change gecko media plugin process name; r=mccr8,bobowen,haik,chutten
The only visible change from this change is that telemetry will be
discontinuous.  The owners for the relevant telemetry probes have
reviewed this and indicated that this discontinuity is OK.
2019-01-10 10:52:51 -05:00
Eric Rahm 68491ea9df Bug 1437991 - Reduce scope of GetMainThread warning. r=froydnj
--HG--
extra : rebase_source : ec4e505fdefef42572e05a98348bef75473c8df2
2019-01-04 15:41:52 -08:00
Randell Jesup f75205467e Bug 1518030: add keyword to mirror LOG messages into Profiler LogMarkers r=mstange,froyd 2019-01-15 12:49:03 -05:00
Nathan Froyd 84a074ecfc Bug 1062533 - part 5 - add {Mutex,Monitor}::TryLock methods; r=mccr8
This plumbs the code from PlatformMutex up to the xpcom level.
2019-01-09 11:09:24 -04:00
Nathan Froyd fc065671fb Bug 1513615 - part 3 - do more work in nsTimerEvent's constructor; r=glandium
nsTimerEvent goes through a multi-step initialization for reasons that
are lost to time.  We are also seeing peculiar crashes in
`nsTimerEvent::SetTimer()` that are only explainable by `SetTimer`
finding a non-null pointer where there should have been a null pointer.
The compiler ought to have been able to optimize those bits away, but no
matter: we can do the job ourselves and make the code clearer.

Since we only call `SetTimer` once, we should just move its work into
nsTimerEvent's constructor.
2019-01-08 19:31:40 -05:00
Nathan Froyd 7cb315f948 Bug 1513615 - part 2 - move some code around in PostTimerEvent; r=glandium
Doing this code movement separately will ideally make the next part of
this work easier to review.  The idea is that we want to extract all the
necessary information from `timer` before we pass ownership of it into
the newly-allocated nsTimerEvent.
2019-01-08 19:31:40 -05:00
Nathan Froyd b9a6220890 Bug 1513615 - part 1 - tweak nsTimerEvent allocation; r=glandium
Unlike many of our uses of `new`, nsTimerEvent has its own definition of
`operator new`, to ensure instances are allocated through
TimerEventAllocator.  And allocating with TimerEventAllocator can fail.
Later changes, however, want to assume that constructing an nsTimerEvent
can't fail, which is difficult to guarantee with the current structure.

To make that guarantee, we need to make explicit what calling `new`
does: there's an "allocate memory" step and a "construct the object"
step.  The first part can fail, and that's what we care about here.
Once we have a chunk of memory, we can construct the object as normal,
secure in the knowledge that calling (placement) `new` is now guaranteed
to succeed.
2019-01-08 19:31:40 -05:00
Razvan Maries 83db861464 Merge mozilla-central to mozilla-inbound. a=merge on a CLOSED TREE 2019-01-09 00:11:59 +02:00
Nathan Froyd 21f7087c4e Bug 1517653 - part 0b - only initialize layout if we load chrome manifests; r=mccr8
The layout module initializes a bunch of things, specifically
XPConnect.  And if we're not loading chrome manifests, we shouldn't need
to initialize the layout module.
2019-01-08 15:56:58 -05:00
Nathan Froyd 86d082d5b1 Bug 1517653 - part 0a - invert the check for loading chrome manifests; r=mccr8
Checking that the current process type is not equal to some value
requires adding code when new process types are added.  Since it seems
reasonable to assume that all new process types aren't going to require
chrome manifests, let's make the code reflect that assumption as well,
and reduce the number of places you need to touch when adding a new
process type.
2019-01-08 15:56:58 -05:00
Jan de Mooij a0640935f5 Bug 1518077 part 2 - Add MEMORY_JS_REALMS_{USER,SYSTEM} similar to the MEMORY_JS_COMPARTMENTS_{USER,SYSTEM} counts. r=njn,chutten
Differential Revision: https://phabricator.services.mozilla.com/D15809

--HG--
extra : moz-landing-system : lando
2019-01-08 15:11:36 +00:00
Jan de Mooij 5b05f372ab Bug 1518077 part 1 - Fix MEMORY_JS_COMPARTMENTS_{USER,SYSTEM} telemetry to count number of compartments instead of realms. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D15808

--HG--
extra : moz-landing-system : lando
2019-01-08 15:11:08 +00:00
Cameron McCormack b05708ce89 Bug 1500362 - Make GkAtoms opaque to avoid lld-link.exe errors r=emilio
Depends on D15078

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

--HG--
extra : moz-landing-system : lando
2019-01-07 09:50:25 +00:00
bitnotri 542ea80ecd Bug 1461737 - Move nsstring-rs to a better location, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D15743

--HG--
rename : servo/support/gecko/nsstring/Cargo.toml => xpcom/rust/nsstring/Cargo.toml
rename : servo/support/gecko/nsstring/src/conversions.rs => xpcom/rust/nsstring/src/conversions.rs
rename : servo/support/gecko/nsstring/src/lib.rs => xpcom/rust/nsstring/src/lib.rs
extra : moz-landing-system : lando
2019-01-04 22:03:56 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Daniel Varga 6475e7a21d Merge mozilla-inbound to mozilla-central. a=merge 2019-01-03 18:22:07 +02:00
Gabriele Svelto cb1e8ac83e Bug 1386760 - Add a crash annotation containing the last executable we launched r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12643

--HG--
extra : moz-landing-system : lando
2019-01-02 14:54:58 +00:00
Jon Coppeard 20a91427ef Bug 1342012 - Support script and module private values which contain pointers to cycle-collected C++ objects r=jandem 2018-12-06 16:52:15 -05:00
Emilio Cobos Álvarez 4fd57b7de3 Bug 1516366 - Sprinkle some ToSupports around xpcom. r=froydnj
This will be needed for the next patches since the cast from nsIDocument* to
nsISupports* will become ambiguous, and I don't really want to replace all users
of nsCOMPtr<nsIDocument> with RefPtr.

We have ToSupports to handle this, so use it.

Differential Revision: https://phabricator.services.mozilla.com/D15350
2018-12-29 20:37:35 +01:00
Sylvestre Ledru cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
quasicomputational baf06c6032 Bug 1422235 - Implement the 'overflow-inline' media query. r=emilio 2018-12-28 02:16:59 +01:00
quasicomputational 20fa93316d Bug 1422235 - Implement the 'overflow-block' media query. r=emilio 2018-12-28 02:16:53 +01:00
Mike Hommey 3e7ea3053a Bug 1515832 - Don't build the xpcom standalone glue as a real static library. r=froydnj
This was necessary back when it still contained a lot of xpcom code, but
shouldn't be necessary now that it only contains two objects.

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

--HG--
extra : moz-landing-system : lando
2018-12-21 15:56:20 +00:00
Michael Froman c0a8a08f40 Bug 1500454 - remove PVideoDecoder, etc from dom namespace. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D15156

--HG--
extra : moz-landing-system : lando
2018-12-21 22:34:57 +00:00
Jan Henning 7fb92b8c44 Bug 1478776 - Part 10: Add internal VisualViewport resize/scroll events. r=botond,nika
The VisualViewport events are all nice and shiny, but unfortunately not quite
what is needed for the session store.

Firstly, the spec wants the "scroll" event to be fired only when the *relative*
offset between visual and layout viewport changes. The session store however
records the absolute offset and as such is interested in when *that* changes.

Secondly, again as per the spec the events don't bubble, and with the default
DOMEventTargetHelper implementation they don't escape the VisualViewport during
capturing, either. This means that any event listener must be added directly on
the VisualViewport itself in order to capture any events.

This might have been intended because the events use the same names as the
normal "scroll"/"resize" events, and as such you cannot specify separate event
listeners for VisualViewport and non-VisualViewport "scroll" events if both
events end up being dispatched to the same element (you can only try to filter
after the fact by looking at the originalTarget of the event).

At the same time, the VisualViewport is attached to the inner Window, and so
each time you navigate, you also get a different VisualViewport object.
All of this might be totally fine from the perspective of a page script, because
in that case you won't care anyway about what happens when the current page goes
away.

From the session store perspective on the other hand (especially Fennec's non-
e10s session store design), this is rather unfortunate because we don't want to
have to keep registering event listeners
a) manually for each subframe
b) each time the page navigates

The event target chain problem could be solved by letting the scroll events
escape the VisualViewport during the capturing phase (which the spec doesn't say
anything about), but this would mean that any scroll listener attached to a
window/browser/... that uses capturing will now catch both layout and visual
viewport scroll events.

In some cases this might even be beneficial, but in others (e.g. bug 1498812
comment 21) I'd like to specifically decide which kind of scroll event to
capture. Having to look at event.originalTarget to distinguish the two kinds
might be defensible in test code, but in case this distinction would be needed
in production code as well, given the existence of a C++-based filtering helper
in nsSessionStoreUtils for another use case where (scroll) events need to be
filtered, JS-based scroll event filtering might be a bad idea.

Additionally, in any case this wouldn't solve the fundamental conflict between
the spec and the session store about *when* the "scroll" event should be fired
in the first place.

Hence I'd like to introduce a separate set of events with distinct event names,
which will be dispatched according to the requirements of our internal users
(i.e. currently the session store). To avoid potential web compatibility issues
down the road, for now these events will be dispatched only to event listeners
registered in the system group (allowing *all* Chrome event listeners cannot be
done because checking the Chrome status of each event target might be too
expensive for frequently dispatched events).

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

--HG--
extra : moz-landing-system : lando
2018-12-20 22:14:42 +00:00
Razvan Maries f658ebcbab Merge mozilla-inbound to mozilla-central a=merge 2018-12-20 07:04:06 +02:00
Sylvestre Ledru b2099f351e Bug 1515434 - Only activate the deactivation of -Wc++2a-compat from clang 6 r=botond
Differential Revision: https://phabricator.services.mozilla.com/D15012

--HG--
extra : moz-landing-system : lando
2018-12-19 21:18:46 +00:00
Ehsan Akhgari aeb407a001 Bug 1515165 - Remove the eTLD+1 checks from the anti-tracking backend; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D14886

--HG--
extra : moz-landing-system : lando
2018-12-19 14:52:30 +00:00
Kris Maglione 3a49921a03 Bug 1513366: Part 2 - Update MemoryTelemetry to use do_ImportModule. r=erahm
It makes things much simpler.

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

--HG--
extra : rebase_source : cc49434f540a54f3993cea94707892af72b59bd6
2018-12-11 13:28:59 -08:00
arthur.iakab f1762a3667 Merge mozilla-central to mozilla-inbound 2018-12-18 07:36:08 +02:00
Jim Blandy 689eea27da Bug 1510768: Move SpiderMonkey promise interface into its own header. r=arai
Move js/src/jsapi.h declarations related to promises and job queues into their
own public header file, js/public/Promise.h. Change the compilation units that
need these declarations to #include the new header.

There should be no changes to the actual functionality here, simply moving the
code to a new file, and removing the "JS" prefix from some typedefs which are
now in the JS namespace.

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

--HG--
extra : moz-landing-system : lando
2018-12-17 23:21:04 +00:00
arthur.iakab e14d71a660 Merge mozilla-central to inbound
--HG--
rename : mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/ISurfaceAllocator.aidl => mobile/android/geckoview/src/main/aidl/org/mozilla/gecko/gfx/SyncConfig.aidl
extra : rebase_source : a7f6628299f30b300a02932debe0cc92810f901d
2018-12-18 00:04:04 +02:00
Jonathan Kingston c5d29c382e Bug 903372 - Remove xml:base from parser. r=hsivonen 2018-12-13 15:47:01 +00:00
Sylvestre Ledru bd9482e301 Bug 1509926 - Disable the warning -Wc++2a-compat on some files r=dholbert
Fails with clang trunk:
"type of UTF-8 string literal will change from array of const char to array of const char8_t in C++2a"
otherwise

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

--HG--
extra : moz-landing-system : lando
2018-12-17 06:56:45 +00:00
Cameron McCormack e8db2c5f88 Bug 1194856 - Remove UA style sheet load crash report annotations r=gsvelto,dbaron
This backs out the main patch landed earlier in bug 1194856 and the
patch from bug 1225004.

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

--HG--
extra : moz-landing-system : lando
2018-12-15 00:02:56 +00:00
Andrea Marchesini c7a7810165 Bug 1513890 - Get rid of x-moz-errormessage attribute, r=edgar 2018-12-15 09:54:02 +01:00
Cosmin Sabou b30ca1fd33 Merge mozilla-inbound to mozilla-central. a=merge 2018-12-15 04:47:12 +02:00
Mike Hommey 3cdfb81c07 Bug 1514104 - Remove vpx_mem_set_functions support. r=jya
vpx_mem_set_functions support is only enabled when
MOZ_VPX_NO_MEM_REPORTING is not set. It is currently set unconditionally
when building with the in-tree libvpx. When building with system libvpx,
it is set when the vpx_mem_set_functions can't be found in the system
libvpx library.

Upstream removed the vpx_mem_set_functions function in version 1.5, and
we require at least that version, meaning, in practice,
MOZ_VPX_NO_MEM_REPORTING is now always set.

We might as well remove the define and the code that's conditional to
not being defined.

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

--HG--
extra : moz-landing-system : lando
2018-12-14 09:07:18 +00:00
Sylvestre Ledru 6f45c666bc Bug 1513205 - Also update the tests to match the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-14 18:10:35 +00:00
Bogdan Tara 4cbc39232e Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-12-14 00:52:36 +02:00
Kris Maglione 525715ebe7 Bug 1513864: Don't divide by 0 when content processes report 0 USS. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D14476

--HG--
extra : rebase_source : 11e15de80f1d9a1e6af1e26bf4b3dbe63348c636
2018-12-13 10:01:13 -08:00
Jean-Yves Avenard f5a1ba9fc1 Bug 1443429 - P2. Fix constness. r=bholley
And minor C++ cleanup to keep the static analyser happy.

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

--HG--
extra : moz-landing-system : lando
2018-12-13 20:05:00 +00:00
Kris Maglione 7cbe858c62 Bug 1505522: Follow-up: Resolve gatherMemory() promise in release builds. r=me
--HG--
extra : amend_source : 71b9da131b80c5e269cd3c459306939bcada185a
2018-12-12 11:35:13 -08:00
Masatoshi Kimura baacff38c5 Bug 1514452 - Remove unused nsresult success codes. r=froydnj
--HG--
extra : rebase_source : 275e6d0c7537eda0cd70eeac7090afe6f09b8abc
extra : source : 95af4d25453ff9cf42ac8dcc0203d5dffafeabfe
2018-11-03 05:34:53 +09:00
Coroiu Cristina 3160ddc1f0 Merge inbound to mozilla-central a=merge 2018-12-12 07:12:07 +02:00
Jean-Yves Avenard cdec3ff52a Bug 1512456 - P9. Re-enable assertion. r=gerald
Depends on D14032

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

--HG--
extra : moz-landing-system : lando
2018-12-11 17:43:19 +00:00
Jean-Yves Avenard 38ed72f936 Bug 1512456 - P2. Make GenericPromise exclusive. r=gerald
We introduce GenericNonExclusivePromise	that can be used to explicitly state than non-exclusive use is needed

We temporarily disable the assertion ensuring a promise is used exclusively when needed to allow for things to settle.

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

--HG--
extra : moz-landing-system : lando
2018-12-11 10:46:17 +00:00
Brindusan Cristian 989d78f3d0 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-12-11 00:10:08 +02:00
Brindusan Cristian bc1f3670dc Merge autoland to mozilla-central. a=merge 2018-12-11 00:01:51 +02:00
Emilio Cobos Álvarez 26110eea9b Bug 1513015 - Remove unneeded inherit-scroll-behavior class. r=botond
Use a more general rule instead, since we add the class unconditionally.

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

--HG--
extra : moz-landing-system : lando
2018-12-10 18:03:44 +00:00
ffxbld 9ecff1011c Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2018-12-10 07:58:12 -08:00
Sylvestre Ledru ad75e912fb Bug 1512961 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2018-12-10 19:23:16 +00:00
Jean-Yves Avenard 44594dd77a Bug 1510265 - P1. Enforce template-parameter classes restrictions in MozPromise. r=gerald
And some required fixes to make things compile.

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

--HG--
extra : moz-landing-system : lando
2018-12-06 16:26:01 +00:00
Kris Maglione c13d380a26 Bug 1505522: Part 3 - Remove unused getHeapAllocatedAsync method. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13873

--HG--
extra : rebase_source : d8383668a568512574ce784b9d9c75ae432dcc96
2018-12-05 16:02:30 -05:00
Kris Maglione d79b3fbaf4 Bug 1505522: Part 2 - Migrate MemoryTelemetry.jsm to C++. r=erahm,chutten
This has benefits both in terms of performance and memory usage. Aside from
the obvious savings of not loading additional JS scripts in every process,
this also allows us to move more of our expensive data collection work to a
background thread, where it doesn't risk janking both parent and content
processes.

MozReview-Commit-ID: 2A593R7bIKB

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

--HG--
extra : rebase_source : ec634ee3a3b975809f542aa8077ad32236781452
2018-12-05 15:44:53 -05:00
Razvan Maries df67e7f070 Merge mozilla-inbound to mozilla-central a=merge 2018-12-04 23:53:17 +02:00
Haik Aftandilian a383b48b0a Bug 1511376 - Firefox crashes during startup when executed from tempdir r=Alex_Gaynor
Change nsMacUtilsImpl::GetAppPath() to not depend on the app bundle ending in ".app".

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

--HG--
extra : moz-landing-system : lando
2018-12-04 19:02:06 +00:00
Jorg K 5a6ca9bbf4 Bug 1511692 - suppress warning for NS_BASE_STREAM_CLOSED from base streams Available() call. r=baku 2018-12-04 00:48:00 +02:00
Brian Hackett 8362865d65 Bug 1510724 Part 1 - Add accessor for wrapped PLDHashTable operations, r=froydnj.
--HG--
extra : rebase_source : 49cb109c6c0b630feab52e82a711249b5c2443ea
2018-11-28 09:09:01 -10:00
Steve Fink 10953d54c2 Bug 1513108 - Remove the separate class extension hook for getting a weakmap key delegate, r=jonco
Replace with just unwrapping the key, since there are no users that return anything else for a delegate.

--HG--
extra : rebase_source : e72b825121ca3493364c9347f65e5dddd1ef53e0
2018-12-07 14:38:01 -08:00
Nathan Froyd 5b851f9038 Bug 1515376 - remove aggregation support from nsProperties; r=mccr8
This support is currently unused.
2018-12-19 13:16:43 -05:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andreea Pavel 0c29092e41 Backed out 2 changesets (bug 903372) for multiple failures on a CLOSED TREE
Backed out changeset bf919773f9d1 (bug 903372)
Backed out changeset 6562c2392ac9 (bug 903372)
2018-11-30 04:16:21 +02:00
Jonathan Kingston 7c7d460eaa Bug 903372 - Remove xml:base from parser. r=hsivonen 2018-10-21 12:55:44 +01:00
Andrew McCreight 6e20b07cec Bug 1511141 - Disable formatting for more MOZ_COLLECT_REPORT calls. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13463

--HG--
extra : moz-landing-system : lando
2018-11-29 21:41:48 +00:00
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Andrew McCreight b8e492eeff Bug 1508818, part 5 - Disable Clang formatting in a few places in xpcom/. r=froydnj
nsCRTGlue.cpp has a few data tables that get broken up badly by
clang-format, so just disable the formatting. There are some more
tables in this file, but the arrangement doesn't seem to matter for
them.

The bloat log header is just a little bit of ASCII art, so just ignore
it in formatting so it is easier to read.

MOZ_COLLECT_REPORT uses very wide string constants that get rewrapped
in an ugly way by clang-format, so just disable the formatting for
them.

Depends on D13185

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:13 +00:00
Andrew McCreight ec00ed2fca Bug 1508818, part 4 - Rearrange various string literals so they fit in 80 columns. r=froydnj
clang-format doesn't seem to reflow text when a single string constant
is represented as multiple lines of string literals to fit within 80
columns. Instead, if a single string literal is too long, it breaks
off a piece and moves it to the next line, which leads to a bunch of
choppy short string bits. The resulting string literals are still a
bit choppy, mostly because I didn't want to break up the long names of
prefs.

Here's an example of what I mean:

|--- max width --- |
"some long string literal"
"is here but it goes on for multiple lines"

This gets turned into:

|--- max width --- |
"some long string "
"literal"
"is here but it "
"goes on for multiple lines"

My patch manually would turn this into:

|--- max width --- |
"some long string "
"literal is here "
"but it goes on "
"for multiple lines"

The strings in my patch don't always end up at column 80, because the
width is set to work with wherever clang format ends up actually
indenting them.

There are more instances of this problem when MOZ_COLLECT_REPORT is
used, but that can be dealt with in another bug. There are a ton of
them.

Depends on D13184

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:53 +00:00
Andrew McCreight 68a1d4dad7 Bug 1508818, part 3 - Shrink comments so they don't get poorly reflowed by clang-format. r=froydnj
Clang format does not always reflow comments correctly to get them
within 80 columns.

The major categories of failures I have noticed in xpcom/ are:

- Comments that are lists. I fixed these by manually getting them so
  they'll be within 80 columns after clang-format runs.

- Comments intermixed with lists of things like enums, initializers,
  or even fields in a class. It doesn't seem to associate the comment
  with the item in the list correctly. The worst cases of these happen
  when it changes initializer lists from having commas at the start of
  each item to having them at the end. In the initializer comma cases,
  I fixed them by making the commas at the end, so clang-format won't
  mix things up. For other cases, I often moved the comment for an
  item onto its own line, because it was not possible to have both the
  comment and the item on the same line and stay within 80 columns.

- One odd case is nsEnumeratorUtils.cpp, where the end of line comment
  after a NS_DECL macro confused clang-format and made it stop
  realizing that the NS_DECL thing was a complete statement. I also
  added a blank line to that file before a declaration because I think
  that is better.

Depends on D13183

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:09 +00:00
Andrew McCreight a22e686056 Bug 1508818, part 2 - Remove DEBUG_rickg from nsDeque.cpp. r=froydnj
Clang format makes this code look pretty bad, but I think it is safe
to just remove it.

Depends on D13182

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

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:07 +00:00
Gabriele Svelto 19e52bebd4 Bug 1510582 - Remove useless inclusions of Services.h r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13240

--HG--
extra : moz-landing-system : lando
2018-11-28 17:25:23 +00:00
Sylvestre Ledru ef05004811 Bug 1503537 - Get rid of the pdfium & mortar code r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D10352

--HG--
extra : moz-landing-system : lando
2018-11-28 19:31:21 +00:00
Henri Sivonen ba2dc95baf Bug 1493458 - Disable an intermittently failing part of SetCapacity tests. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D13230

--HG--
extra : moz-landing-system : lando
2018-11-28 17:20:33 +00:00
Emilio Cobos Álvarez b65d0757d1 Bug 1509720 - Inline atom refcounting. r=njn
We're paying two function calls from Gecko_AddRefAtom /
Gecko_ReleaseAtom for no good reason, plus it's simple enough it's probably
worth to inline it anyway for C++ callers.

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

--HG--
extra : moz-landing-system : lando
2018-11-28 15:03:40 +00:00
Jeff Walden 3093d025b8 Bug 1510012 - Move Symbol-related APIs out of jsapi.h into js/public/Symbol.h. r=sfink, r=mccr8 for the bindings change
--HG--
extra : rebase_source : 3a8d2d694052435fbc47b9131a521e31e9b0ea6f
2018-11-24 12:21:40 -08:00
Brian Hackett bc768880cb Bug 1508099 Part 1 - Add macros for recording refcounts on non-nsISupports classes, r=froydnj.
--HG--
extra : rebase_source : 11ad0ead65762e2c004f74bbdd328200f7a0f5fa
2018-11-17 12:54:55 -10:00
Nathan Froyd 790af83dcc Bug 1460674 - part 3 - make PLDHashTable iteration faster; r=njn
The core loop of Iterator::Next() requires multiple branches, one to
check for entry liveness and one to check for wraparound.  We can
rewrite this to use masking instead, as well as iterating only over the
hashes, and reconstructing the entry pointer when we know we've reached
a live entry.  This change cuts the time taken on the collections
benchmark by the iteration portion in half.
2018-11-26 16:24:50 -05:00
Nathan Froyd 529e9249dd Bug 1460674 - part 2 - reorganize PLDHashTable's internal storage; r=njn
As discussed in the previous commit message, PLDHashTable's storage
wastes space for common entry types.  This commit reorganizes the
storage to store all the hashes packed together, followed by all the
entries, which eliminates said waste.
2018-11-26 16:24:50 -05:00
Nathan Froyd d848c8a50e Bug 1460674 - part 1 - change PLDHashTable internals to work on slots; r=njn
PLDHashTable requires that all items stored therein inherit from
PLDHashEntryHdr:

struct PLDHashEntryHdr {
  // PLDHashNumber is a uint32_t.
  PLDHashNumber mKeyHash; // Cached hash key for object.
};

class MyType : public PLDHashEntryHdr {
  // Data members, etc.
};

PLDHashEntryHdr::mKeyHash is used to cache the computed hash value of
the entry, so we aren't rehashing entries on every lookup/add/etc.

Because of structure layout requirements on 64-bit platforms, the data
members of MyType will typically start at offset 8:

MyType, offset 0: mKeyHash
MyType, offset 4: padding required by alignment
MyType, offset 8: first data member of MyType
MyType, offset N: ...

The padding at offset 4 is dead, unused space.

We'd like to change this state of affairs by having PLDHashTable manage
the cached hash key itself, which would eliminate the dead space in the
object and would enable packing the table storage more tightly.  But
PLDHashTable pervasively assumes that its internal storage is an array
of PLDHashEntryHdrs (with an associated object size to account for
subclassing).

As a first step to laying out the hash table storage differently, we
have to make the internals of PLDHashTable not access PLDHashEntryHdr
items directly, but layer an abstraction on top.  We call this
abstraction "slots": a slot represents storage for the cached hash key
and the associated entry, and can produce a PLDHashEntryHdr* on demand.
2018-11-26 16:24:50 -05:00
Nathan Froyd 7c8ce06436 Bug 1460674 - part 0b - stop trying to be const-correct in Get(); r=njn
The only place where this is used where the const-ness matters is in
AddressEntry, and that use const_cast's away the const-ness.  So let's
just ditch the method that attempts to return const pointers.
2018-11-26 16:24:50 -05:00
Nathan Froyd d98ab29fdb Bug 1460674 - part 0a - store the hash table entry size in iterators; r=njn
This change is satisfying insofar as it removes a load from every
iteration step over the hashtable, but it doesn't seem to affect
our collection benchmarks in any way.  The change does not make
iterators any larger, as there is padding at the end of the iterator
structure on both 32- and 64-bit platforms.
2018-11-26 16:24:50 -05:00
Nathan Froyd eaf93d7334 Bug 1509916 - use less C-style casting in nsTHashtable.h; r=erahm 2018-11-26 12:39:11 -05:00
Valentin Gosu 66d5164c37 Bug 1502097 - (Part 2) Define IDN blocklist as ranges of characters [ {firstChar, lastChar}* ] r=jfkthame,dragana
* Changes the format of the blocklist from a list of characters to a list of
  character ranges. Binary search still works, and it is easier to include
  large ranges of characters in the blocklist.
* Moves logic for handling the blocklist to IDNBlocklistUtils.h/.cpp
* Changes NS_EscapeURL to take a function that determines if a character
  is blocked. This way the type of the array doesn't matter.

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

--HG--
extra : moz-landing-system : lando
2018-11-24 12:04:34 +00:00
Andrea Marchesini 888416a7cc Bug 1435899 - Close underlying stream in NonBlockingAsyncInputStream sooner. r=froydnj
--HG--
extra : rebase_source : 4cbaa004bba9c81347468025d06d51a037530f4c
2018-02-27 02:03:00 -05:00
Henri Sivonen 8fcc9dd87c Bug 1493458 - Free string buffer using Truncate() after testing SetCapacity(). r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D12538

--HG--
extra : moz-landing-system : lando
2018-11-21 15:27:04 +00:00
Tim Nguyen 044d8ca731 Bug 1508142 - Remove remains of tree cell-based selection code. r=bzbarsky,bgrins
Differential Revision: https://phabricator.services.mozilla.com/D12225

--HG--
extra : moz-landing-system : lando
2018-11-22 09:59:02 +00:00
Yaron Tausky 103bf1caae Bug 1508627: Remove dangerous assertion from nsCOMPtr r=froydnj
Move constructors and assignment operators are expected to be safe and
infallible. In debug mode, nsCOMPtr's move functions called a test function
that modified the pointee's refcount -- a potentially thread unsafe operation
that also opened the door to assertion failures if the pointee implemented
some access checks in AddRef() or Release(). This commit removes this function
call in those two functions.

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

--HG--
extra : moz-landing-system : lando
2018-11-21 14:50:58 +00:00
Gerald Squelart 1bd6a1fd4e Bug 1435091 - p4. Use profiler_thread_is_being_profiled() instead of profiler_is_active() around profiler_add_marker()s - r=mstange
(Unless there were other profiler actions, as I'm not sure yet whether it would
be safe to skip them when the profiler is paused; another bug should
investigate that.)

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

--HG--
extra : moz-landing-system : lando
2018-11-19 06:29:15 +00:00
Paolo Amadini 9004df8f9b Bug 1499947 - Part 2 - Remove the "progressmeter" element and related tests. r=bgrins,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D12145

--HG--
extra : rebase_source : a322611933b371e726b25dd4223456a8f761e886
2018-11-20 14:12:33 +00:00