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

3853 Коммитов

Автор SHA1 Сообщение Дата
Nathan Froyd 32dc58b2ba Bug 1451255 - make nsTraceRefcnt handle multibyte characters in log files; r=mccr8
...on Windows, at least.  Apparently if you have environment variables
set that contain multibyte characters, and ask for them with getenv, you
get garbage.  Or perhaps you get something sensible, but then passing it
to fopen produces garbage.  Either way, the most reasonable way to
handle this is to use the Windows wide-character APIs all over.
2018-04-17 10:13:42 -04:00
Nicholas Nethercote 59e46f2358 Bug 1451535 - Remove NS_ConstExprIsAscii() functions. r=froydnj 2018-04-17 20:03:52 +09:00
Margareta Eliza Balazs dbef13782c Backed out 2 changesets (bug 1451278) for breaking windows pgo builds a=backout
Backed out changeset ac685df07bfc (bug 1451278)
Backed out changeset 5944ccd5060d (bug 1451278)
2018-04-16 21:41:03 +03:00
Nicholas Nethercote 2224229b3d Bug 1451278 - Remove NS_ConstExprIsAscii() functions. r=froydnj
MozReview-Commit-ID: DG2HUOa7x6y

--HG--
extra : rebase_source : a0e2f24f96cb688d11984827acb1361abc4988e6
2018-04-16 08:37:25 +10:00
Jeff Walden 821db93ccc Bug 1453456 - Replace nsCRT::IsAscii{Alpha,Digit} with mfbt/TextUtils.h versions. r=froydnj
--HG--
extra : rebase_source : b31986c0e6828be79442cfb0cf369eb80c232139
2018-04-12 20:19:30 -07:00
Honza Bambas 198d72916a Bug 1451686 - Allow also -MOZ_LOG/_FILE=value form of the logging arguments. r=erahm 2018-04-13 05:38:00 -04:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Karl Tomlinson 3481a11d87 bug 1328964 add CycleCollectedJSContext::IsSystemCaller() to make ThreadsafeIsSystemCaller() safe for worklets r=baku
MozReview-Commit-ID: Cg4OBbm5CwA

--HG--
extra : rebase_source : 9a113cf0f945bd48207e81f9fa08bcba1f35303c
2018-04-06 18:53:25 +12:00
Karl Tomlinson 2405fe930c bug 1328964 use nsContentUtils::GetCurrentJSContext() on all threads r=smaug
nsContentUtils::GetCurrentJSContextForThread() originally needed to use
workers::GetCurrentThreadJSContext() in
https://hg.mozilla.org/mozilla-central/rev/366a45b41539#l2.18
because CycleCollectedJS*()->Context() did not exist until
https://hg.mozilla.org/mozilla-central/rev/1a0cd542e1e9#l7.12

nsContentUtils::GetCurrentJSContext() is thread-safe since these changes:
https://hg.mozilla.org/mozilla-central/rev/e636c7186286#l3.12
https://hg.mozilla.org/mozilla-central/rev/c8029c072776#l2.12

MozReview-Commit-ID: 2f1eGS9uBBO

--HG--
extra : rebase_source : dad1d2084a63413c3975f9e7c66c6b06857c9f23
2018-04-09 12:11:18 +12:00
Karl Tomlinson ad9f69cbf9 bug 1328964 add CycleCollectedJSContext::GetAsWorkletJSContext() and use it in IsOnWorkletThread() r=smaug
MozReview-Commit-ID: BUujWXYho1G

--HG--
extra : rebase_source : 78bb6736f74bb59913bc9499fcfdf7b0baa7870d
2018-04-06 09:45:56 +12:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nika Layzell 58eeb66cb3 Bug 1438026 - Part 4: Remove the old nsPresState code completely, r=baku 2018-04-10 17:49:44 -04:00
Andreea Pavel 26f640b36b Backed out 4 changesets (bug 1366808) for Windows GPU leakchecks on a CLOSED TREE
Backed out changeset 23f60e5acaa2 (bug 1366808)
Backed out changeset bf2262b6aca8 (bug 1366808)
Backed out changeset 1fc82af3a155 (bug 1366808)
Backed out changeset 0649f0d9884b (bug 1366808)
2018-04-10 05:11:36 +03:00
Stephen A Pohl b40a23754c Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-04-09 20:16:31 -04:00
Honza Bambas 31c173ca8a Bug 1443892 - Add -MOZ_LOG and -MOZ_LOG_FILE command line arguments. r=erahm, r=nfroyd 2018-04-03 11:32:00 -04:00
Henri Sivonen 8402e1f7a2 Bug 1448772 - Avoid back-and-forth UTF-16 to UTF-8 to UTF-16 conversions in xpcom/base/MacHelpers.mm. r=mstange
MozReview-Commit-ID: LQ4ZMJzy5WI

--HG--
extra : rebase_source : 85320f3e0bcef7711517ecc1e5b7bc5ec074bda5
2018-03-26 10:49:02 +03:00
Masatoshi Kimura 2002810e0f Bug 1449082 - Make NS_IsAscii constexpr. r=froydnj
MozReview-Commit-ID: GbXFwCzUwgV

--HG--
extra : rebase_source : 4e7ceae0bda793247286901cfffdff5575800edb
2018-03-27 23:59:55 +09:00
Nicholas Nethercote bac452f9ad Bug 1411469 - Statically allocate static atoms. r=froydnj
Currently static atoms are stored on the heap, but their char buffers are
stored in read-only static memory.

This patch changes the representation of nsStaticAtom (thus making it a
non-trivial subclass of nsAtom). Instead of a pointer to the string, it now has
an mStringOffset field which is a 32-bit offset to the string. (This requires
placement of the string and the atom within the same object so that the offset
is known to be small. The docs and macros in nsStaticAtom.h handle that.)

Static and dynamic atoms now store their chars in different ways: nsStaticAtom
stores them inline, nsDynamicAtom has a pointer to separate storage. So
`mString` and GetStringBuffer() move from nsAtom to nsDynamicAtom.

The change to static atoms means they can be made constexpr and stored in
read-only memory instead of on the heap. On 64-bit this reduces the per-process
overhead by 16 bytes; on 32-bit the saving is 12 bytes. (Further reductions
will be possible in follow-up patches.)

The increased use of constexpr required multiple workarounds for MSVC.
- Multiple uses of MOZ_{PUSH,POP}_DISABLE_INTEGRAL_CONSTANT_OVERFLOW_WARNING to
  disable warnings about (well-defined!) overflow of unsigned integer
  arithmetic.
- The use of -Zc:externConstexpr on all files defining static atoms, to make
  MSVC follow the C++ standard(!) and let constexpr variables have external
  linkage.
- The use of -constexpr:steps300000 to increase the number of operations
  allowed in a constexpr value, in order to handle gGkAtoms, which requires
  hashing ~2,500 atom strings.

The patch also changes how HTML5 atoms are handled. They are now treated as
dynamic atoms, i.e. we have "dynamic normal" atoms and "dynamic HTML5 atoms",
and "dynamic atoms" covers both cases, and both are represented via
nsDynamicAtom. The main difference between the two kinds is that dynamic HTML5
atoms still aren't allowed to be used in various operations, most notably
AddRef()/Release(). All this also required moving nsDynamicAtom into the header
file.

There is a slight performance cost to all these changes: now that nsStaticAtom
and nsDynamicAtom store their chars in different ways, a conditional branch is
required in the following functions: Equals(), GetUTF16String(),
WeakAtom::as_slice().

Finally, in about:memory the "explicit/atoms/static/atom-objects" value is no
longer needed, because that memory is static instead of heap-allocated.

MozReview-Commit-ID: 4AxPv05ngZy
2018-03-26 11:18:31 +02:00
Steve Fink e0f4a04fd4 Bug 1447391 - Early return for strings and symbols when tracing for CC, r=mccr8
--HG--
extra : rebase_source : f4512c0ab8d7aac3f274d38b96594eb65fb149dd
2018-03-20 10:54:29 -07:00
Petr Sumbera c5a5409300 Bug 1446272 - Provide ResidentUniqueDistinguishedAmount() for Solaris. r=froydnj 2018-03-22 06:14:19 -07:00
Paul Adenot 816186a405 Bug 1447622 - Add a way to output raw MOZ_LOG, without prefixes. r=erahm
MOZ_LOG=modules:4,raw now outputs the log without prefixes with the thread name
and date and stuff, just the exact string that was specified.

MozReview-Commit-ID: HACT5EM4BFm

--HG--
extra : rebase_source : 93590ee405f013791ad63565be6e6d83cad3567f
extra : source : d79d7130b28275c8eb2a475bdc685a345b070888
2018-03-21 12:11:17 +01:00
Kyle Machulis e9c55b249d Bug 1406206 - Remove extraneous else block from cycle collection macros; r=froydnj
clang-tidy is complaining about an extra else in
NS_INTERFACE_MAP_ENTRIES_CYCLE_COLLECTION. Not hurting anything, but
could be cleaned up anyways.

MozReview-Commit-ID: 36Lkdhs3fyN

--HG--
extra : rebase_source : 74088c9c2668f43d55133be240d4591880b60dab
2018-03-14 15:36:59 -07:00
Nathan Froyd 10b5e09d51 Bug 1440166 - actually avoid races in refcount logging with named classes; rs=erahm 2018-03-14 17:03:52 -04:00
Nathan Froyd 1732506d79 Bug 1440166 - avoid races in refcount logging with named classes; r=mccr8 2018-03-14 09:49:19 -04:00
Nathan Froyd 075adc9ec6 Bug 1445584 - add a move assignment operator for nsCOMPtr; r=gerald
Somehow we didn't have this before.  The lack thereof was causing us to
do unnecessary things during event dispatch.
2018-03-14 08:22:30 -04:00
Olli Pettay 2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Tiberius Oros 61d400da1c Merge inbound to mozilla-central. a=merge 2018-03-01 19:29:00 +02:00
Csoregi Natalia 1fd0486e23 Backed out 7 changesets (bug 1193394) for browser-chrome failures on browser_ext_popup_background.js. CLOSED TREE
Backed out changeset 9683f24ff8ec (bug 1193394)
Backed out changeset 0e7140a7c841 (bug 1193394)
Backed out changeset a0e26f6b2784 (bug 1193394)
Backed out changeset 29e1fceaf48d (bug 1193394)
Backed out changeset b8632bbbd273 (bug 1193394)
Backed out changeset a54ef2d8f896 (bug 1193394)
Backed out changeset 55c94c05c57f (bug 1193394)
2018-03-01 16:29:02 +02:00
Olli Pettay b7726493fb Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Nicholas Nethercote 7ac2324679 Bug 1441430 - Provide more detail about atoms memory usage. r=froydnj
The old output had a single value: "atoms-table". The new output looks like
this:

> 649,904 B (00.39%) -- atoms
> ├──350,256 B (00.21%) -- dynamic
> │  ├──235,056 B (00.14%) ── unshared-buffers
> │  └──115,200 B (00.07%) ── atom-objects
> ├──212,992 B (00.13%) ── table
> └───86,656 B (00.05%) ── static/atom-objects

MozReview-Commit-ID: 924vUmxHAlh

--HG--
extra : rebase_source : 6c977546a69eeee62ebc87e335982e8278217484
2018-02-28 11:05:07 +11:00
Eugen Sawin ce66babc57 Bug 1441964 - [1.0] Return URI-load delegation success state instead of throwing. r=snorp 2018-02-28 21:02:35 +01:00
Nicholas Nethercote f76d17db0f Bug 529808 - Remove the static atom table. r=froydnj
Various atom-related things have improved recently.

- The main atom table is now threadsafe (bug 1275755) and so can be accessed on
  any thread. It has also been split into pieces (bug 1440824), which greatly
  reduces lock contention.

- A cache has been added to the HTML5 parser (bug 1352874) that removes the
  need for most of the full table lookups.

As a result, there is no point having a separate static atom table. This patch
removes it.

MozReview-Commit-ID: 8ou1BrnPAwd

--HG--
extra : rebase_source : 0c6ab073b1a20b703705582d28731a68456741e1
2018-02-28 07:34:12 +11:00
Francois Marier b401105973 Bug 1439455 - Display error names instead of codes in about:url-classifier. r=gcp
This also changes a few MOZ_LOG() messages to use the error name
instead of the raw numerical nsresult value.

MozReview-Commit-ID: Jcngd0S9j2z

--HG--
extra : rebase_source : f6e974569d8845211e0b25dabef2c41dda2ca1b6
2018-02-22 17:37:53 -08:00
Sylvestre Ledru b7b13979a7 Bug 1370794 - Use bool instead of integer being casted to bool r=Ehsan
MozReview-Commit-ID: lUVFeU0Y0p

--HG--
extra : rebase_source : c2dac9c0e0345111f68aea2b9e359ad94086430d
2018-02-07 15:15:28 +01:00
Chris Peterson 6955347be6 Bug 1330529 - Part 4: Fold nsSetDllDirectory.h into nsWindowsMain.cpp. r=jimm
nsSetDllDirectory.h consists of just one function definition, SanitizeEnvironmentVariables, which is now only called from nsWindowsMain.cpp. nsSetDllDirectory.h used to define its namesake NS_SetDllDirectory, but the function was removed in bug 699247.

Also remove some #includes that are no longer necessary.

MozReview-Commit-ID: E8OsXycdfO8

--HG--
extra : rebase_source : d9e63a50a782ab1fb0fde24646a777b882860fb9
extra : histedit_source : 63c41846db2bb6a1def03c343e6f336373f1fba6
2018-02-13 00:52:44 -08:00
Jason Orendorff e7c94fff59 Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h

--HG--
rename : js/src/jsalloc.h => js/public/AllocPolicy.h
rename : js/src/jsprf.h => js/public/Printf.h
rename : js/src/jsprototypes.h => js/public/ProtoKey.h
rename : js/src/jswrapper.h => js/public/Wrapper.h
rename : js/src/jsalloc.cpp => js/src/util/AllocPolicy.cpp
rename : js/src/jsprf.cpp => js/src/util/Printf.cpp
extra : rebase_source : 98b16d94c469202eab0303a8da844f1d0b6aa809
extra : amend_source : e0b16c1077226d6fe240f4d7096537f93b43f2b8
extra : histedit_source : d94e0ba7904a7d66742c7fac43f638aaec4fa4e5
2018-02-21 10:30:19 -06:00
Francois Marier 79391b9eea Bug 1439468 - Improve error reporting in Safe Browsing protocol parser. r=gcp
MozReview-Commit-ID: JeyCZSbdZBd

--HG--
extra : rebase_source : 84007af04f9dea05503eb44203e40079e6c7252d
2018-02-20 13:54:30 -08:00
Kirk Steuber 04e4231688 Bug 1421707 - Implement a system for disabling about: pages via Policy r=bz,Felipe
Additionally adds the enterprise policy for disabling about:config.

MozReview-Commit-ID: 7bT8eV3tRnN

--HG--
extra : rebase_source : a54cc94ea9dbecdfd37a17c96e5048a5d20c6411
2018-02-06 10:00:56 -08:00
Eric Rahm 87736606f3 Bug 1436768 - Avoid initializing LogModuleManager more than once. r=froydnj
This adds some assertions to make the intended usage of LogModuleManager::Init
more clear.

--HG--
extra : rebase_source : c61e1736cedfbeaa96951ba40cdc954bbc0094d5
2018-02-08 16:25:07 -08:00
Masatoshi Kimura 4872102e9d Bug 1428557 - Stop using GetNativePath in xpcom/. r=froydnj
MozReview-Commit-ID: GnSFQ1wprzb

--HG--
extra : rebase_source : 7c25e0361d7f4e8aea730672a931cf78a581e062
extra : intermediate-source : e055aee7306b6636d27abe6fc0b02012b0075260
extra : source : d0831f473c8f85996c106693c9a4ce3783dd9447
2017-12-15 06:53:37 +09:00
Boris Zbarsky 9bdcffc985 Bug 1436902 part 3. Replace usage of NS_IMPL_ISUPPORTS_INHERITED0 with NS_INLINE_DECL_REFCOUNTING_INHERITED when possible. r=mccr8
The change to RootAccessible.cpp fixes an obvious bug introduced in bug 741707.

The visibility changes in gfx/thebes are because NS_DECL_ISUPPORTS has a
trailing "public:" that those classes were relying on to have public
constructors.

MozReview-Commit-ID: IeB8KIJCGhU
2018-02-12 15:44:40 -05:00
Boris Zbarsky f86a73ccc5 Bug 1436902 part 1. Add a new NS_INLINE_DECL_REFCOUNTING_INHERITED macro that declares addref/release only for logging purposes. r=mccr8
MozReview-Commit-ID: JTT5RzJ7IVu
2018-02-12 15:43:48 -05:00
Nathan Froyd 0f56acaf26 Bug 1437604 - remove NS_INTERFACE_MAP_END_THREADSAFE; r=mystor
This macro is identical to NS_INTERFACE_MAP_END and encourages the
reader to think that there's something extra-special threadsafe about QI
implementations that use the macro, when in reality there's nothing of
the sort.
2018-02-12 14:36:46 -05:00
Sylvestre Ledru 4d11eb3e6a no bug, Align the \ at the end of the #defines DONTBUILD r=froydnj 2018-02-12 15:39:43 +01:00
Boris Zbarsky 4f2bf4184c Bug 1435483 part 21. Remove nsIException::ToString. r=qdot
MozReview-Commit-ID: 17yuhlqzbr2
2018-02-05 16:34:06 -05:00
Boris Zbarsky d023fa0839 Bug 1435483 part 20. Remove nsIException::GetData. r=qdot
MozReview-Commit-ID: 9cDzCeddOmh
2018-02-05 16:34:06 -05:00
Boris Zbarsky 2e3807bdc2 Bug 1435483 part 19. Remove nsIException::GetLocation. r=qdot
MozReview-Commit-ID: AbVQ7IA4xqp
2018-02-05 16:34:06 -05:00
Boris Zbarsky 3bf93ec28e Bug 1435483 part 18. Remove nsIException::GetResult. r=qdot
MozReview-Commit-ID: JArus2ddEsL
2018-02-05 16:34:06 -05:00
Boris Zbarsky 180fe6930c Bug 1435483 part 17. Remove nsIException::GetMessageMoz. r=qdot
MozReview-Commit-ID: GKzE812BfIF
2018-02-05 16:34:06 -05:00
Boris Zbarsky 12e9f78050 Bug 1435483 part 16. Switch to using dom::Exception, not nsIException, in C++ code. r=qdot
nsIException is builtinclass in idl, so whatever code we had to handle
non-dom::Exception nsIExceptions is dead code.

MozReview-Commit-ID: 6VnqDWt0041
2018-02-05 16:34:05 -05:00