From 6688e00977ba798d78449a9888862210bfe3aeac Mon Sep 17 00:00:00 2001 From: Jed Davis Date: Mon, 20 Oct 2014 14:33:48 -0700 Subject: [PATCH 01/19] Bug 1082817 - Limit ARM exidx sorting hack to Android versions that need it. r=BenWa --- tools/profiler/EHABIStackWalk.cpp | 106 ++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 35 deletions(-) diff --git a/tools/profiler/EHABIStackWalk.cpp b/tools/profiler/EHABIStackWalk.cpp index e11c499cc9f3..db968c9d5df7 100644 --- a/tools/profiler/EHABIStackWalk.cpp +++ b/tools/profiler/EHABIStackWalk.cpp @@ -42,10 +42,37 @@ #define PT_ARM_EXIDX 0x70000001 #endif +// Bug 1082817: ICS B2G has a buggy linker that doesn't always ensure +// that the EXIDX is sorted by address, as the spec requires. So in +// that case we build and sort an array of pointers into the index, +// and binary-search that; otherwise, we search the index in place +// (avoiding the time and space overhead of the indirection). +#if defined(ANDROID_VERSION) && ANDROID_VERSION < 16 +#define HAVE_UNSORTED_EXIDX +#endif namespace mozilla { -struct EHEntry; +struct PRel31 { + uint32_t mBits; + bool topBit() const { return mBits & 0x80000000; } + uint32_t value() const { return mBits & 0x7fffffff; } + int32_t offset() const { return (static_cast(mBits) << 1) >> 1; } + const void *compute() const { + return reinterpret_cast(this) + offset(); + } +private: + PRel31(const PRel31 &copied) MOZ_DELETE; + PRel31() MOZ_DELETE; +}; + +struct EHEntry { + PRel31 startPC; + PRel31 exidx; +private: + EHEntry(const EHEntry &copied) MOZ_DELETE; + EHEntry() MOZ_DELETE; +}; class EHState { // Note that any core register can be used as a "frame pointer" to @@ -64,6 +91,7 @@ enum { R_PC = 15 }; +#ifdef HAVE_UNSORTED_EXIDX class EHEntryHandle { const EHEntry *mValue; public: @@ -71,19 +99,38 @@ public: const EHEntry *value() const { return mValue; } }; +bool operator<(const EHEntryHandle &lhs, const EHEntryHandle &rhs) { + return lhs.value()->startPC.compute() < rhs.value()->startPC.compute(); +} +#endif + class EHTable { uint32_t mStartPC; uint32_t mEndPC; uint32_t mLoadOffset; +#ifdef HAVE_UNSORTED_EXIDX // In principle we should be able to binary-search the index section in // place, but the ICS toolchain's linker is noncompliant and produces // indices that aren't entirely sorted (e.g., libc). So we have this: std::vector mEntries; + typedef std::vector::const_iterator EntryIterator; + EntryIterator entriesBegin() const { return mEntries.begin(); } + EntryIterator entriesEnd() const { return mEntries.end(); } + static const EHEntry* entryGet(EntryIterator aEntry) { + return aEntry->value(); + } +#else + typedef const EHEntry *EntryIterator; + EntryIterator mEntriesBegin, mEntriesEnd; + EntryIterator entriesBegin() const { return mEntriesBegin; } + EntryIterator entriesEnd() const { return mEntriesEnd; } + static const EHEntry* entryGet(EntryIterator aEntry) { return aEntry; } +#endif std::string mName; public: EHTable(const void *aELF, size_t aSize, const std::string &aName); const EHEntry *lookup(uint32_t aPC) const; - bool isValid() const { return mEntries.size() > 0; } + bool isValid() const { return entriesEnd() != entriesBegin(); } const std::string &name() const { return mName; } uint32_t startPC() const { return mStartPC; } uint32_t endPC() const { return mEndPC; } @@ -139,28 +186,6 @@ size_t EHABIStackWalk(const mcontext_t &aContext, void *stackBase, } -struct PRel31 { - uint32_t mBits; - bool topBit() const { return mBits & 0x80000000; } - uint32_t value() const { return mBits & 0x7fffffff; } - int32_t offset() const { return (static_cast(mBits) << 1) >> 1; } - const void *compute() const { - return reinterpret_cast(this) + offset(); - } -private: - PRel31(const PRel31 &copied) MOZ_DELETE; - PRel31() MOZ_DELETE; -}; - -struct EHEntry { - PRel31 startPC; - PRel31 exidx; -private: - EHEntry(const EHEntry &copied) MOZ_DELETE; - EHEntry() MOZ_DELETE; -}; - - class EHInterp { public: // Note that stackLimit is exclusive and stackBase is inclusive @@ -477,29 +502,31 @@ const EHTable *EHAddrSpace::lookup(uint32_t aPC) const { } -bool operator<(const EHEntryHandle &lhs, const EHEntryHandle &rhs) { - return lhs.value()->startPC.compute() < rhs.value()->startPC.compute(); -} - const EHEntry *EHTable::lookup(uint32_t aPC) const { MOZ_ASSERT(aPC >= mStartPC); if (aPC >= mEndPC) return nullptr; - std::vector::const_iterator begin = mEntries.begin(); - std::vector::const_iterator end = mEntries.end(); + EntryIterator begin = entriesBegin(); + EntryIterator end = entriesEnd(); MOZ_ASSERT(begin < end); - if (aPC < reinterpret_cast(begin->value()->startPC.compute())) + if (aPC < reinterpret_cast(entryGet(begin)->startPC.compute())) return nullptr; while (end - begin > 1) { - std::vector::const_iterator mid = begin + (end - begin) / 2; - if (aPC < reinterpret_cast(mid->value()->startPC.compute())) +#ifdef EHABI_UNWIND_MORE_ASSERTS + if (entryGet(end - 1)->startPC.compute() + < entryGet(begin)->startPC.compute()) { + MOZ_CRASH("unsorted exidx"); + } +#endif + EntryIterator mid = begin + (end - begin) / 2; + if (aPC < reinterpret_cast(entryGet(mid)->startPC.compute())) end = mid; else begin = mid; } - return begin->value(); + return entryGet(begin); } @@ -511,10 +538,14 @@ static const unsigned char hostEndian = ELFDATA2MSB; #error "No endian?" #endif -// Async signal unsafe. (Note use of std::vector::reserve.) +// Async signal unsafe: std::vector::reserve, std::string copy ctor. EHTable::EHTable(const void *aELF, size_t aSize, const std::string &aName) : mStartPC(~0), // largest uint32_t mEndPC(0), +#ifndef HAVE_UNSORTED_EXIDX + mEntriesBegin(nullptr), + mEntriesEnd(nullptr), +#endif mName(aName) { const uint32_t base = reinterpret_cast(aELF); @@ -568,10 +599,15 @@ EHTable::EHTable(const void *aELF, size_t aSize, const std::string &aName) const EHEntry *endTable = reinterpret_cast(mLoadOffset + exidxHdr->p_vaddr + exidxHdr->p_memsz); +#ifdef HAVE_UNSORTED_EXIDX mEntries.reserve(endTable - startTable); for (const EHEntry *i = startTable; i < endTable; ++i) mEntries.push_back(i); std::sort(mEntries.begin(), mEntries.end()); +#else + mEntriesBegin = startTable; + mEntriesEnd = endTable; +#endif } From d2b0cee2ba5d9477f9ce8fd50d7b944013039212 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 15:00:47 -0700 Subject: [PATCH 02/19] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/86c1b1d51b5b Author: Miller Medeiros Desc: Merge pull request #25041 from millermedeiros/1074772-yahoo-recurring-all-day Bug 1074772 - [Calendar] recurring all day events are not displayed for Yahoo accounts r=gaye ======== https://hg.mozilla.org/integration/gaia-central/rev/3bf146f14188 Author: Miller Medeiros Desc: Bug 1074772 - [Calendar] recurring all day events are not displayed for Yahoo accounts --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index 751b5cd4dbc3..b37568687371 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "162be54d45ece9196921eb2b342490ec2ab9e1a6", + "revision": "86c1b1d51b5b442cc95277ab17e5e2842b2c2838", "repo_path": "/integration/gaia-central" } From a6c47ddedbaf55462ee525ffa5ed6b969b5a8ee3 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 15:06:56 -0700 Subject: [PATCH 03/19] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 942043ca0b7a..9e34f0b7f9f7 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index a536b57e9bfb..3212f6daa5d9 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index d8dde7e95d8b..bb11a592997e 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index c7c89b3ce2bf..b103eb36a205 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index a536b57e9bfb..3212f6daa5d9 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 1810a23ecfa7..74360a61e748 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index f3b5b07ec59b..a3915bda9a75 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index d039f913a067..522479862918 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 93acd6529bb5..30a741bc5bd5 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 008e57136403..e880f2d00d4c 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index d4920e8c28b6..bb492c142b64 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 4c22948f87892a8b5519ae12bf3a676cbb8d80d7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 19:50:48 -0700 Subject: [PATCH 04/19] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/d03166cba78b Author: Sam Foster Desc: Merge pull request #25283 from sfoster/ftu-hidden-wifi-bug-935495 Bug 935495 - Add x-inputmode=verbatim to avoid autocorrecting password. r=fcampo ======== https://hg.mozilla.org/integration/gaia-central/rev/cc3d2e28fb94 Author: Sam Foster Desc: Bug 935495 - Add x-inputmode=verbatim to avoid autocorrecting password. r=fcampo --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index b37568687371..d7a5b62eb7cb 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "86c1b1d51b5b442cc95277ab17e5e2842b2c2838", + "revision": "d03166cba78b547343ae59898fe57b5647f9aabf", "repo_path": "/integration/gaia-central" } From c1ae43339d5aca58c88494631a57bf3d00d28b13 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 19:52:35 -0700 Subject: [PATCH 05/19] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 9e34f0b7f9f7..4907f4818b03 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 3212f6daa5d9..49b6cc7a556d 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index bb11a592997e..71f57b4be144 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index b103eb36a205..cdeaf1ecd160 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 3212f6daa5d9..49b6cc7a556d 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 74360a61e748..ffd0ed7d7c01 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index a3915bda9a75..ef0123885679 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 522479862918..5f26b14e92d1 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 30a741bc5bd5..c7da3a06eb4c 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index e880f2d00d4c..258254b620a5 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index bb492c142b64..93af611fef75 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 183c0cce195ac18a4160e39a2b90c1772c8b6b9e Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 20:22:28 -0700 Subject: [PATCH 06/19] Bumping manifests a=b2g-bump --- b2g/config/flame-kk/sources.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index ffd0ed7d7c01..1f1f187ef64c 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -133,7 +133,7 @@ - + From aa214bee520ad1d2fd698ca8dc4ad94e488b7ae1 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 20:50:49 -0700 Subject: [PATCH 07/19] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/367d26eba719 Author: Yura Zenevich Desc: Merge pull request #25289 from jobara/1069367 Bug 1069367 - "Header" should be below in card in markup ======== https://hg.mozilla.org/integration/gaia-central/rev/bb41d7fe0831 Author: Justin Obara Desc: Bug - 1069367: Placed header above screenshot Moved the markup for the header to come before the screenshot. While this had been done with styling, it is more semantic it this way in the markup as well. --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index d7a5b62eb7cb..bdb081f8a1b9 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d03166cba78b547343ae59898fe57b5647f9aabf", + "revision": "367d26eba719ebd38abe427c57018537d0064e6c", "repo_path": "/integration/gaia-central" } From 5288311439aa02da475b1106c435e6a596444429 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 20:56:58 -0700 Subject: [PATCH 08/19] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 4907f4818b03..ba4474681019 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 49b6cc7a556d..43e3f07412c0 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 71f57b4be144..967febd7a4eb 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index cdeaf1ecd160..ec6b3bb7d8f1 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 49b6cc7a556d..43e3f07412c0 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 1f1f187ef64c..d2bad708909a 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index ef0123885679..dc6eae92893d 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 5f26b14e92d1..94ab1ef065c2 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index c7da3a06eb4c..6e0120a790da 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 258254b620a5..ab407e735162 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 93af611fef75..10c4714f8b57 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 5e803679ea9475e0853aaef56ce037ea2ffcf57f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 21:35:48 -0700 Subject: [PATCH 09/19] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/8674266eb505 Author: Arthur Chen Desc: Merge pull request #24925 from crh0716/1007600 Bug 1007600 - Support inline activity r=eragonj, alive ======== https://hg.mozilla.org/integration/gaia-central/rev/aa8ab37129b4 Author: Arthur Chen Desc: Bug 1007600 - Support inline activity --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index bdb081f8a1b9..c4159ccb7027 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "367d26eba719ebd38abe427c57018537d0064e6c", + "revision": "8674266eb505b4d4a43fcad0f6d94463ef2492c3", "repo_path": "/integration/gaia-central" } From 3608bebf1dd2f5cf211601f5d211a042433656c9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 21:41:56 -0700 Subject: [PATCH 10/19] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index ba4474681019..09bf29e1b8f5 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 43e3f07412c0..7e7200d19bb1 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 967febd7a4eb..41cdafa722c3 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index ec6b3bb7d8f1..d4a9c08a2285 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 43e3f07412c0..7e7200d19bb1 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index d2bad708909a..6ce091b358ab 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index dc6eae92893d..8a6b8fffea23 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 94ab1ef065c2..f84508abf8bd 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 6e0120a790da..c111e2da968c 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index ab407e735162..440dd3310fbe 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 10c4714f8b57..a1e6365f97a5 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From aa31b7b77e20e71a4b5f158f511ca60a60558b40 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 22:35:48 -0700 Subject: [PATCH 11/19] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/31ffa7847723 Author: Kevin Grandon Desc: Merge pull request #25344 from KevinGrandon/bug_1085605_intermittent_settings_device_info_test Bug 1085605 - [Settings] Use a more qualified CSS selector in order to select the correct gaia-header ======== https://hg.mozilla.org/integration/gaia-central/rev/0a41a201c4c8 Author: Kevin Grandon Desc: Bug 1085605 - [Settings] Use a more qualified CSS selector in order to select the correct gaia-header r=arthurcc --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index c4159ccb7027..f76ea4c3985b 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "8674266eb505b4d4a43fcad0f6d94463ef2492c3", + "revision": "31ffa784772393a36a3274962b07c4e7ed6813fb", "repo_path": "/integration/gaia-central" } From a8c3dc1a7ce96109dd5e06ec84a837b79002507b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 22:41:56 -0700 Subject: [PATCH 12/19] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index 09bf29e1b8f5..c54f3ca3c3ca 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 7e7200d19bb1..456fb59a6bc8 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 41cdafa722c3..8bf7eb6aba55 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index d4a9c08a2285..04b1325c5734 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 7e7200d19bb1..456fb59a6bc8 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6ce091b358ab..6d4751a40ca2 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 8a6b8fffea23..bead1297a86b 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index f84508abf8bd..936511229d8f 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index c111e2da968c..5758d92a2031 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 440dd3310fbe..d4453d552049 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index a1e6365f97a5..58670e8762da 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 1ebf9dd10dafeecb74d222cc78e640501939acbf Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 23:20:49 -0700 Subject: [PATCH 13/19] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/ce8e42aa3688 Author: steveck-chung Desc: Merge pull request #24761 from steveck-chung/message-report-view-refresh-and-test Bug 1021608 - [Messages] Report view visual refresh, r=julienw ======== https://hg.mozilla.org/integration/gaia-central/rev/0a1a37ca7d14 Author: Steve Chung Desc: Bug 1021608 - [Messages] Report view visual refresh, r=julienw --- b2g/config/gaia.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json index f76ea4c3985b..6f1e1f46f89e 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "31ffa784772393a36a3274962b07c4e7ed6813fb", + "revision": "ce8e42aa3688f56113d68bc82409a7fea055547b", "repo_path": "/integration/gaia-central" } From 6517b07cad329402bb636e2c36f6e07c97154a6c Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 23:27:00 -0700 Subject: [PATCH 14/19] Bumping manifests a=b2g-bump --- b2g/config/dolphin/sources.xml | 2 +- b2g/config/emulator-ics/sources.xml | 2 +- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/emulator-kk/sources.xml | 2 +- b2g/config/emulator/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/hamachi/sources.xml | 2 +- b2g/config/helix/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index c54f3ca3c3ca..48a9d26eacb8 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 456fb59a6bc8..96d2e52b7200 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 8bf7eb6aba55..22784120ba23 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 04b1325c5734..0f1efaf24608 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 456fb59a6bc8..96d2e52b7200 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -19,7 +19,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 6d4751a40ca2..1abf73ffbf8f 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index bead1297a86b..e415a3f25ea0 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 936511229d8f..a7d4e133f8c0 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 5758d92a2031..fdabf84bd45e 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -15,7 +15,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index d4453d552049..12efb7d2e0a4 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 58670e8762da..bc84d072f416 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 2dc8fac781bb1b6f6c2e91af9ae1d2404791d854 Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 21 Oct 2014 14:31:42 +0800 Subject: [PATCH 15/19] Bug 1052842 - Part 1: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (idl). r=hsinyi --- .../interfaces/nsIMobileConnectionService.idl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl index 36c3a4517f9e..b0289f0d4a7b 100644 --- a/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl +++ b/dom/mobileconnection/interfaces/nsIMobileConnectionService.idl @@ -234,7 +234,7 @@ already_AddRefed NS_CreateMobileConnectionService(); %} -[scriptable, uuid(1b76ccbf-dbc2-4b74-a62a-73ea91599afa)] +[scriptable, uuid(bde83c1d-1335-43b6-8268-ec7e320167f0)] interface nsIMobileConnection : nsISupports { /* @@ -295,6 +295,13 @@ interface nsIMobileConnection : nsISupports const long CLIR_INVOCATION = 1; const long CLIR_SUPPRESSION = 2; + /** + * Network selection mode. + */ + const long NETWORK_SELECTION_MODE_UNKNOWN = -1; // not available + const long NETWORK_SELECTION_MODE_AUTOMATIC = 0; + const long NETWORK_SELECTION_MODE_MANUAL = 1; + readonly attribute unsigned long serviceId; /** @@ -332,10 +339,10 @@ interface nsIMobileConnection : nsISupports readonly attribute DOMString iccId; /** - * The selection mode of the voice and data networks. Possible values are - * 'automatic', 'manual', null (unknown). + * The selection mode of the voice and data networks. One of the + * nsIMobileConnection.NETWORK_SELECTION_MODE_* values. */ - readonly attribute DOMString networkSelectionMode; + readonly attribute long networkSelectionMode; /** * Current radio state. Possible values are 'enabling', 'enabled', From c267b07f9c984978851b1147224978d65b400779 Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 21 Oct 2014 14:31:44 +0800 Subject: [PATCH 16/19] Bug 1052842 - Part 2: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (dom/ipc). r=echen --- dom/mobileconnection/Assertions.cpp | 22 +++++++++++++++++++ dom/mobileconnection/MobileConnection.cpp | 9 +++++--- .../ipc/MobileConnectionChild.cpp | 8 +++---- .../ipc/MobileConnectionChild.h | 4 ++-- .../ipc/MobileConnectionParent.cpp | 8 +++---- .../ipc/MobileConnectionParent.h | 2 +- .../ipc/PMobileConnection.ipdl | 4 ++-- dom/mobileconnection/moz.build | 1 + 8 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 dom/mobileconnection/Assertions.cpp diff --git a/dom/mobileconnection/Assertions.cpp b/dom/mobileconnection/Assertions.cpp new file mode 100644 index 000000000000..50e71d2d6b41 --- /dev/null +++ b/dom/mobileconnection/Assertions.cpp @@ -0,0 +1,22 @@ +/* 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/. */ + +#include "mozilla/dom/MozMobileConnectionBinding.h" +#include "nsIMobileConnectionService.h" + +namespace mozilla { +namespace dom { + +#define ASSERT_NETWORK_SELECTION_MODE_EQUALITY(webidlState, xpidlState) \ + static_assert(static_cast(MobileNetworkSelectionMode::webidlState) == nsIMobileConnection::xpidlState, \ + "MobileNetworkSelectionMode::" #webidlState " should equal to nsIMobileConnection::" #xpidlState) + +ASSERT_NETWORK_SELECTION_MODE_EQUALITY(Automatic, NETWORK_SELECTION_MODE_AUTOMATIC); +ASSERT_NETWORK_SELECTION_MODE_EQUALITY(Manual, NETWORK_SELECTION_MODE_MANUAL); + +#undef ASSERT_NETWORK_SELECTION_MODE_EQUALITY + +} // namespace dom +} // namespace mozilla + diff --git a/dom/mobileconnection/MobileConnection.cpp b/dom/mobileconnection/MobileConnection.cpp index 2df8ce18eac5..0032c96a6399 100644 --- a/dom/mobileconnection/MobileConnection.cpp +++ b/dom/mobileconnection/MobileConnection.cpp @@ -349,9 +349,12 @@ MobileConnection::GetNetworkSelectionMode() const return retVal; } - nsAutoString mode; - mMobileConnection->GetNetworkSelectionMode(mode); - CONVERT_STRING_TO_NULLABLE_ENUM(mode, MobileNetworkSelectionMode, retVal); + int32_t mode = nsIMobileConnection::NETWORK_SELECTION_MODE_UNKNOWN; + if (NS_SUCCEEDED(mMobileConnection->GetNetworkSelectionMode(&mode)) && + mode != nsIMobileConnection::NETWORK_SELECTION_MODE_UNKNOWN) { + MOZ_ASSERT(mode < static_cast(MobileNetworkSelectionMode::EndGuard_)); + retVal.SetValue(static_cast(mode)); + } return retVal; } diff --git a/dom/mobileconnection/ipc/MobileConnectionChild.cpp b/dom/mobileconnection/ipc/MobileConnectionChild.cpp index f7883b348dcd..65ef352813d9 100644 --- a/dom/mobileconnection/ipc/MobileConnectionChild.cpp +++ b/dom/mobileconnection/ipc/MobileConnectionChild.cpp @@ -146,9 +146,9 @@ MobileConnectionChild::GetLastKnownHomeNetwork(nsAString& aNetwork) } NS_IMETHODIMP -MobileConnectionChild::GetNetworkSelectionMode(nsAString& aMode) +MobileConnectionChild::GetNetworkSelectionMode(int32_t* aMode) { - aMode = mNetworkSelectionMode; + *aMode = mNetworkSelectionMode; return NS_OK; } @@ -512,9 +512,9 @@ MobileConnectionChild::RecvNotifyLastHomeNetworkChanged(const nsString& aNetwork } bool -MobileConnectionChild::RecvNotifyNetworkSelectionModeChanged(const nsString& aMode) +MobileConnectionChild::RecvNotifyNetworkSelectionModeChanged(const int32_t& aMode) { - mNetworkSelectionMode.Assign(aMode); + mNetworkSelectionMode = aMode; return true; } diff --git a/dom/mobileconnection/ipc/MobileConnectionChild.h b/dom/mobileconnection/ipc/MobileConnectionChild.h index 062c48106511..48bd1da40f90 100644 --- a/dom/mobileconnection/ipc/MobileConnectionChild.h +++ b/dom/mobileconnection/ipc/MobileConnectionChild.h @@ -104,7 +104,7 @@ protected: RecvNotifyLastHomeNetworkChanged(const nsString& aNetwork) MOZ_OVERRIDE; virtual bool - RecvNotifyNetworkSelectionModeChanged(const nsString& aMode) MOZ_OVERRIDE; + RecvNotifyNetworkSelectionModeChanged(const int32_t& aMode) MOZ_OVERRIDE; private: uint32_t mServiceId; @@ -116,7 +116,7 @@ private: nsString mRadioState; nsString mLastNetwork; nsString mLastHomeNetwork; - nsString mNetworkSelectionMode; + int32_t mNetworkSelectionMode; nsTArray mSupportedNetworkTypes; }; diff --git a/dom/mobileconnection/ipc/MobileConnectionParent.cpp b/dom/mobileconnection/ipc/MobileConnectionParent.cpp index fff51d16efbb..b32ecb5846ab 100644 --- a/dom/mobileconnection/ipc/MobileConnectionParent.cpp +++ b/dom/mobileconnection/ipc/MobileConnectionParent.cpp @@ -129,7 +129,7 @@ MobileConnectionParent::RecvInit(nsMobileConnectionInfo* aVoice, nsString* aLastKnownNetwork, nsString* aLastKnownHomeNetwork, nsString* aIccId, - nsString* aNetworkSelectionMode, + int32_t* aNetworkSelectionMode, nsString* aRadioState, nsTArray* aSupportedNetworkTypes) { @@ -140,7 +140,7 @@ MobileConnectionParent::RecvInit(nsMobileConnectionInfo* aVoice, NS_ENSURE_SUCCESS(mMobileConnection->GetLastKnownNetwork(*aLastKnownNetwork), false); NS_ENSURE_SUCCESS(mMobileConnection->GetLastKnownHomeNetwork(*aLastKnownHomeNetwork), false); NS_ENSURE_SUCCESS(mMobileConnection->GetIccId(*aIccId), false); - NS_ENSURE_SUCCESS(mMobileConnection->GetNetworkSelectionMode(*aNetworkSelectionMode), false); + NS_ENSURE_SUCCESS(mMobileConnection->GetNetworkSelectionMode(aNetworkSelectionMode), false); NS_ENSURE_SUCCESS(mMobileConnection->GetRadioState(*aRadioState), false); char16_t** types = nullptr; @@ -309,8 +309,8 @@ MobileConnectionParent::NotifyNetworkSelectionModeChanged() NS_ENSURE_TRUE(mLive, NS_ERROR_FAILURE); nsresult rv; - nsAutoString mode; - rv = mMobileConnection->GetNetworkSelectionMode(mode); + int32_t mode; + rv = mMobileConnection->GetNetworkSelectionMode(&mode); NS_ENSURE_SUCCESS(rv, rv); return SendNotifyNetworkSelectionModeChanged(mode) ? NS_OK : NS_ERROR_FAILURE; diff --git a/dom/mobileconnection/ipc/MobileConnectionParent.h b/dom/mobileconnection/ipc/MobileConnectionParent.h index 912552b0f629..b4f72468bb4d 100644 --- a/dom/mobileconnection/ipc/MobileConnectionParent.h +++ b/dom/mobileconnection/ipc/MobileConnectionParent.h @@ -51,7 +51,7 @@ protected: virtual bool RecvInit(nsMobileConnectionInfo* aVoice, nsMobileConnectionInfo* aData, nsString* aLastKnownNetwork, nsString* aLastKnownHomeNetwork, - nsString* aIccId, nsString* aNetworkSelectionMode, + nsString* aIccId, int32_t* aNetworkSelectionMode, nsString* aRadioState, nsTArray* aSupportedNetworkTypes) MOZ_OVERRIDE; private: diff --git a/dom/mobileconnection/ipc/PMobileConnection.ipdl b/dom/mobileconnection/ipc/PMobileConnection.ipdl index e0379365039c..b51f6251bc09 100644 --- a/dom/mobileconnection/ipc/PMobileConnection.ipdl +++ b/dom/mobileconnection/ipc/PMobileConnection.ipdl @@ -32,7 +32,7 @@ child: NotifyClirModeChanged(uint32_t aMode); NotifyLastNetworkChanged(nsString aNetwork); NotifyLastHomeNetworkChanged(nsString aNetwork); - NotifyNetworkSelectionModeChanged(nsString aMode); + NotifyNetworkSelectionModeChanged(int32_t aMode); parent: /** @@ -51,7 +51,7 @@ parent: sync Init() returns (nsMobileConnectionInfo aVoice, nsMobileConnectionInfo aData, nsString aLastKnownNetwork, nsString aLastKnownHomeNetwork, - nsString aIccId, nsString aNetworkSelectionMode, + nsString aIccId, int32_t aNetworkSelectionMode, nsString aRadioState, nsString[] aSupportedNetworkTypes); }; diff --git a/dom/mobileconnection/moz.build b/dom/mobileconnection/moz.build index e32e9f75914f..f7df4607b5ff 100644 --- a/dom/mobileconnection/moz.build +++ b/dom/mobileconnection/moz.build @@ -33,6 +33,7 @@ XPIDL_SOURCES += [ ] UNIFIED_SOURCES += [ + 'Assertions.cpp', 'DOMMMIError.cpp', 'ipc/MobileConnectionChild.cpp', 'ipc/MobileConnectionIPCService.cpp', From d85df99540ed036449e99c3643ea94735a640fda Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 21 Oct 2014 14:31:46 +0800 Subject: [PATCH 17/19] Bug 1052842 - Part 3: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (gonk). r=echen --- dom/mobileconnection/gonk/MobileConnectionService.js | 2 +- dom/system/gonk/ril_consts.js | 7 ++++--- dom/system/gonk/ril_worker.js | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dom/mobileconnection/gonk/MobileConnectionService.js b/dom/mobileconnection/gonk/MobileConnectionService.js index 36e408c61e1e..b6089511f177 100644 --- a/dom/mobileconnection/gonk/MobileConnectionService.js +++ b/dom/mobileconnection/gonk/MobileConnectionService.js @@ -236,7 +236,7 @@ MobileConnectionProvider.prototype = { voice: null, data: null, iccId: null, - networkSelectionMode: null, + networkSelectionMode: Ci.nsIMobileConnection.NETWORK_SELECTION_MODE_UNKNOWN, radioState: null, lastKnownNetwork: null, lastKnownHomeNetwork: null, diff --git a/dom/system/gonk/ril_consts.js b/dom/system/gonk/ril_consts.js index a5a5775a3f16..dd09e0f7ee4c 100644 --- a/dom/system/gonk/ril_consts.js +++ b/dom/system/gonk/ril_consts.js @@ -2600,9 +2600,10 @@ GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_SPCK_PUK] = CARD_PERSOSUBSTAT GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RCCK_PUK] = CARD_PERSOSUBSTATE_RUIM_CORPORATE_PUK; GECKO_PERSO_LOCK_TO_CARD_PERSO_LOCK[GECKO_CARDLOCK_RSPCK_PUK] = CARD_PERSOSUBSTATE_RUIM_SERVICE_PROVIDER_PUK; -this.GECKO_NETWORK_SELECTION_UNKNOWN = null; -this.GECKO_NETWORK_SELECTION_AUTOMATIC = "automatic"; -this.GECKO_NETWORK_SELECTION_MANUAL = "manual"; +// See nsIMobileConnection::NETWORK_SELECTION_MODE_* +this.GECKO_NETWORK_SELECTION_UNKNOWN = -1; +this.GECKO_NETWORK_SELECTION_AUTOMATIC = 0; +this.GECKO_NETWORK_SELECTION_MANUAL = 1; this.GECKO_MOBILE_CONNECTION_STATE_UNKNOWN = null; this.GECKO_MOBILE_CONNECTION_STATE_NOTSEARCHING = "notSearching"; diff --git a/dom/system/gonk/ril_worker.js b/dom/system/gonk/ril_worker.js index 9525a085ac59..0c6fb69e5c2d 100644 --- a/dom/system/gonk/ril_worker.js +++ b/dom/system/gonk/ril_worker.js @@ -469,7 +469,7 @@ RilObject.prototype = { */ this.appType = null; - this.networkSelectionMode = null; + this.networkSelectionMode = GECKO_NETWORK_SELECTION_UNKNOWN; this.voiceRegistrationState = {}; this.dataRegistrationState = {}; From da2b2114dc9370f2e4bcb01ab726f7413202aaa8 Mon Sep 17 00:00:00 2001 From: Jessica Jong Date: Tue, 21 Oct 2014 14:31:48 +0800 Subject: [PATCH 18/19] Bug 1052842 - Part 4: Use enums for NetworkSelectionMode in nsIMobileConnectionService.idl (bt). r=btian --- dom/bluetooth/bluez/BluetoothHfpManager.cpp | 16 ++++++---------- dom/bluetooth2/bluez/BluetoothHfpManager.cpp | 16 ++++++---------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/dom/bluetooth/bluez/BluetoothHfpManager.cpp b/dom/bluetooth/bluez/BluetoothHfpManager.cpp index da082358cdec..e6b3e5c0fd17 100644 --- a/dom/bluetooth/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth/bluez/BluetoothHfpManager.cpp @@ -636,17 +636,13 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId) /** * Possible return values for mode are: - * - null (unknown): set mNetworkSelectionMode to 0 (auto) - * - automatic: set mNetworkSelectionMode to 0 (auto) - * - manual: set mNetworkSelectionMode to 1 (manual) + * - -1 (unknown): set mNetworkSelectionMode to 0 (auto) + * - 0 (automatic): set mNetworkSelectionMode to 0 (auto) + * - 1 (manual): set mNetworkSelectionMode to 1 (manual) */ - nsString mode; - connection->GetNetworkSelectionMode(mode); - if (mode.EqualsLiteral("manual")) { - mNetworkSelectionMode = 1; - } else { - mNetworkSelectionMode = 0; - } + int32_t mode; + connection->GetNetworkSelectionMode(&mode); + mNetworkSelectionMode = (mode == 1) ? 1 : 0; nsCOMPtr network; voiceInfo->GetNetwork(getter_AddRefs(network)); diff --git a/dom/bluetooth2/bluez/BluetoothHfpManager.cpp b/dom/bluetooth2/bluez/BluetoothHfpManager.cpp index dcede69cbda5..faf6ec97a613 100644 --- a/dom/bluetooth2/bluez/BluetoothHfpManager.cpp +++ b/dom/bluetooth2/bluez/BluetoothHfpManager.cpp @@ -636,17 +636,13 @@ BluetoothHfpManager::HandleVoiceConnectionChanged(uint32_t aClientId) /** * Possible return values for mode are: - * - null (unknown): set mNetworkSelectionMode to 0 (auto) - * - automatic: set mNetworkSelectionMode to 0 (auto) - * - manual: set mNetworkSelectionMode to 1 (manual) + * - -1 (unknown): set mNetworkSelectionMode to 0 (auto) + * - 0 (automatic): set mNetworkSelectionMode to 0 (auto) + * - 1 (manual): set mNetworkSelectionMode to 1 (manual) */ - nsString mode; - connection->GetNetworkSelectionMode(mode); - if (mode.EqualsLiteral("manual")) { - mNetworkSelectionMode = 1; - } else { - mNetworkSelectionMode = 0; - } + int32_t mode; + connection->GetNetworkSelectionMode(&mode); + mNetworkSelectionMode = (mode == 1) ? 1 : 0; nsCOMPtr network; voiceInfo->GetNetwork(getter_AddRefs(network)); From 770bf3d009653703e523a418ee0b12bbfc8d2aaa Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Mon, 20 Oct 2014 23:37:33 -0700 Subject: [PATCH 19/19] Bumping manifests a=b2g-bump --- b2g/config/emulator-jb/sources.xml | 2 +- b2g/config/flame-kk/sources.xml | 2 +- b2g/config/flame/sources.xml | 2 +- b2g/config/nexus-4/sources.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 22784120ba23..a5fb45d33153 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -134,7 +134,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 1abf73ffbf8f..9b5bb26187b2 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -151,7 +151,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index e415a3f25ea0..01b22125430f 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -145,7 +145,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 12efb7d2e0a4..ea03f5f4f2b4 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -129,7 +129,7 @@ - +