browser/moz.build
author Nicholas Nethercote <nnethercote@mozilla.com>
Wed, 25 Oct 2017 10:22:38 +1100
changeset 387909 3d0093f961eec929caa370444cd0f7fcbfbc82bc
parent 376849 f3455c101b7a672cce40ecd64f332d5e6e2d9447
child 391231 44ad5267ace904c837b80ad073f4d744f2202d15
permissions -rw-r--r--
Bug 1410794 - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm. This makes the code nicer. In particular, it removes many getter_Copies() calls. The patch also converts a lot of nsCStrings to nsAutoCString, which will avoid heap allocation in the common case. The patch also renames PREF_CopyCharPref() as PREF_GetCStringPref(), because it's actually getting a string, not a char, and that matches the existing GetCString() and GetDefaultCString() methods. Correspondingly, it also renames PREF_SetCharPref() as PREF_SetCStringPref(). The |aPrefName| arguments in nsIPrefBranch.idl remain as |string| because they almost always involve passing in C string literals, and passing "foo" is much nicer than passing NS_LITERAL_CSTRING("foo"). It's worth noting that early versions of this patch used |AUTF8String| instead of |ACString|. But it turns out that libpref stores prefs internally as Latin1. And |ACString| is compatible with Latin1 but |AUTF8String| isn't, because non-ASCII Latin1 strings are not valid UTF-8!

# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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 http://mozilla.org/MPL/2.0/.

CONFIGURE_SUBST_FILES += ['installer/Makefile']

SPHINX_TREES['browser'] = 'docs'

DIRS += [
    'base',
    'components',
    'experiments',
    'fonts',
    'locales',
    'modules',
    'themes',
    'extensions',
]

DIRS += [
    'app',
]

if CONFIG['MAKENSISU']:
    DIRS += ['installer/windows']

TEST_DIRS += [
    'tools/mozscreenshots',
]

DIST_SUBDIR = 'browser'
export('DIST_SUBDIR')

if CONFIG['MOZ_ARTIFACT_BUILDS']:
    # Ensure a pre-built interfaces.xpt installed to the objdir by the artifact
    # code is included by the top-level chrome.manifest.
    EXTRA_COMPONENTS += [
        '../build/prebuilt-interfaces.manifest',
    ]

with Files("**"):
    BUG_COMPONENT = ("Firefox", "General")

with Files("Makefile.in"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("*.mk"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("**/moz.build"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("moz.configure"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("app.mozbuild"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("moz.build"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("confvars.sh"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("LICENSE"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("branding/**"):
    BUG_COMPONENT = ("Firefox", "General")

with Files("config/**"):
    BUG_COMPONENT = ("Core", "Build Config")

with Files("docs/**"):
    BUG_COMPONENT = ("Toolkit", "Telemetry")

with Files("docs/DirectoryLinksProvider.rst"):
    BUG_COMPONENT = ("Firefox", "New Tab Page")

with Files("fonts/**"):
    BUG_COMPONENT = ("Core", "Graphics: Text")

with Files("installer/**"):
    BUG_COMPONENT = ("Firefox", "Installer")

with Files("tools/**"):
    BUG_COMPONENT = ("Firefox", "General")