author Mike Hommey <>
Fri, 05 Apr 2019 02:30:56 +0000
changeset 468491 60669a841a87644ba9b2f4d9f17f225e2eca0980
parent 94475 f4157e8c410708d76703f19e4dfb61859bfe32d8
permissions -rwxr-xr-x
Bug 1541792 - Replace linker magic with manual component registration. r=froydnj Before bug 938437, we had a rather large and error-prone nsStaticXULComponents.cpp used to register all modules. That was replaced with clever use of the linker, which allowed to avoid the mess that maintaining that file was. Fast forward to now, where after bug 1524687 and other work that preceded it, we have a much smaller number of remaining static xpcom components, registered via this linker hack, and don't expect to add any new ones. The list should eventually go down to zero. Within that context, it seems to be the right time to get rid of the magic, and with it the problems it causes on its own. Some of those components could probably be trivially be converted to static registration via .conf files, but I didn't want to deal with the possible need to increase the number of dummy modules in XPCOMInit.cpp. They can still be converted as a followup. Differential Revision:

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at

# Find Mozilla PID and send it a signal, to be used
# with the jprof tool.

jpsignal_usage() {
  echo "Usage: jprofsig [start|stop]"
  exit 1

if [ $# != 1 ]; then
  echo "Wrong number of arguments."


# Find & print mozilla PID
tmpmoz=`ps aux | grep mozilla-bin | head -1 | awk '{ print $2 }'`
echo "Mozilla PID = $tmpmoz"

# See how we were called.
case "$jpsignal_arg" in
    if [ "$JP_REALTIME" = 1 ]; then
      kill -ALRM $tmpmoz
      # Normal, non-realtime mode.
      kill -PROF $tmpmoz
    kill -USR1 $tmpmoz
    exit 1

exit 0