Merge inbound to central, a=merge

This commit is contained in:
Wes Kocher 2015-07-20 16:32:38 -07:00
commit c60c80bcdc
43 changed files with 256 additions and 114 deletions

View File

@ -178,20 +178,31 @@ DocAccessibleParent::RecvTextChangeEvent(const uint64_t& aID,
bool
DocAccessibleParent::RecvBindChildDoc(PDocAccessibleParent* aChildDoc, const uint64_t& aID)
{
// One document should never directly be the child of another.
// We should always have at least an outer doc accessible in between.
MOZ_ASSERT(aID);
if (!aID)
return false;
auto childDoc = static_cast<DocAccessibleParent*>(aChildDoc);
DebugOnly<bool> result = AddChildDoc(childDoc, aID, false);
bool result = AddChildDoc(childDoc, aID, false);
MOZ_ASSERT(result);
return true;
return result;
}
bool
DocAccessibleParent::AddChildDoc(DocAccessibleParent* aChildDoc,
uint64_t aParentID, bool aCreating)
{
ProxyAccessible* outerDoc = mAccessibles.GetEntry(aParentID)->mProxy;
if (!outerDoc)
// We do not use GetAccessible here because we want to be sure to not get the
// document it self.
ProxyEntry* e = mAccessibles.GetEntry(aParentID);
if (!e)
return false;
ProxyAccessible* outerDoc = e->mProxy;
MOZ_ASSERT(outerDoc);
aChildDoc->mParent = outerDoc;
outerDoc->SetChildDoc(aChildDoc);
mChildDocs.AppendElement(aChildDoc);

View File

@ -334,7 +334,6 @@ pref("media.video-queue.default-size", 3);
// optimize images' memory usage
pref("image.downscale-during-decode.enabled", true);
pref("image.mem.allow_locking_in_content_processes", true);
pref("image.decode.retry-on-alloc-failure", true);
// Limit the surface cache to 1/8 of main memory or 128MB, whichever is smaller.
// Almost everything that was factored into 'max_decoded_image_kb' is now stored
// in the surface cache. 1/8 of main memory is 32MB on a 256MB device, which is

View File

@ -7,6 +7,7 @@ let gTests;
function test() {
waitForExplicitFinish();
requestLongerTimeout(2);
requestCompleteLog();
gTests = runTest();
gTests.next();
}

View File

@ -1,6 +1,7 @@
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
mk_add_options MOZ_PGO=1

View File

@ -1,6 +1,6 @@
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
MOZ_AUTOMATION_L10N_CHECK=0

View File

@ -1,7 +1,7 @@
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
ac_add_options --enable-signmar
ac_add_options --enable-profiling
ac_add_options --enable-verify-mar
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling and debugging and only increases the package size

View File

@ -3,6 +3,7 @@
. "$topsrcdir/browser/config/mozconfigs/linux32/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
mk_add_options MOZ_PGO=1

View File

@ -1,6 +1,7 @@
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
mk_add_options MOZ_PGO=1

View File

@ -1,6 +1,6 @@
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
MOZ_AUTOMATION_L10N_CHECK=0

View File

@ -1,7 +1,7 @@
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
ac_add_options --enable-signmar
ac_add_options --enable-profiling
ac_add_options --enable-verify-mar
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling and debugging and only increases the package size

View File

@ -3,6 +3,7 @@
. "$topsrcdir/browser/config/mozconfigs/linux64/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
mk_add_options MOZ_PGO=1

View File

@ -1,6 +1,7 @@
. "$topsrcdir/browser/config/mozconfigs/macosx-universal/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

View File

@ -1,7 +1,7 @@
. "$topsrcdir/browser/config/mozconfigs/macosx-universal/common-opt"
ac_add_options --disable-install-strip
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
ac_add_options --enable-profiling
ac_add_options --enable-instruments
ac_add_options --enable-dtrace

View File

@ -3,6 +3,7 @@
. "$topsrcdir/browser/config/mozconfigs/macosx-universal/common-opt"
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
# defines.sh during the beta cycle

View File

@ -2,7 +2,7 @@
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
# Needed to enable breakpad in application.ini
@ -20,5 +20,6 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/macosx/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

View File

@ -1,6 +1,6 @@
. $topsrcdir/build/macosx/mozconfig.common
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
ac_add_options --with-google-oauth-api-keyfile=/builds/google-oauth-api.key
# Needed to enable breakpad in application.ini
@ -18,5 +18,6 @@ export MOZ_PACKAGE_JSSHELL=1
ac_add_options --with-branding=browser/branding/nightly
. "$topsrcdir/build/macosx/mozconfig.rust"
. "$topsrcdir/build/mozconfig.common.override"
. "$topsrcdir/build/mozconfig.cache"

View File

@ -20,9 +20,6 @@ for platform in ['linux32', 'linux64', 'macosx-universal']:
'mk_add_options MOZ_MAKE_FLAGS="-j4"',
]
for platform in ['linux32', 'linux64', 'macosx-universal', 'win32', 'win64']:
whitelist['nightly'][platform] += ['ac_add_options --enable-signmar']
whitelist['nightly']['linux32'] += [
'CXX=$REAL_CXX',
'CXX="ccache $REAL_CXX"',

View File

@ -4,5 +4,6 @@
mk_add_options MOZ_PGO=1
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
. "$topsrcdir/build/mozconfig.common.override"

View File

@ -5,7 +5,7 @@ MOZ_AUTOMATION_L10N_CHECK=0
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-profiling # needed for --enable-dmd to work on Windows
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
ac_add_options --enable-require-all-d3dc-versions
if [ -f /c/builds/google-oauth-api.key ]; then

View File

@ -1,8 +1,8 @@
. "$topsrcdir/build/mozconfig.win-common"
. "$topsrcdir/browser/config/mozconfigs/win32/common-opt"
ac_add_options --enable-signmar
ac_add_options --enable-profiling
ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly

View File

@ -6,6 +6,7 @@
mk_add_options MOZ_PGO=1
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
# defines.sh during the beta cycle

View File

@ -5,5 +5,6 @@
mk_add_options MOZ_PGO=1
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
. "$topsrcdir/build/mozconfig.common.override"

View File

@ -8,7 +8,7 @@ ac_add_options --host=x86_64-pc-mingw32
ac_add_options --enable-debug
ac_add_options --enable-dmd
ac_add_options --enable-profiling # needed for --enable-dmd to work on Windows
ac_add_options --enable-signmar
ac_add_options --enable-verify-mar
if [ -f /c/builds/google-oauth-api.key ]; then
_google_oauth_api_keyfile=/c/builds/google-oauth-api.key

View File

@ -2,8 +2,8 @@
. "$topsrcdir/browser/config/mozconfigs/win64/common-win64"
. "$topsrcdir/browser/config/mozconfigs/win64/common-opt"
ac_add_options --enable-signmar
ac_add_options --enable-profiling
ac_add_options --enable-verify-mar
ac_add_options --with-branding=browser/branding/nightly

View File

@ -7,6 +7,7 @@
mk_add_options MOZ_PGO=1
ac_add_options --enable-official-branding
ac_add_options --enable-verify-mar
# safeguard against someone forgetting to re-set EARLY_BETA_OR_EARLIER in
# defines.sh during the beta cycle

View File

@ -15,5 +15,12 @@
"algorithm": "sha512",
"filename": "sccache.tar.bz2",
"unpack": true
},
{
"size": 86474070,
"digest": "85d528ba396d35e38280d01586d91c082a57846fb82c471579632995565caa54320b083581b04d96e526efa6cef53ea076a32c25f220f7f32f651a4dfdf30e31",
"algorithm": "sha512",
"filename": "rustc.tar.gz",
"unpack": true
}
]

View File

@ -10,7 +10,6 @@ MOZ_PHOENIX=1
if test "$OS_ARCH" = "WINNT"; then
MOZ_MAINTENANCE_SERVICE=1
MOZ_VERIFY_MAR_SIGNATURE=1
if ! test "$HAVE_64BIT_BUILD"; then
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
@ -21,8 +20,6 @@ if test "$OS_ARCH" = "WINNT"; then
fi
fi
fi
elif test "$OS_ARCH" = "Darwin"; then
MOZ_VERIFY_MAR_SIGNATURE=1
fi
# Enable building ./signmar and running libmar signature tests

View File

@ -245,7 +245,7 @@ def bootstrap(topsrcdir, mozilla_dir=None):
return
# The environment is likely a machine invocation.
if not sys.stdin.isatty():
if sys.stdin.closed or not sys.stdin.isatty():
return
# Mercurial isn't managing this source checkout.

View File

@ -0,0 +1,5 @@
# Options to enable rust in automation builds.
RUSTC="$topsrcdir/rustc/bin/rustc"
mk_add_options "export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$topsrcdir/rustc/lib"
ac_add_options --enable-rust

View File

@ -1211,11 +1211,25 @@ TabParent::RecvPDocAccessibleConstructor(PDocAccessibleParent* aDoc,
#ifdef ACCESSIBILITY
auto doc = static_cast<a11y::DocAccessibleParent*>(aDoc);
if (aParentDoc) {
// A document should never directly be the parent of another document.
// There should always be an outer doc accessible child of the outer
// document containing the child.
MOZ_ASSERT(aParentID);
if (!aParentID) {
return false;
}
auto parentDoc = static_cast<a11y::DocAccessibleParent*>(aParentDoc);
return parentDoc->AddChildDoc(doc, aParentID);
} else {
// null aParentDoc means this document is at the top level in the child
// process. That means it makes no sense to get an id for an accessible
// that is its parent.
MOZ_ASSERT(!aParentID);
if (aParentID) {
return false;
}
doc->SetTopLevel();
a11y::DocManager::RemoteDocAdded(doc);
}

View File

@ -261,7 +261,6 @@ private:
DECL_GFX_PREF(Once, "image.cache.size", ImageCacheSize, int32_t, 5*1024*1024);
DECL_GFX_PREF(Once, "image.cache.timeweight", ImageCacheTimeWeight, int32_t, 500);
DECL_GFX_PREF(Live, "image.decode-immediately.enabled", ImageDecodeImmediatelyEnabled, bool, false);
DECL_GFX_PREF(Once, "image.decode.retry-on-alloc-failure", ImageDecodeRetryOnAllocFailure, bool, false);
DECL_GFX_PREF(Live, "image.downscale-during-decode.enabled", ImageDownscaleDuringDecodeEnabled, bool, true);
DECL_GFX_PREF(Live, "image.high_quality_downscaling.enabled", ImageHQDownscalingEnabled, bool, false);
DECL_GFX_PREF(Live, "image.high_quality_downscaling.min_factor", ImageHQDownscalingMinFactor, uint32_t, 1000);

View File

@ -263,7 +263,6 @@ RasterImage::RasterImage(ImageURL* aURI /* = nullptr */) :
#endif
mSourceBuffer(new SourceBuffer()),
mFrameCount(0),
mRetryCount(0),
mHasSize(false),
mTransient(false),
mSyncLoad(false),
@ -1371,31 +1370,6 @@ RasterImage::CanDiscard() {
!mAnim; // Can never discard animated images
}
class RetryDecodeRunnable : public nsRunnable
{
public:
RetryDecodeRunnable(RasterImage* aImage,
const IntSize& aSize,
uint32_t aFlags)
: mImage(aImage)
, mSize(aSize)
, mFlags(aFlags)
{
MOZ_ASSERT(aImage);
}
NS_IMETHOD Run()
{
mImage->RequestDecodeForSize(mSize, mFlags);
return NS_OK;
}
private:
nsRefPtr<RasterImage> mImage;
const IntSize mSize;
const uint32_t mFlags;
};
// Sets up a decoder for this image.
already_AddRefed<Decoder>
RasterImage::CreateDecoder(const Maybe<IntSize>& aSize, uint32_t aFlags)
@ -1461,32 +1435,6 @@ RasterImage::CreateDecoder(const Maybe<IntSize>& aSize, uint32_t aFlags)
decoder->SetImageIsLocked();
}
if (aSize && decoder->HasError()) {
if (gfxPrefs::ImageDecodeRetryOnAllocFailure() &&
mRetryCount < 10) {
// We couldn't allocate the first frame for this image. We're probably in
// a temporary low-memory situation, so fire off a runnable and hope that
// things have improved when it runs. (Unless we've already retried 10
// times in a row, in which case just give up.)
mRetryCount++;
if (decoder->ImageIsLocked()) {
UnlockImage();
}
decoder->TakeProgress();
decoder->TakeInvalidRect();
nsCOMPtr<nsIRunnable> runnable =
new RetryDecodeRunnable(this, *aSize, aFlags);
NS_DispatchToMainThread(runnable);
return nullptr;
}
} else {
// We didn't encounter an error when allocating the first frame.
mRetryCount = 0;
}
decoder->SetIterator(mSourceBuffer->Iterator());
// Set a target size for downscale-during-decode if applicable.

View File

@ -407,9 +407,6 @@ private: // data
// The number of frames this image has.
uint32_t mFrameCount;
// The number of times we've retried decoding this image.
uint8_t mRetryCount;
// Boolean flags (clustered together to conserve space):
bool mHasSize:1; // Has SetSize() been called?
bool mTransient:1; // Is the image short-lived?

View File

@ -6888,13 +6888,7 @@ class MPhi final
// Appends a new input to the input vector. May perform reallocation.
// Prefer reserveLength() and addInput() instead, where possible.
bool addInputSlow(MDefinition* ins) {
// Use growByUninitialized and placement-new instead of just append,
// similar to what addInput does.
if (!inputs_.growByUninitialized(1))
return false;
new (&inputs_.back()) MUse(ins, this);
return true;
return inputs_.emplaceBack(ins, this);
}
// Update the type of this phi after adding |ins| as an input. Set

View File

@ -930,28 +930,24 @@ SavedStacks::insertFrames(JSContext* cx, FrameIter& iter, MutableHandleSavedFram
}
AutoLocationValueRooter location(cx);
{
AutoCompartment ac(cx, iter.compartment());
if (!cx->compartment()->savedStacks().getLocation(cx, iter, &location))
return false;
}
// Use growByUninitialized and placement-new instead of just append.
// We'd ideally like to use an emplace method once Vector supports it.
if (!stackChain->growByUninitialized(1)) {
auto displayAtom = iter.isNonEvalFunctionFrame() ? iter.functionDisplayAtom() : nullptr;
if (!stackChain->emplaceBack(location->source,
location->line,
location->column,
displayAtom,
nullptr,
nullptr,
iter.compartment()->principals()))
{
ReportOutOfMemory(cx);
return false;
}
new (&stackChain->back()) SavedFrame::Lookup(
location->source,
location->line,
location->column,
iter.isNonEvalFunctionFrame() ? iter.functionDisplayAtom() : nullptr,
nullptr,
nullptr,
iter.compartment()->principals()
);
++iter;
@ -1011,13 +1007,10 @@ SavedStacks::adoptAsyncStack(JSContext* cx, HandleSavedFrame asyncStack,
SavedFrame::AutoLookupVector stackChain(cx);
SavedFrame* currentSavedFrame = asyncStack;
for (unsigned i = 0; i < maxFrameCount && currentSavedFrame; i++) {
// Use growByUninitialized and placement-new instead of just append.
// We'd ideally like to use an emplace method once Vector supports it.
if (!stackChain->growByUninitialized(1)) {
if (!stackChain->emplaceBack(*currentSavedFrame)) {
ReportOutOfMemory(cx);
return false;
}
new (&stackChain->back()) SavedFrame::Lookup(*currentSavedFrame);
// Attach the asyncCause to the youngest frame.
if (i == 0)

View File

@ -142,7 +142,30 @@ struct TupleImpl<Index, HeadT, TailT...>
, mHead(Head(aOther)) {}
TupleImpl(TupleImpl&& aOther)
: Base(Move(Tail(aOther)))
, mHead(Move(Head(aOther))) {}
, mHead(Forward<HeadT>(Head(aOther))) {}
// Assign from a tuple whose elements are convertible to the elements
// of this tuple.
template <typename... OtherElements,
typename = typename EnableIf<
sizeof...(OtherElements) == sizeof...(TailT) + 1>::Type>
TupleImpl& operator=(const TupleImpl<Index, OtherElements...>& aOther)
{
typedef TupleImpl<Index, OtherElements...> OtherT;
Head(*this) = OtherT::Head(aOther);
Tail(*this) = OtherT::Tail(aOther);
return *this;
}
template <typename... OtherElements,
typename = typename EnableIf<
sizeof...(OtherElements) == sizeof...(TailT) + 1>::Type>
TupleImpl& operator=(TupleImpl<Index, OtherElements...>&& aOther)
{
typedef TupleImpl<Index, OtherElements...> OtherT;
Head(*this) = Move(OtherT::Head(aOther));
Tail(*this) = Move(OtherT::Tail(aOther));
return *this;
}
// Copy and move assignment operators.
TupleImpl& operator=(const TupleImpl& aOther)
@ -195,6 +218,22 @@ public:
Tuple(const Tuple& aOther) : Impl(aOther) { }
Tuple(Tuple&& aOther) : Impl(Move(aOther)) { }
template <typename... OtherElements,
typename = typename EnableIf<
sizeof...(OtherElements) == sizeof...(Elements)>::Type>
Tuple& operator=(const Tuple<OtherElements...>& aOther)
{
static_cast<Impl&>(*this) = aOther;
return *this;
}
template <typename... OtherElements,
typename = typename EnableIf<
sizeof...(OtherElements) == sizeof...(Elements)>::Type>
Tuple& operator=(Tuple<OtherElements...>&& aOther)
{
static_cast<Impl&>(*this) = Move(aOther);
return *this;
}
Tuple& operator=(const Tuple& aOther)
{
static_cast<Impl&>(*this) = aOther;
@ -296,6 +335,25 @@ Tuple<Elements...> MakeTuple(Elements&&... aElements)
return Tuple<Elements...>(Forward<Elements>(aElements)...);
}
/**
* A convenience function for constructing a tuple of references to a
* sequence of variables. Since assignments to the elements of the tuple
* "go through" to the referenced variables, this can be used to "unpack"
* a tuple into individual variables.
*
* Example:
*
* int i;
* float f;
* char c;
* Tie(i, f, c) = FunctionThatReturnsATuple();
*/
template<typename... Elements>
Tuple<Elements&...> Tie(Elements&... aVariables)
{
return Tuple<Elements&...>(aVariables...);
}
} // namespace mozilla
#endif /* mozilla_Tuple_h */

View File

@ -564,6 +564,18 @@ public:
*/
template<typename U> bool append(U&& aU);
/**
* Construct a T in-place as a new entry at the end of this vector.
*/
template<typename... Args>
bool emplaceBack(Args&&... aArgs)
{
if (!growByUninitialized(1))
return false;
new (&back()) T(Forward<Args>(aArgs)...);
return true;
}
template<typename U, size_t O, class BP, class UV>
bool appendAll(const VectorBase<U, O, BP, UV>& aU);
bool appendN(const T& aT, size_t aN);

View File

@ -18,6 +18,7 @@ using mozilla::IsSame;
using mozilla::MakeTuple;
using mozilla::MakeUnique;
using mozilla::Move;
using mozilla::Tie;
using mozilla::Tuple;
using mozilla::UniquePtr;
using mozilla::unused;
@ -36,7 +37,7 @@ using mozilla::unused;
struct ConvertibleToInt
{
operator int() { return 42; }
operator int() const { return 42; }
};
static void
@ -136,6 +137,27 @@ TestMakeTuple()
return true;
}
static bool
TestTie()
{
int i;
float f;
char c;
Tuple<int, float, char> rhs1(42, 0.5f, 'c');
Tie(i, f, c) = rhs1;
CHECK(i == Get<0>(rhs1));
CHECK(f == Get<1>(rhs1));
CHECK(c == Get<2>(rhs1));
// Test conversions
Tuple<ConvertibleToInt, double, unsigned char> rhs2(ConvertibleToInt(),
0.7f, 'd');
Tie(i, f, c) = rhs2;
CHECK(i == Get<0>(rhs2));
CHECK(f == Get<1>(rhs2));
CHECK(c == Get<2>(rhs2));
return true;
}
int
main()
{
@ -143,5 +165,6 @@ main()
TestAssignment();
TestGet();
TestMakeTuple();
TestTie();
return 0;
}

View File

@ -5,16 +5,20 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/Move.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/Vector.h"
using mozilla::detail::VectorTesting;
using mozilla::MakeUnique;
using mozilla::Move;
using mozilla::UniquePtr;
using mozilla::Vector;
struct mozilla::detail::VectorTesting
{
static void testReserved();
static void testConstRange();
static void testEmplaceBack();
};
void
@ -97,10 +101,73 @@ mozilla::detail::VectorTesting::testConstRange()
#endif
}
namespace {
struct S
{
size_t j;
UniquePtr<size_t> k;
static size_t constructCount;
static size_t moveCount;
S(size_t j, size_t k)
: j(j)
, k(MakeUnique<size_t>(k))
{
constructCount++;
}
S(S&& rhs)
: j(rhs.j)
, k(Move(rhs.k))
{
rhs.~S();
moveCount++;
}
S(const S&) = delete;
S& operator=(const S&) = delete;
};
size_t S::constructCount = 0;
size_t S::moveCount = 0;
}
void
mozilla::detail::VectorTesting::testEmplaceBack()
{
Vector<S> vec;
MOZ_RELEASE_ASSERT(vec.reserve(20));
for (size_t i = 0; i < 10; i++) {
S s(i, i*i);
MOZ_RELEASE_ASSERT(vec.append(Move(s)));
}
MOZ_RELEASE_ASSERT(vec.length() == 10);
MOZ_RELEASE_ASSERT(S::constructCount == 10);
MOZ_RELEASE_ASSERT(S::moveCount == 10);
for (size_t i = 10; i < 20; i++) {
MOZ_RELEASE_ASSERT(vec.emplaceBack(i, i*i));
}
MOZ_RELEASE_ASSERT(vec.length() == 20);
MOZ_RELEASE_ASSERT(S::constructCount == 20);
MOZ_RELEASE_ASSERT(S::moveCount == 10);
for (size_t i = 0; i < 20; i++) {
MOZ_RELEASE_ASSERT(vec[i].j == i);
MOZ_RELEASE_ASSERT(*vec[i].k == i*i);
}
}
int
main()
{
VectorTesting::testReserved();
VectorTesting::testConstRange();
VectorTesting::testEmplaceBack();
}

View File

@ -306,6 +306,7 @@ class OSXBootstrapper(BaseBootstrapper):
('mercurial', 'mercurial'),
('git', 'git'),
('autoconf213', HOMEBREW_AUTOCONF213),
('gnu-tar', 'gnu-tar'),
]
self._ensure_homebrew_packages(packages)
@ -372,7 +373,8 @@ class OSXBootstrapper(BaseBootstrapper):
def ensure_macports_system_packages(self):
packages = ['python27',
'mercurial',
'autoconf213']
'autoconf213',
'gnutar']
self._ensure_macports_packages(packages)
self.run_as_root([self.port, 'select', '--set', 'python', 'python27'])

View File

@ -17,10 +17,10 @@ tail =
[marStageSuccessComplete.js]
[marStageSuccessPartial.js]
[marVersionDowngrade.js]
skip-if = os != 'win' && os != 'mac'
skip-if = toolkit == 'gonk'
reason = mar signing
[marWrongChannel.js]
skip-if = os != 'win' && os != 'mac'
skip-if = toolkit == 'gonk'
reason = mar signing
[marStageFailurePartial.js]
[marCallbackAppSuccessComplete_win.js]

View File

@ -120,7 +120,8 @@ static bool sUseHardLinks = true;
# define MAYBE_USE_HARD_LINKS 0
#endif
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && \
!defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
#include "nss.h"
#include "prerror.h"
#endif
@ -2376,7 +2377,8 @@ int NS_main(int argc, NS_tchar **argv)
}
#endif
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && \
!defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
// On Windows and Mac we rely on native APIs to do verifications so we don't
// need to initialize NSS at all there.
// Otherwise, minimize the amount of NSS we depend on by avoiding all the NSS
@ -2878,7 +2880,7 @@ int NS_main(int argc, NS_tchar **argv)
// The elevated updater.exe is responsible for writing out the
// update.status file.
return 0;
} else if(useService) {
} else if (useService) {
// The service command was launched. The service is responsible for
// writing out the update.status file.
if (updateLockFileHandle != INVALID_HANDLE_VALUE) {
@ -3244,6 +3246,7 @@ int NS_main(int argc, NS_tchar **argv)
LaunchMacPostProcess(gInstallDirPath);
}
#endif /* XP_MACOSX */
LaunchCallbackApp(argv[5],
argc - callbackIndex,
argv + callbackIndex,

View File

@ -402,7 +402,8 @@ CopyUpdaterIntoUpdateDir(nsIFile *greDir, nsIFile *appDir, nsIFile *updateDir,
*
* @param pathToAppend A new library path to prepend to LD_LIBRARY_PATH
*/
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && \
!defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
#include "prprf.h"
#define PATH_SEPARATOR ":"
#define LD_LIBRARY_PATH_ENVVAR_NAME "LD_LIBRARY_PATH"
@ -626,7 +627,8 @@ SwitchToUpdatedApp(nsIFile *greDir, nsIFile *updateDir,
if (gSafeMode) {
PR_SetEnv("MOZ_SAFE_MODE_RESTART=1");
}
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && \
!defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
AppendToLibPath(installDirPath.get());
#endif
@ -906,7 +908,8 @@ ApplyUpdate(nsIFile *greDir, nsIFile *updateDir, nsIFile *statusFile,
if (gSafeMode) {
PR_SetEnv("MOZ_SAFE_MODE_RESTART=1");
}
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && \
!defined(XP_MACOSX) && !defined(MOZ_WIDGET_GONK)
AppendToLibPath(installDirPath.get());
#endif