From 4871501fd945dc65af84b440cd4bda21b6706145 Mon Sep 17 00:00:00 2001 From: Jonathan Hao Date: Wed, 17 Dec 2014 15:05:40 +0800 Subject: [PATCH 01/64] Bug 1111518 - Fix the logic in MediaDecoder::CanPlayThrough(). r=jwwang --- dom/html/HTMLMediaElement.cpp | 5 +---- dom/media/MediaDecoder.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp index c8c2e3213318..27d7e88c1e75 100644 --- a/dom/html/HTMLMediaElement.cpp +++ b/dom/html/HTMLMediaElement.cpp @@ -3244,10 +3244,7 @@ void HTMLMediaElement::UpdateReadyStateForData(MediaDecoderOwner::NextFrameStatu // autoplay elements for live streams will never play. Otherwise we // move to HAVE_ENOUGH_DATA if we can play through the entire media // without stopping to buffer. - MediaDecoder::Statistics stats = mDecoder->GetStatistics(); - if (stats.mTotalBytes < 0 ? stats.mDownloadRateReliable - : stats.mTotalBytes == stats.mDownloadPosition || - mDecoder->CanPlayThrough()) + if (mDecoder->CanPlayThrough()) { ChangeReadyState(nsIDOMHTMLMediaElement::HAVE_ENOUGH_DATA); return; diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index e42ae7e0acc0..65868201ba9a 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -1562,6 +1562,10 @@ void MediaDecoder::UnpinForSeek() bool MediaDecoder::CanPlayThrough() { Statistics stats = GetStatistics(); + if ((stats.mTotalBytes < 0 && stats.mDownloadRateReliable) || + (stats.mTotalBytes >= 0 && stats.mTotalBytes == stats.mDownloadPosition)) { + return true; + } if (!stats.mDownloadRateReliable || !stats.mPlaybackRateReliable) { return false; } @@ -1585,8 +1589,7 @@ bool MediaDecoder::CanPlayThrough() // required near the start of the media, when not much data is downloaded. int64_t readAheadMargin = static_cast(stats.mPlaybackRate * CAN_PLAY_THROUGH_MARGIN); - return stats.mTotalBytes == stats.mDownloadPosition || - stats.mDownloadPosition > stats.mPlaybackPosition + readAheadMargin; + return stats.mDownloadPosition > stats.mPlaybackPosition + readAheadMargin; } #ifdef MOZ_EME From fcb6d29268c7499a3d3c904d7472c8c000015644 Mon Sep 17 00:00:00 2001 From: "Chih-Kai (Patrick) Wang" Date: Thu, 18 Dec 2014 17:00:39 +0800 Subject: [PATCH 02/64] Bug 970307: Part 1: Report status of each thread to find when all the threads are idle. r=nfroyd --- dom/indexedDB/TransactionThreadPool.cpp | 27 ++ dom/wifi/WifiProxyService.cpp | 3 + dom/workers/WorkerPrivate.cpp | 12 + .../base/src/nsSocketTransportService2.cpp | 1 + widget/gonk/GonkMemoryPressureMonitoring.cpp | 2 + xpcom/glue/nsThreadUtils.cpp | 8 + xpcom/glue/nsThreadUtils.h | 15 ++ xpcom/threads/TimerThread.cpp | 1 + xpcom/threads/nsThread.cpp | 63 ++++- xpcom/threads/nsThread.h | 15 ++ xpcom/threads/nsThreadManager.cpp | 250 ++++++++++++++++++ xpcom/threads/nsThreadManager.h | 60 +++++ xpcom/threads/nsThreadPool.cpp | 7 +- xpcom/threads/nsTimerImpl.cpp | 7 + 14 files changed, 468 insertions(+), 3 deletions(-) diff --git a/dom/indexedDB/TransactionThreadPool.cpp b/dom/indexedDB/TransactionThreadPool.cpp index 3cd668b13dad..90b61f461614 100644 --- a/dom/indexedDB/TransactionThreadPool.cpp +++ b/dom/indexedDB/TransactionThreadPool.cpp @@ -19,6 +19,7 @@ #include "nsServiceManagerUtils.h" #include "nsXPCOMCIDInternal.h" #include "ProfilerHelpers.h" +#include "nsThread.h" namespace mozilla { namespace dom { @@ -176,6 +177,10 @@ private: ~TransactionQueue() { } +#ifdef MOZ_NUWA_PROCESS + nsThread* mThread; +#endif + NS_DECL_NSIRUNNABLE }; @@ -789,6 +794,9 @@ TransactionQueue::TransactionQueue(TransactionThreadPool* aThreadPool, , mObjectStoreNames(aObjectStoreNames) , mMode(aMode) , mShouldFinish(false) +#ifdef MOZ_NUWA_PROCESS +, mThread(nullptr) +#endif { MOZ_ASSERT(aThreadPool); aThreadPool->AssertIsOnOwningThread(); @@ -814,6 +822,12 @@ TransactionThreadPool::TransactionQueue::Dispatch(nsIRunnable* aRunnable) mQueue.AppendElement(aRunnable); +#ifdef MOZ_NUWA_PROCESS + if (mThread) { + mThread->SetWorking(); + } +#endif + mMonitor.Notify(); } @@ -849,6 +863,12 @@ TransactionThreadPool::TransactionQueue::Run() nsAutoTArray, 10> queue; nsRefPtr finishCallback; bool shouldFinish = false; +#ifdef MOZ_NUWA_PROCESS + mThread = static_cast(NS_GetCurrentThread()); + // Set ourself as working thread. We can reset later if we found + // our queue is empty. + mThread->SetWorking(); +#endif do { NS_ASSERTION(queue.IsEmpty(), "Should have cleared this!"); @@ -856,6 +876,9 @@ TransactionThreadPool::TransactionQueue::Run() { MonitorAutoLock lock(mMonitor); while (!mShouldFinish && mQueue.IsEmpty()) { +#ifdef MOZ_NUWA_PROCESS + mThread->SetIdle(); +#endif if (NS_FAILED(mMonitor.Wait())) { NS_ERROR("Failed to wait!"); } @@ -888,6 +911,10 @@ TransactionThreadPool::TransactionQueue::Run() } } while (!shouldFinish); +#ifdef MOZ_NUWA_PROCESS + mThread = nullptr; +#endif + #ifdef DEBUG if (kDEBUGThreadSleepMS) { MOZ_ALWAYS_TRUE( diff --git a/dom/wifi/WifiProxyService.cpp b/dom/wifi/WifiProxyService.cpp index 878ac5b6956c..9f42ad11362b 100644 --- a/dom/wifi/WifiProxyService.cpp +++ b/dom/wifi/WifiProxyService.cpp @@ -65,6 +65,9 @@ public: NS_IMETHOD Run() { MOZ_ASSERT(!NS_IsMainThread()); +#ifdef MOZ_NUWA_PROCESS + NS_SetIgnoreStatusOfCurrentThread(); +#endif nsAutoString event; gWpaSupplicant->WaitForEvent(event, mInterface); if (!event.IsEmpty()) { diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 264050c97a9c..d583dc2d2eae 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -73,6 +73,7 @@ #include "nsProxyRelease.h" #include "nsSandboxFlags.h" #include "prthread.h" +#include "nsThread.h" #include "xpcpublic.h" #ifdef ANDROID @@ -4332,6 +4333,17 @@ WorkerPrivate::DoRunLoop(JSContext* aCx) { MutexAutoLock lock(mMutex); +#ifdef MOZ_NUWA_PROCESS + { + nsThread *thr = static_cast(NS_GetCurrentThread()); + ReentrantMonitorAutoEnter mon(thr->ThreadStatusMonitor()); + if (mControlQueue.IsEmpty() && + !(normalRunnablesPending = NS_HasPendingEvents(mThread))) { + thr->SetIdle(); + } + } +#endif // MOZ_NUWA_PROCESS + while (mControlQueue.IsEmpty() && !(normalRunnablesPending = NS_HasPendingEvents(mThread))) { WaitForWorkerEvents(); diff --git a/netwerk/base/src/nsSocketTransportService2.cpp b/netwerk/base/src/nsSocketTransportService2.cpp index 16e548d49f2f..c60d5a0d8c13 100644 --- a/netwerk/base/src/nsSocketTransportService2.cpp +++ b/netwerk/base/src/nsSocketTransportService2.cpp @@ -699,6 +699,7 @@ nsSocketTransportService::Run() if (IsNuwaProcess()) { NuwaMarkCurrentThread(nullptr, nullptr); } + NS_SetIgnoreStatusOfCurrentThread(); #endif SOCKET_LOG(("STS thread init\n")); diff --git a/widget/gonk/GonkMemoryPressureMonitoring.cpp b/widget/gonk/GonkMemoryPressureMonitoring.cpp index 949f36c5bf16..ac018c046a70 100644 --- a/widget/gonk/GonkMemoryPressureMonitoring.cpp +++ b/widget/gonk/GonkMemoryPressureMonitoring.cpp @@ -127,6 +127,8 @@ public: } #endif + NS_SetIgnoreStatusOfCurrentThread(); + int lowMemFd = open("/sys/kernel/mm/lowmemkiller/notify_trigger_active", O_RDONLY | O_CLOEXEC); NS_ENSURE_STATE(lowMemFd != -1); diff --git a/xpcom/glue/nsThreadUtils.cpp b/xpcom/glue/nsThreadUtils.cpp index c6d43dc09be8..ce914d7d15c7 100644 --- a/xpcom/glue/nsThreadUtils.cpp +++ b/xpcom/glue/nsThreadUtils.cpp @@ -375,3 +375,11 @@ nsAutoLowPriorityIO::~nsAutoLowPriorityIO() #endif } +#ifdef MOZ_NUWA_PROCESS +#ifdef MOZILLA_INTERNAL_API +void +NS_SetIgnoreStatusOfCurrentThread() { + nsThreadManager::get()->SetIgnoreThreadStatus(); +} +#endif // MOZILLA_INTERNAL_API +#endif // MOZ_NUWA_PROCESS diff --git a/xpcom/glue/nsThreadUtils.h b/xpcom/glue/nsThreadUtils.h index 47c7eaee4fe6..93c4b31ff220 100644 --- a/xpcom/glue/nsThreadUtils.h +++ b/xpcom/glue/nsThreadUtils.h @@ -565,4 +565,19 @@ private: void NS_SetMainThread(); +/** + * Helpers for thread to report their status when compiled with Nuwa. + */ +#ifdef MOZILLA_INTERNAL_API +#ifdef MOZ_NUWA_PROCESS +extern void +NS_SetIgnoreStatusOfCurrentThread(); +#else // MOZ_NUWA_PROCESS +inline void +NS_SetIgnoreStatusOfCurrentThread() +{ +} +#endif // MOZ_NUWA_PROCESS +#endif // MOZILLA_INTERNAL_API + #endif // nsThreadUtils_h__ diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index 462a0577d83a..2185f21b1bdc 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -205,6 +205,7 @@ TimerThread::Run() } #endif + NS_SetIgnoreStatusOfCurrentThread(); MonitorAutoLock lock(mMonitor); // We need to know how many microseconds give a positive PRIntervalTime. This diff --git a/xpcom/threads/nsThread.cpp b/xpcom/threads/nsThread.cpp index d8be66f355ca..0bbf6269eb90 100644 --- a/xpcom/threads/nsThread.cpp +++ b/xpcom/threads/nsThread.cpp @@ -13,7 +13,6 @@ #undef LOG #endif -#include "mozilla/ReentrantMonitor.h" #include "nsMemoryPressure.h" #include "nsThreadManager.h" #include "nsIClassInfoImpl.h" @@ -332,6 +331,10 @@ nsThread::ThreadFunc(void* aArg) // Inform the ThreadManager nsThreadManager::get()->RegisterCurrentThread(self); +#ifdef MOZ_NUWA_PROCESS + self->mThreadStatusInfo = + static_cast(nsThreadManager::get()->GetCurrentThreadStatusInfo()); +#endif mozilla::IOInterposer::RegisterCurrentThread(); @@ -439,6 +442,10 @@ nsThread::nsThread(MainThreadFlag aMainThread, uint32_t aStackSize) , mShutdownRequired(false) , mEventsAreDoomed(false) , mIsMainThread(aMainThread) +#ifdef MOZ_NUWA_PROCESS + , mThreadStatusMonitor("nsThread.mThreadStatusLock") + , mThreadStatusInfo(nullptr) +#endif { } @@ -486,6 +493,11 @@ nsThread::InitCurrentThread() SetupCurrentThreadForChaosMode(); nsThreadManager::get()->RegisterCurrentThread(this); +#ifdef MOZ_NUWA_PROCESS + mThreadStatusInfo = + static_cast(nsThreadManager::get()->GetCurrentThreadStatusInfo()); +#endif + return NS_OK; } @@ -501,7 +513,15 @@ nsThread::PutEvent(nsIRunnable* aEvent, nsNestedEventTarget* aTarget) NS_WARNING("An event was posted to a thread that will never run it (rejected)"); return NS_ERROR_UNEXPECTED; } - queue->PutEvent(aEvent); +#ifdef MOZ_NUWA_PROCESS + { + ReentrantMonitorAutoEnter mon(mThreadStatusMonitor); + SetWorking(); +#endif // MOZ_NUWA_PROCESS + queue->PutEvent(aEvent); +#ifdef MOZ_NUWA_PROCESS + } +#endif // MOZ_NUWA_PROCESS // Make sure to grab the observer before dropping the lock, otherwise the // event that we just placed into the queue could run and eventually delete @@ -842,6 +862,27 @@ nsThread::ProcessNextEvent(bool aMayWait, bool* aResult) --mRunningEvent; +#ifdef MOZ_NUWA_PROCESS + nsCOMPtr notifyAllIdleRunnable; + { + ReentrantMonitorAutoEnter mon(mThreadStatusMonitor); + if ((!mEvents->GetEvent(false, nullptr)) && (mRunningEvent == 0)) { + nsThreadManager::get()->SetThreadIsWorking( + static_cast(mThreadStatusInfo), + false, getter_AddRefs(notifyAllIdleRunnable)); + } + } + if (notifyAllIdleRunnable) { + // Dispatching a task leads us to acquire |mLock| of the thread. If we + // dispatch to main thread while holding main thread's + // |mThreadStatusMonitor|, deadlock could happen if other thread is + // blocked by main thread's |mThreadStatusMonitor| and is holding + // main thread's |mLock|. + Dispatch(notifyAllIdleRunnable, NS_DISPATCH_NORMAL); + nsThreadManager::get()->ResetIsDispatchingToMainThread(); + } +#endif // MOZ_NUWA_PROCESS + NOTIFY_EVENT_OBSERVERS(AfterProcessNextEvent, (this, mRunningEvent, *aResult)); @@ -1051,6 +1092,24 @@ nsThread::SetMainThreadObserver(nsIThreadObserver* aObserver) return NS_OK; } +#ifdef MOZ_NUWA_PROCESS +void +nsThread::SetWorking() +{ + nsThreadManager::get()->SetThreadIsWorking( + static_cast(mThreadStatusInfo), + true, nullptr); +} + +void +nsThread::SetIdle() +{ + nsThreadManager::get()->SetThreadIsWorking( + static_cast(mThreadStatusInfo), + false, nullptr); +} +#endif + //----------------------------------------------------------------------------- NS_IMETHODIMP diff --git a/xpcom/threads/nsThread.h b/xpcom/threads/nsThread.h index a9080972b89e..6ee9bac852c1 100644 --- a/xpcom/threads/nsThread.h +++ b/xpcom/threads/nsThread.h @@ -16,6 +16,7 @@ #include "nsTObserverArray.h" #include "mozilla/Attributes.h" #include "nsAutoPtr.h" +#include "mozilla/ReentrantMonitor.h" // A native thread class nsThread @@ -65,6 +66,14 @@ public: static nsresult SetMainThreadObserver(nsIThreadObserver* aObserver); +#ifdef MOZ_NUWA_PROCESS + void SetWorking(); + void SetIdle(); + mozilla::ReentrantMonitor& ThreadStatusMonitor() { + return mThreadStatusMonitor; + } +#endif + protected: static nsIThreadObserver* sMainThreadObserver; @@ -182,6 +191,12 @@ protected: // Set to true when events posted to this thread will never run. bool mEventsAreDoomed; MainThreadFlag mIsMainThread; +#ifdef MOZ_NUWA_PROCESS + mozilla::ReentrantMonitor mThreadStatusMonitor; + // The actual type is defined in nsThreadManager.h which is not exposed to + // file out of thread module. + void* mThreadStatusInfo; +#endif }; //----------------------------------------------------------------------------- diff --git a/xpcom/threads/nsThreadManager.cpp b/xpcom/threads/nsThreadManager.cpp index 9ba0ee7d3f11..8de08cfeab06 100644 --- a/xpcom/threads/nsThreadManager.cpp +++ b/xpcom/threads/nsThreadManager.cpp @@ -11,6 +11,7 @@ #include "nsTArray.h" #include "nsAutoPtr.h" #include "mozilla/ThreadLocal.h" +#include "mozilla/ReentrantMonitor.h" #ifdef MOZ_CANARY #include #include @@ -47,6 +48,45 @@ NS_SetMainThread() typedef nsTArray> nsThreadArray; +#ifdef MOZ_NUWA_PROCESS +class NotifyAllThreadsWereIdle: public nsRunnable +{ +public: + + NotifyAllThreadsWereIdle( + nsTArray>* aListeners) + : mListeners(aListeners) + { + } + + virtual NS_IMETHODIMP + Run() { + // Copy listener array, which may be modified during call back. + nsTArray> arr(*mListeners); + for (size_t i = 0; i < arr.Length(); i++) { + arr[i]->OnAllThreadsWereIdle(); + } + return NS_OK; + } + +private: + // Raw pointer, since it's pointing to a member of thread manager. + nsTArray>* mListeners; +}; + +struct nsThreadManager::ThreadStatusInfo { + Atomic mWorking; + Atomic mWillBeWorking; + bool mIgnored; + ThreadStatusInfo() + : mWorking(false) + , mWillBeWorking(false) + , mIgnored(false) + { + } +}; +#endif // MOZ_NUWA_PROCESS + //----------------------------------------------------------------------------- static void @@ -55,6 +95,24 @@ ReleaseObject(void* aData) static_cast(aData)->Release(); } +#ifdef MOZ_NUWA_PROCESS +void +nsThreadManager::DeleteThreadStatusInfo(void* aData) +{ + nsThreadManager* mgr = nsThreadManager::get(); + nsThreadManager::ThreadStatusInfo* thrInfo = + static_cast(aData); + { + ReentrantMonitorAutoEnter mon(*(mgr->mMonitor)); + mgr->mThreadStatusInfos.RemoveElement(thrInfo); + if (NS_IsMainThread()) { + mgr->mMainThreadStatusInfo = nullptr; + } + } + delete thrInfo; +} +#endif + static PLDHashOperator AppendAndRemoveThread(PRThread* aKey, nsRefPtr& aThread, void* aArg) { @@ -96,7 +154,18 @@ nsThreadManager::Init() return NS_ERROR_FAILURE; } +#ifdef MOZ_NUWA_PROCESS + if (PR_NewThreadPrivateIndex( + &mThreadStatusInfoIndex, + nsThreadManager::DeleteThreadStatusInfo) == PR_FAILURE) { + return NS_ERROR_FAILURE; + } +#endif // MOZ_NUWA_PROCESS + mLock = new Mutex("nsThreadManager.mLock"); +#ifdef MOZ_NUWA_PROCESS + mMonitor = MakeUnique("nsThreadManager.mMonitor"); +#endif // MOZ_NUWA_PROCESS #ifdef MOZ_CANARY const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NONBLOCK; @@ -194,6 +263,9 @@ nsThreadManager::Shutdown() // Remove the TLS entry for the main thread. PR_SetThreadPrivate(mCurThreadIndex, nullptr); +#ifdef MOZ_NUWA_PROCESS + PR_SetThreadPrivate(mThreadStatusInfoIndex, nullptr); +#endif } void @@ -226,6 +298,9 @@ nsThreadManager::UnregisterCurrentThread(nsThread* aThread) PR_SetThreadPrivate(mCurThreadIndex, nullptr); // Ref-count balanced via ReleaseObject +#ifdef MOZ_NUWA_PROCESS + PR_SetThreadPrivate(mThreadStatusInfoIndex, nullptr); +#endif } nsThread* @@ -250,6 +325,27 @@ nsThreadManager::GetCurrentThread() return thread.get(); // reference held in TLS } +#ifdef MOZ_NUWA_PROCESS +nsThreadManager::ThreadStatusInfo* +nsThreadManager::GetCurrentThreadStatusInfo() +{ + void* data = PR_GetThreadPrivate(mThreadStatusInfoIndex); + if (!data) { + ThreadStatusInfo *thrInfo = new ThreadStatusInfo(); + PR_SetThreadPrivate(mThreadStatusInfoIndex, thrInfo); + data = thrInfo; + + ReentrantMonitorAutoEnter mon(*mMonitor); + mThreadStatusInfos.AppendElement(thrInfo); + if (NS_IsMainThread()) { + mMainThreadStatusInfo = thrInfo; + } + } + + return static_cast(data); +} +#endif + NS_IMETHODIMP nsThreadManager::NewThread(uint32_t aCreationFlags, uint32_t aStackSize, @@ -342,3 +438,157 @@ nsThreadManager::GetHighestNumberOfThreads() MutexAutoLock lock(*mLock); return mHighestNumberOfThreads; } + +#ifdef MOZ_NUWA_PROCESS +void +nsThreadManager::SetIgnoreThreadStatus() +{ + GetCurrentThreadStatusInfo()->mIgnored = true; +} + +void +nsThreadManager::SetThreadIdle(nsIRunnable **aReturnRunnable) +{ + SetThreadIsWorking(GetCurrentThreadStatusInfo(), false, aReturnRunnable); +} + +void +nsThreadManager::SetThreadWorking() +{ + SetThreadIsWorking(GetCurrentThreadStatusInfo(), true, nullptr); +} + +void +nsThreadManager::SetThreadIsWorking(ThreadStatusInfo* aInfo, + bool aIsWorking, + nsIRunnable **aReturnRunnable) +{ + aInfo->mWillBeWorking = aIsWorking; + if (mThreadsIdledListeners.Length() > 0) { + + // A race condition occurs since we don't want threads to try to enter the + // monitor (nsThreadManager::mMonitor) when no one cares about their status. + // And thus the race can happen when we put the first listener into + // |mThreadsIdledListeners|: + // + // (1) Thread A wants to dispatch a task to Thread B. + // (2) Thread A checks |mThreadsIdledListeners|, and nothing is in the + // list. So Thread A decides not to enter |mMonitor| when updating B's + // status. + // (3) Thread A is suspended just before it changed status of B. + // (4) A listener is added to |mThreadsIdledListeners| + // (5) Now is Thread C's turn to run. Thread C finds there's something in + // |mThreadsIdledListeners|, so it enters |mMonitor| and check all + // thread info structs in |mThreadStatusInfos| while A is in the middle + // of changing B's status. + // + // Then C may find Thread B is an idle thread (which is not correct, because + // A attempted to change B's status prior to C starting to walk throught + // |mThreadStatusInfo|), but the fact that thread A is working (thread A + // hasn't finished dispatching a task to thread B) can prevent thread C from + // firing a bogus notification. + // + // If the state transition that happens outside the monitor is in the other + // direction, the race condition could be: + // + // (1) Thread D has just finished its jobs and wants to set its status to idle. + // (2) Thread D checks |mThreadsIdledListeners|, and nothing is in the list. + // So Thread D decides not to enter |mMonitor|. + // (3) Thread D is is suspended before it updates its own status. + // (4) A listener is put into |mThreadsIdledListeners|. + // (5) Thread C wants to changes status of itself. It checks + // |mThreadsIdledListeners| and finds something inside the list. Thread C + // then enters |mMonitor|, updates its status and checks thread info in + // |mThreadStatusInfos| while D is changing status of itself out of monitor. + // + // Thread C will find that thread D is working (D actually wants to change its + // status to idle before C starting to check), then C returns without firing + // any notification. Finding that thread D is working can make our checking + // mechanism miss a chance to fire a notification: because thread D thought + // there's nothing in |mThreadsIdledListeners| and thus won't check the + // |mThreadStatusInfos| after changing the status of itself. + // + // |mWillBeWorking| can be used to address this problem. We require each + // thread to put the value that is going to be set to |mWorking| to + // |mWillBeWorking| before the thread decide whether it should enter + // |mMonitor| to change status or not. Thus C finds that D is working while + // D's |mWillBeWorking| is false, and C realizes that D is just updating and + // can treat D as an idle thread. + // + // It doesn't matter whether D will check thread status after changing its + // own status or not. If D checks, which means D will enter the monitor + // before updating status, thus D must be blocked until C has finished + // dispatching the notification task to main thread, and D will find that main + // thread is working and will not fire an additional event. On the other hand, + // if D doesn't check |mThreadStatusInfos|, it's still ok, because C has + // treated D as an idle thread already. + + bool hasWorkingThread = false; + nsRefPtr runnable; + { + ReentrantMonitorAutoEnter mon(*mMonitor); + // Get data structure of thread info. + aInfo->mWorking = aIsWorking; + if (aIsWorking) { + // We are working, so there's no need to check futher. + return; + } + + for (size_t i = 0; i < mThreadStatusInfos.Length(); i++) { + ThreadStatusInfo *info = mThreadStatusInfos[i]; + if (!info->mIgnored) { + if (info->mWorking) { + if (info->mWillBeWorking) { + hasWorkingThread = true; + break; + } + } + } + } + if (!hasWorkingThread && !mDispatchingToMainThread) { + runnable = new NotifyAllThreadsWereIdle(&mThreadsIdledListeners); + mDispatchingToMainThread = true; + } + } + + if (runnable) { + if (NS_IsMainThread()) { + // We are holding the main thread's |nsThread::mThreadStatusMonitor|. + // If we dispatch a task to ourself, then we are in danger of causing + // deadlock. Instead, return the task, and let the caller dispatch it + // for us. + MOZ_ASSERT(aReturnRunnable, + "aReturnRunnable must be provided on main thread"); + runnable.forget(aReturnRunnable); + } else { + NS_DispatchToMainThread(runnable); + ResetIsDispatchingToMainThread(); + } + } + } else { + // Update thread info without holding any lock. + aInfo->mWorking = aIsWorking; + } +} + +void +nsThreadManager::ResetIsDispatchingToMainThread() +{ + ReentrantMonitorAutoEnter mon(*mMonitor); + mDispatchingToMainThread = false; +} + +void +nsThreadManager::AddAllThreadsWereIdleListener(AllThreadsWereIdleListener *listener) +{ + MOZ_ASSERT(GetCurrentThreadStatusInfo()->mWorking); + mThreadsIdledListeners.AppendElement(listener); +} + +void +nsThreadManager::RemoveAllThreadsWereIdleListener(AllThreadsWereIdleListener *listener) +{ + mThreadsIdledListeners.RemoveElement(listener); +} + +#endif // MOZ_NUWA_PROCESS diff --git a/xpcom/threads/nsThreadManager.h b/xpcom/threads/nsThreadManager.h index 54d9c5d561f6..74e1bbceaf7a 100644 --- a/xpcom/threads/nsThreadManager.h +++ b/xpcom/threads/nsThreadManager.h @@ -14,9 +14,26 @@ class nsIRunnable; +namespace mozilla { +class ReentrantMonitor; +} + class nsThreadManager : public nsIThreadManager { public: +#ifdef MOZ_NUWA_PROCESS + struct ThreadStatusInfo; + class AllThreadsWereIdleListener { + public: + NS_INLINE_DECL_REFCOUNTING(AllThreadsWereIdleListener); + virtual void OnAllThreadsWereIdle() = 0; + protected: + virtual ~AllThreadsWereIdleListener() + { + } + }; +#endif // MOZ_NUWA_PROCESS + NS_DECL_ISUPPORTS NS_DECL_NSITHREADMANAGER @@ -54,6 +71,31 @@ public: { } +#ifdef MOZ_NUWA_PROCESS + void SetIgnoreThreadStatus(); + + // |SetThreadWorking| and |SetThreadIdle| set status of thread that is + // currently running. They get thread status information from TLS and pass + // the information to |SetThreadIsWorking|. + void SetThreadIdle(nsIRunnable** aReturnRunnable); + void SetThreadWorking(); + + // |SetThreadIsWorking| is where is status actually changed. Thread status + // information is passed as a argument so caller must obtain the structure + // by itself. If this method is invoked on main thread, |aReturnRunnable| + // should be provided to receive the runnable of notifying listeners. + // |ResetIsDispatchingToMainThread| should be invoked after caller on main + // thread dispatched the task to main thread's queue. + void SetThreadIsWorking(ThreadStatusInfo* aInfo, + bool aIsWorking, + nsIRunnable** aReturnRunnable); + void ResetIsDispatchingToMainThread(); + + void AddAllThreadsWereIdleListener(AllThreadsWereIdleListener *listener); + void RemoveAllThreadsWereIdleListener(AllThreadsWereIdleListener *listener); + ThreadStatusInfo* GetCurrentThreadStatusInfo(); +#endif // MOZ_NUWA_PROCESS + private: nsThreadManager() : mCurThreadIndex(0) @@ -62,6 +104,11 @@ private: , mInitialized(false) , mCurrentNumberOfThreads(1) , mHighestNumberOfThreads(1) +#ifdef MOZ_NUWA_PROCESS + , mMonitor(nullptr) + , mMainThreadStatusInfo(nullptr) + , mDispatchingToMainThread(nullptr) +#endif { } @@ -78,6 +125,19 @@ private: uint32_t mCurrentNumberOfThreads; // The highest number of threads encountered so far during the session uint32_t mHighestNumberOfThreads; + +#ifdef MOZ_NUWA_PROCESS + static void DeleteThreadStatusInfo(void *aData); + unsigned mThreadStatusInfoIndex; + nsTArray> mThreadsIdledListeners; + nsTArray mThreadStatusInfos; + mozilla::UniquePtr mMonitor; + ThreadStatusInfo* mMainThreadStatusInfo; + // |mDispatchingToMainThread| is set when all thread are found to be idle + // before task of notifying all listeners are dispatched to main thread. + // The flag is protected by |mMonitor|. + bool mDispatchingToMainThread; +#endif // MOZ_NUWA_PROCESS }; #define NS_THREADMANAGER_CID \ diff --git a/xpcom/threads/nsThreadPool.cpp b/xpcom/threads/nsThreadPool.cpp index 91c769438ef2..2d35fcb20ff0 100644 --- a/xpcom/threads/nsThreadPool.cpp +++ b/xpcom/threads/nsThreadPool.cpp @@ -150,7 +150,6 @@ NS_IMETHODIMP nsThreadPool::Run() { LOG(("THRD-P(%p) enter\n", this)); - mThreadNaming.SetThreadPoolName(mName); nsCOMPtr current; @@ -208,6 +207,9 @@ nsThreadPool::Run() } else { PRIntervalTime delta = timeout - (now - idleSince); LOG(("THRD-P(%p) waiting [%d]\n", this, delta)); +#ifdef MOZ_NUWA_PROCESS + nsThreadManager::get()->SetThreadIdle(nullptr); +#endif // MOZ_NUWA_PROCESS mon.Wait(delta); } } else if (wasIdle) { @@ -217,6 +219,9 @@ nsThreadPool::Run() } if (event) { LOG(("THRD-P(%p) running [%p]\n", this, event.get())); +#ifdef MOZ_NUWA_PROCESS + nsThreadManager::get()->SetThreadWorking(); +#endif // MOZ_NUWA_PROCESS event->Run(); } } while (!exitThread); diff --git a/xpcom/threads/nsTimerImpl.cpp b/xpcom/threads/nsTimerImpl.cpp index 1616eb9f88e9..f601152bb425 100644 --- a/xpcom/threads/nsTimerImpl.cpp +++ b/xpcom/threads/nsTimerImpl.cpp @@ -559,6 +559,13 @@ nsTimerImpl::Fire() return; } +#ifdef MOZ_NUWA_PROCESS + if (IsNuwaProcess() && IsNuwaReady()) { + // A timer event fired after Nuwa frozen can freeze main thread. + return; + } +#endif + PROFILER_LABEL("Timer", "Fire", js::ProfileEntry::Category::OTHER); From 6a357533b14c06f8df8fe4af71842dcceca9a70f Mon Sep 17 00:00:00 2001 From: "Chih-Kai (Patrick) Wang" Date: Thu, 18 Dec 2014 17:01:04 +0800 Subject: [PATCH 03/64] Bug 970307: Part 2: Let Nuwa wait for all tasks of preload slow things to finish. r=cyu --- dom/ipc/ContentChild.cpp | 69 +++++++++++++++------ dom/ipc/ContentChild.h | 2 + dom/ipc/ContentParent.cpp | 40 +++++++++++- dom/ipc/ContentParent.h | 8 ++- dom/ipc/PContent.ipdl | 4 ++ dom/ipc/tests/test_NuwaProcessCreation.html | 2 +- dom/ipc/tests/test_NuwaProcessDeadlock.html | 2 +- 7 files changed, 104 insertions(+), 23 deletions(-) diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index f70189ff8fa2..5c46bdcad4f7 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -1243,7 +1243,6 @@ ContentChild::RecvPBrowserConstructor(PBrowserChild* aActor, { // This runs after AllocPBrowserChild() returns and the IPC machinery for this // PBrowserChild has been set up. - nsCOMPtr os = services::GetObserverService(); if (os) { nsITabChild* tc = @@ -1991,8 +1990,11 @@ bool ContentChild::RecvFlushMemory(const nsString& reason) { #ifdef MOZ_NUWA_PROCESS - if (IsNuwaProcess()) { + if (IsNuwaProcess() || ManagedPBrowserChild().Length() == 0) { // Don't flush memory in the nuwa process: the GC thread could be frozen. + // If there's no PBrowser child, don't flush memory, either. GC writes + // to copy-on-write pages and makes preallocated process take more memory + // before it actually becomes an app. return true; } #endif @@ -2080,12 +2082,25 @@ ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID, // BrowserElementChild.js. if ((mIsForApp || mIsForBrowser) #ifdef MOZ_NUWA_PROCESS - && !IsNuwaProcess() + && IsNuwaProcess() #endif ) { PreloadSlowThings(); } +#ifdef MOZ_NUWA_PROCESS + // Some modules are initialized in preloading. We need to wait until the + // tasks they dispatched to chrome process are done. + if (IsNuwaProcess()) { + SendNuwaWaitForFreeze(); + } +#endif + return true; +} + +bool +ContentChild::RecvNuwaFreeze() +{ #ifdef MOZ_NUWA_PROCESS if (IsNuwaProcess()) { ContentChild::GetSingleton()->RecvGarbageCollect(); @@ -2093,7 +2108,6 @@ ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID, FROM_HERE, NewRunnableFunction(OnFinishNuwaPreparation)); } #endif - return true; } @@ -2344,6 +2358,36 @@ RunNuwaFork() DoNuwaFork(); } } + +class NuwaForkCaller: public nsRunnable +{ +public: + NS_IMETHODIMP + Run() { + // We want to ensure that the PBackground actor gets cloned in the Nuwa + // process before we freeze. Also, we have to do this to avoid deadlock. + // Protocols that are "opened" (e.g. PBackground, PCompositor) block the + // main thread to wait for the IPC thread during the open operation. + // NuwaSpawnWait() blocks the IPC thread to wait for the main thread when + // the Nuwa process is forked. Unless we ensure that the two cannot happen + // at the same time then we risk deadlock. Spinning the event loop here + // guarantees the ordering is safe for PBackground. + if (!BackgroundChild::GetForCurrentThread()) { + // Dispatch ourself again. + NS_DispatchToMainThread(this, NS_DISPATCH_NORMAL); + } else { + MessageLoop* ioloop = XRE_GetIOMessageLoop(); + ioloop->PostTask(FROM_HERE, NewRunnableFunction(RunNuwaFork)); + } + return NS_OK; + } +private: + virtual + ~NuwaForkCaller() + { + } +}; + #endif bool @@ -2355,22 +2399,9 @@ ContentChild::RecvNuwaFork() } sNuwaForking = true; - // We want to ensure that the PBackground actor gets cloned in the Nuwa - // process before we freeze. Also, we have to do this to avoid deadlock. - // Protocols that are "opened" (e.g. PBackground, PCompositor) block the - // main thread to wait for the IPC thread during the open operation. - // NuwaSpawnWait() blocks the IPC thread to wait for the main thread when - // the Nuwa process is forked. Unless we ensure that the two cannot happen - // at the same time then we risk deadlock. Spinning the event loop here - // guarantees the ordering is safe for PBackground. - while (!BackgroundChild::GetForCurrentThread()) { - if (NS_WARN_IF(!NS_ProcessNextEvent())) { - return false; - } - } + nsRefPtr runnable = new NuwaForkCaller(); + NS_DispatchToMainThread(runnable, NS_DISPATCH_NORMAL); - MessageLoop* ioloop = XRE_GetIOMessageLoop(); - ioloop->PostTask(FROM_HERE, NewRunnableFunction(RunNuwaFork)); return true; #else return false; // Makes the underlying IPC channel abort. diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index ef2617eefcf7..303142066cf2 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -350,6 +350,8 @@ public: virtual bool RecvNotifyPhoneStateChange(const nsString& state) MOZ_OVERRIDE; + virtual bool RecvNuwaFreeze() MOZ_OVERRIDE; + void AddIdleObserver(nsIObserver* aObserver, uint32_t aIdleTimeInS); void RemoveIdleObserver(nsIObserver* aObserver, uint32_t aIdleTimeInS); virtual bool RecvNotifyIdleObserver(const uint64_t& aObserver, diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index aacf4b449445..76f854b7018e 100755 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -124,6 +124,7 @@ #include "nsServiceManagerUtils.h" #include "nsStyleSheetService.h" #include "nsThreadUtils.h" +#include "nsThreadManager.h" #include "nsToolkitCompsCID.h" #include "nsWidgetsCID.h" #include "PreallocatedProcessManager.h" @@ -1372,6 +1373,28 @@ StaticAutoPtr > NS_IMPL_ISUPPORTS(SystemMessageHandledListener, nsITimerCallback) +#ifdef MOZ_NUWA_PROCESS +class NuwaFreezeListener : public nsThreadManager::AllThreadsWereIdleListener +{ +public: + NuwaFreezeListener(ContentParent* parent) + : mParent(parent) + { + } + + void OnAllThreadsWereIdle() + { + unused << mParent->SendNuwaFreeze(); + nsThreadManager::get()->RemoveAllThreadsWereIdleListener(this); + } +private: + nsRefPtr mParent; + virtual ~NuwaFreezeListener() + { + } +}; +#endif // MOZ_NUWA_PROCESS + } // anonymous namespace void @@ -2062,6 +2085,8 @@ ContentParent::ContentParent(ContentParent* aTemplate, priority = PROCESS_PRIORITY_FOREGROUND; } + mSendPermissionUpdates = aTemplate->mSendPermissionUpdates; + InitInternal(priority, false, /* Setup Off-main thread compositing */ false /* Send registered chrome */); @@ -2219,7 +2244,7 @@ ContentParent::IsForApp() #ifdef MOZ_NUWA_PROCESS bool -ContentParent::IsNuwaProcess() +ContentParent::IsNuwaProcess() const { return mIsNuwaProcess; } @@ -2568,6 +2593,19 @@ ContentParent::RecvNuwaReady() #endif } +bool +ContentParent::RecvNuwaWaitForFreeze() +{ +#ifdef MOZ_NUWA_PROCESS + nsRefPtr listener = new NuwaFreezeListener(this); + nsThreadManager::get()->AddAllThreadsWereIdleListener(listener); + return true; +#else // MOZ_NUWA_PROCESS + NS_ERROR("ContentParent::RecvNuwaWaitForFreeze() not implemented!"); + return false; +#endif // MOZ_NUWA_PROCESS +} + bool ContentParent::RecvAddNewProcess(const uint32_t& aPid, const InfallibleTArray& aFds) diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index e93bb564cadb..91c73b1acf8c 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -206,7 +206,7 @@ public: return mIsForBrowser; } #ifdef MOZ_NUWA_PROCESS - bool IsNuwaProcess(); + bool IsNuwaProcess() const; #endif GeckoChildProcessHost* Process() { @@ -220,7 +220,11 @@ public: } bool NeedsPermissionsUpdate() const { +#ifdef MOZ_NUWA_PROCESS + return !IsNuwaProcess() && mSendPermissionUpdates; +#else return mSendPermissionUpdates; +#endif } bool NeedsDataStoreInfos() const { @@ -680,6 +684,8 @@ private: virtual bool RecvNuwaReady() MOZ_OVERRIDE; + virtual bool RecvNuwaWaitForFreeze() MOZ_OVERRIDE; + virtual bool RecvAddNewProcess(const uint32_t& aPid, const InfallibleTArray& aFds) MOZ_OVERRIDE; diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 9426fa977d4c..67637dda0f4d 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -524,6 +524,7 @@ child: intr GetProfile() returns (nsCString aProfile); + NuwaFreeze(); parent: /** * Tell the parent process a new accessible document has been created. @@ -735,6 +736,9 @@ parent: async SystemMessageHandled(); NuwaReady(); + // Sent when nuwa finished its initialization process and is waiting for + // parent's signal to make it freeze. + NuwaWaitForFreeze(); sync AddNewProcess(uint32_t pid, ProtocolFdMapping[] aFds); diff --git a/dom/ipc/tests/test_NuwaProcessCreation.html b/dom/ipc/tests/test_NuwaProcessCreation.html index 5e487c6e232c..ea005d857aa9 100644 --- a/dom/ipc/tests/test_NuwaProcessCreation.html +++ b/dom/ipc/tests/test_NuwaProcessCreation.html @@ -77,7 +77,7 @@ function runTest() let timeout = setTimeout(function() { ok(false, "Nuwa process is not launched"); testEnd(); - }, 60000); + }, 240000); function testEnd() { cpmm.removeMessageListener("TEST-ONLY:nuwa-ready", msgHandler); diff --git a/dom/ipc/tests/test_NuwaProcessDeadlock.html b/dom/ipc/tests/test_NuwaProcessDeadlock.html index 1e9168659450..63aefdd7b42e 100644 --- a/dom/ipc/tests/test_NuwaProcessDeadlock.html +++ b/dom/ipc/tests/test_NuwaProcessDeadlock.html @@ -78,7 +78,7 @@ function runTest() let timeout = setTimeout(function() { ok(false, "Nuwa process is not launched"); testEnd(); - }, 90000); + }, 240000); function testEnd() { cpmm.removeMessageListener("TEST-ONLY:nuwa-ready", msgHandler); From 1b982fc3d796b44832e40596f6580304254f51a3 Mon Sep 17 00:00:00 2001 From: "Chih-Kai (Patrick) Wang" Date: Thu, 18 Dec 2014 17:01:33 +0800 Subject: [PATCH 04/64] Bug 970307: Part 3: Reinitialize modules after fork. r=fabrice --- dom/apps/AppsServiceChild.jsm | 9 +++++++-- dom/ipc/ContentChild.cpp | 10 ++++++++++ dom/ipc/TabChild.cpp | 15 +++++++++++++++ dom/ipc/TabChild.h | 1 + dom/ipc/jar.mn | 1 + dom/ipc/post-fork-preload.js | 20 ++++++++++++++++++++ dom/ipc/preload.js | 2 +- 7 files changed, 55 insertions(+), 3 deletions(-) create mode 100644 dom/ipc/post-fork-preload.js diff --git a/dom/apps/AppsServiceChild.jsm b/dom/apps/AppsServiceChild.jsm index 8d5663607d24..7b5d3bd366ff 100644 --- a/dom/apps/AppsServiceChild.jsm +++ b/dom/apps/AppsServiceChild.jsm @@ -103,6 +103,12 @@ this.DOMApplicationRegistry = { this.cpmm.addMessageListener(aMsgName, this); }).bind(this)); + this.resetList(); + + Services.obs.addObserver(this, "xpcom-shutdown", false); + }, + + resetList: function() { this.cpmm.sendAsyncMessage("Webapps:RegisterForMessages", { messages: APPS_IPC_MSG_NAMES }); @@ -110,6 +116,7 @@ this.DOMApplicationRegistry = { // We need to prime the cache with the list of apps. let list = this.cpmm.sendSyncMessage("Webapps:GetList", { })[0]; this.webapps = list.webapps; + // We need a fast mapping from localId -> app, so we add an index. // We also add the manifest to the app object. this.localIdIndex = { }; @@ -118,8 +125,6 @@ this.DOMApplicationRegistry = { this.localIdIndex[app.localId] = app; app.manifest = list.manifests[id]; } - - Services.obs.addObserver(this, "xpcom-shutdown", false); }, observe: function(aSubject, aTopic, aData) { diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 5c46bdcad4f7..791adf40d106 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -510,6 +510,12 @@ NS_IMPL_ISUPPORTS(BackgroundChildPrimer, nsIIPCBackgroundChildCreateCallback) ContentChild* ContentChild::sSingleton; +static void +PostForkPreload() +{ + TabChild::PostForkPreload(); +} + // Performs initialization that is not fork-safe, i.e. that must be done after // forking from the Nuwa process. static void @@ -520,6 +526,7 @@ InitOnContentProcessCreated() if (IsNuwaProcess()) { return; } + PostForkPreload(); #endif // This will register cross-process observer. @@ -2086,6 +2093,9 @@ ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID, #endif ) { PreloadSlowThings(); +#ifndef MOZ_NUWA_PROCESS + PostForkPreload(); +#endif } #ifdef MOZ_NUWA_PROCESS diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 597206717929..0803ddc0e534 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -834,6 +834,21 @@ TabChild::PreloadSlowThings() ClearOnShutdown(&sPreallocatedTab); } +/*static*/ void +TabChild::PostForkPreload() +{ + // Preallocated Tab can be null if we are forked directly from b2g. In such + // case we don't need to preload anything, just return. + if (!sPreallocatedTab) { + return; + } + + // Rebuild connections to parent. + sPreallocatedTab->RecvLoadRemoteScript( + NS_LITERAL_STRING("chrome://global/content/post-fork-preload.js"), + true); +} + /*static*/ already_AddRefed TabChild::Create(nsIContentChild* aManager, const TabId& aTabId, diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 9b2a14f694e8..97ac9af9c1f5 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -268,6 +268,7 @@ public: * on the critical path. */ static void PreloadSlowThings(); + static void PostForkPreload(); /** Return a TabChild with the given attributes. */ static already_AddRefed diff --git a/dom/ipc/jar.mn b/dom/ipc/jar.mn index 7b2d19e2e25c..07297f4f69be 100644 --- a/dom/ipc/jar.mn +++ b/dom/ipc/jar.mn @@ -9,3 +9,4 @@ toolkit.jar: content/global/BrowserElementChildPreload.js (../browser-element/BrowserElementChildPreload.js) * content/global/BrowserElementPanning.js (../browser-element/BrowserElementPanning.js) content/global/preload.js (preload.js) + content/global/post-fork-preload.js (post-fork-preload.js) diff --git a/dom/ipc/post-fork-preload.js b/dom/ipc/post-fork-preload.js new file mode 100644 index 000000000000..f5238beb2cdb --- /dev/null +++ b/dom/ipc/post-fork-preload.js @@ -0,0 +1,20 @@ +/* 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/. */ + +// Preload some things, in an attempt to make app startup faster. +// +// This script is run when the preallocated process starts. It is injected as +// a frame script. +// If Nuwa process is enabled, this script will run in preallocated process +// forked by Nuwa. + +(function (global) { + "use strict"; + + Components.utils.import("resource://gre/modules/AppsServiceChild.jsm"); + Components.classes["@mozilla.org/network/protocol-proxy-service;1"]. + getService(Ci["nsIProtocolProxyService"]); + + DOMApplicationRegistry.resetList(); +})(this); diff --git a/dom/ipc/preload.js b/dom/ipc/preload.js index 194b212cee33..742bb2502166 100644 --- a/dom/ipc/preload.js +++ b/dom/ipc/preload.js @@ -6,6 +6,7 @@ // // This script is run when the preallocated process starts. It is injected as // a frame script. +// If nuwa is enabled, this script will run in Nuwa process before frozen. const BrowserElementIsPreloaded = true; @@ -58,7 +59,6 @@ const BrowserElementIsPreloaded = true; Cc["@mozilla.org/network/idn-service;1"].getService(Ci["nsIIDNService"]); Cc["@mozilla.org/network/io-service;1"].getService(Ci["nsIIOService2"]); Cc["@mozilla.org/network/mime-hdrparam;1"].getService(Ci["nsIMIMEHeaderParam"]); - Cc["@mozilla.org/network/protocol-proxy-service;1"].getService(Ci["nsIProtocolProxyService"]); Cc["@mozilla.org/network/socket-transport-service;1"].getService(Ci["nsISocketTransportService"]); Cc["@mozilla.org/network/stream-transport-service;1"].getService(Ci["nsIStreamTransportService"]); Cc["@mozilla.org/network/url-parser;1?auth=maybe"].getService(Ci["nsIURLParser"]); From 00013bed8f2ffa315c901881c2636fcdaa99c425 Mon Sep 17 00:00:00 2001 From: "Chih-Kai (Patrick) Wang" Date: Thu, 18 Dec 2014 17:01:54 +0800 Subject: [PATCH 05/64] Bug 970307: Part 4: Increase leak checking threshold. r=nfroyd --- testing/mochitest/mochitest_options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/mochitest/mochitest_options.py b/testing/mochitest/mochitest_options.py index 68caa9e21f91..ec5153bb9128 100644 --- a/testing/mochitest/mochitest_options.py +++ b/testing/mochitest/mochitest_options.py @@ -809,7 +809,7 @@ class B2GOptions(MochitestOptions): defaults["testPath"] = "" defaults["extensionsToExclude"] = ["specialpowers"] # See dependencies of bug 1038943. - defaults["defaultLeakThreshold"] = 5180 + defaults["defaultLeakThreshold"] = 5308 self.set_defaults(**defaults) def verifyRemoteOptions(self, options): From 01779d04acbd13edbc272635eb9bcb5b33e183e6 Mon Sep 17 00:00:00 2001 From: Alfredo Yang Date: Wed, 17 Dec 2014 23:42:00 -0500 Subject: [PATCH 06/64] Bug 938034 - Add GonkCameraImage format. r=roc --- dom/media/webrtc/GonkCameraImage.cpp | 81 ++++++++++++++++++++++++++++ dom/media/webrtc/GonkCameraImage.h | 75 ++++++++++++++++++++++++++ dom/media/webrtc/moz.build | 6 ++- gfx/layers/GrallocImages.h | 5 ++ gfx/layers/ImageContainer.cpp | 5 ++ gfx/layers/ImageContainer.h | 6 +++ gfx/layers/ImageTypes.h | 10 ++++ 7 files changed, 187 insertions(+), 1 deletion(-) create mode 100644 dom/media/webrtc/GonkCameraImage.cpp create mode 100644 dom/media/webrtc/GonkCameraImage.h diff --git a/dom/media/webrtc/GonkCameraImage.cpp b/dom/media/webrtc/GonkCameraImage.cpp new file mode 100644 index 000000000000..7e97f3efdf44 --- /dev/null +++ b/dom/media/webrtc/GonkCameraImage.cpp @@ -0,0 +1,81 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=2 et sw=2 tw=80: */ +/* 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 "GonkCameraImage.h" +#include "stagefright/MediaBuffer.h" + +namespace mozilla { + +GonkCameraImage::GonkCameraImage() + : GrallocImage() + , mMonitor("GonkCameraImage.Monitor") + , mMediaBuffer(nullptr) + , mThread(nullptr) +{ + mFormat = ImageFormat::GONK_CAMERA_IMAGE; +} + +GonkCameraImage::~GonkCameraImage() +{ + ReentrantMonitorAutoEnter mon(mMonitor); + // mMediaBuffer must be cleared before destructor. + MOZ_ASSERT(mMediaBuffer == nullptr); +} + +nsresult +GonkCameraImage::GetBuffer(android::MediaBuffer** aBuffer) +{ + ReentrantMonitorAutoEnter mon(mMonitor); + + if (!mMediaBuffer) { + return NS_ERROR_FAILURE; + } + + MOZ_ASSERT(NS_GetCurrentThread() == mThread); + + *aBuffer = mMediaBuffer; + mMediaBuffer->add_ref(); + + return NS_OK; +} + +bool +GonkCameraImage::HasMediaBuffer() +{ + ReentrantMonitorAutoEnter mon(mMonitor); + return mMediaBuffer != nullptr; +} + +nsresult +GonkCameraImage::SetBuffer(android::MediaBuffer* aBuffer) +{ + ReentrantMonitorAutoEnter mon(mMonitor); + MOZ_ASSERT(!mMediaBuffer); + + mMediaBuffer = aBuffer; + mMediaBuffer->add_ref(); + mThread = NS_GetCurrentThread(); + + return NS_OK; +} + +nsresult +GonkCameraImage::ClearBuffer() +{ + ReentrantMonitorAutoEnter mon(mMonitor); + + if (mMediaBuffer) { + MOZ_ASSERT(NS_GetCurrentThread() == mThread); + mMediaBuffer->release(); + mMediaBuffer = nullptr; + mThread = nullptr; + } + return NS_OK; +} + +} // namespace mozilla + + diff --git a/dom/media/webrtc/GonkCameraImage.h b/dom/media/webrtc/GonkCameraImage.h new file mode 100644 index 000000000000..354967d3648f --- /dev/null +++ b/dom/media/webrtc/GonkCameraImage.h @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 2 -*- + * 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/. */ + +#ifndef GONKCAMERAIMAGE_H +#define GONKCAMERAIMAGE_H + +#include "mozilla/ReentrantMonitor.h" +#include "ImageLayers.h" +#include "ImageContainer.h" +#include "GrallocImages.h" + +namespace android { +class MOZ_EXPORT MediaBuffer; +} + +namespace mozilla { + +/** + * GonkCameraImage has two parts. One is preview image which will be saved in + * GrallocImage, another kind is the MediaBuffer keeps in mMediaBuffer + * which is from gonk camera recording callback. The data in MediaBuffer is Gonk + * shared memory based on android binder (IMemory), the actual format in IMemory + * is platform dependent. + * This instance is created in MediaEngine when the preview image arrives. + * The MediaBuffer is attached to the current created GonkCameraImage via SetBuffer(). + * After sending this image to MediaStreamGraph by AppendToTrack(), ClearBuffer() + * must be called to clear MediaBuffer to avoid MediaBuffer be kept in MSG thread. + * The reason to keep MediaBuffer be accessed from MSG thread is MediaBuffer is + * limited resource and it could cause frame rate jitter if MediaBuffer stay too + * long in other threads. + * So there will be 3 threads to accessed this class. First is camera preview + * thread which creates an instance of this class and initialize the preview + * image in the base class GrallocImage. Second is the camera recording + * thread which attaches MediaBuffer and sends this image to MediaStreamDirectListener. + * Third is the MSG thread via NotifyPull, the image should have preview image + * only in NotifyPull. + * + * Note: SetBuffer() and GetBuffer() should be called from the same thread. It + * is forbidden to call GetBuffer() from other threads. + */ +class GonkCameraImage : public layers::GrallocImage +{ +public: + GonkCameraImage(); + + // The returned aBuffer has called aBuffer->add_ref() already, so it is caller's + // duty to release aBuffer. It should be called from the same thread which + // called SetBuffer(). + nsresult GetBuffer(android::MediaBuffer** aBuffer); + + // Set MediaBuffer to image. It is caller's responsibility to call ClearBuffer() + // after the MediaBuffer is sent via MediaStreamGraph. + nsresult SetBuffer(android::MediaBuffer* aBuffer); + + // It should be called from the same thread which called SetBuffer(). + nsresult ClearBuffer(); + + bool HasMediaBuffer(); + +protected: + virtual ~GonkCameraImage(); + + // mMonitor protects mMediaBuffer and mThread. + ReentrantMonitor mMonitor; + android::MediaBuffer* mMediaBuffer; + // Check if current thread is the same one which called SetBuffer(). + // It doesn't need to hold reference count. + DebugOnly mThread; +}; + +} // namespace mozilla + +#endif /* GONKCAMERAIMAGE_H */ diff --git a/dom/media/webrtc/moz.build b/dom/media/webrtc/moz.build index f6d244585102..a0eb26e930ec 100644 --- a/dom/media/webrtc/moz.build +++ b/dom/media/webrtc/moz.build @@ -36,8 +36,12 @@ if CONFIG['MOZ_WEBRTC']: ] # Gonk camera source. if CONFIG['MOZ_B2G_CAMERA']: - EXPORTS += ['MediaEngineGonkVideoSource.h'] + EXPORTS += [ + 'GonkCameraImage.h', + 'MediaEngineGonkVideoSource.h', + ] UNIFIED_SOURCES += [ + 'GonkCameraImage.cpp', 'MediaEngineGonkVideoSource.cpp', ] diff --git a/gfx/layers/GrallocImages.h b/gfx/layers/GrallocImages.h index 77d1516ed50c..9f5a25dc8ef5 100644 --- a/gfx/layers/GrallocImages.h +++ b/gfx/layers/GrallocImages.h @@ -97,6 +97,11 @@ public: virtual TextureClient* GetTextureClient(CompositableClient* aClient) MOZ_OVERRIDE; + virtual GrallocImage* AsGrallocImage() MOZ_OVERRIDE + { + return this; + } + virtual uint8_t* GetBuffer() { return static_cast(GetNativeBuffer()); diff --git a/gfx/layers/ImageContainer.cpp b/gfx/layers/ImageContainer.cpp index 2481fc0787f4..3e0133046e87 100644 --- a/gfx/layers/ImageContainer.cpp +++ b/gfx/layers/ImageContainer.cpp @@ -19,6 +19,7 @@ #include "YCbCrUtils.h" // for YCbCr conversions #ifdef MOZ_WIDGET_GONK #include "GrallocImages.h" +#include "GonkCameraImage.h" #endif #include "gfx2DGlue.h" #include "mozilla/gfx/2D.h" @@ -60,6 +61,10 @@ ImageFactory::CreateImage(ImageFormat aFormat, img = new OverlayImage(); return img.forget(); } + if (aFormat == ImageFormat::GONK_CAMERA_IMAGE) { + img = new GonkCameraImage(); + return img.forget(); + } #endif if (aFormat == ImageFormat::PLANAR_YCBCR) { img = new PlanarYCbCrImage(aRecycleBin); diff --git a/gfx/layers/ImageContainer.h b/gfx/layers/ImageContainer.h index 8ca6df4941fc..2e265273b63e 100644 --- a/gfx/layers/ImageContainer.h +++ b/gfx/layers/ImageContainer.h @@ -105,6 +105,7 @@ class TextureClient; class CompositableClient; class CompositableForwarder; class SurfaceDescriptor; +class GrallocImage; struct ImageBackendData { @@ -167,6 +168,11 @@ public: virtual TemporaryRef GetAsSourceSurface() = 0; + virtual GrallocImage* AsGrallocImage() + { + return nullptr; + } + protected: Image(void* aImplData, ImageFormat aFormat) : mImplData(aImplData), diff --git a/gfx/layers/ImageTypes.h b/gfx/layers/ImageTypes.h index eb298760ce27..ff9d17ecd4d1 100644 --- a/gfx/layers/ImageTypes.h +++ b/gfx/layers/ImageTypes.h @@ -25,6 +25,16 @@ MOZ_BEGIN_ENUM_CLASS(ImageFormat) */ GRALLOC_PLANAR_YCBCR, + /** + * The GONK_CAMERA_IMAGE format creates a GonkCameraImage, which contains two + * parts. One is GrallocImage image for preview image. Another one is + * MediaBuffer from Gonk recording image. The preview image can be rendered in + * a layer for display. And the MediaBuffer will be used in component like OMX + * encoder. It is for GUM to support preview and recording image on Gonk + * camera. + */ + GONK_CAMERA_IMAGE, + /** * The SHARED_RGB format creates a SharedRGBImage, which stores RGB data in * shared memory. Some Android hardware video decoders require this format. From 833002460c1b7df2d09c66f4c2df7cc9af8b14ed Mon Sep 17 00:00:00 2001 From: Alfredo Yang Date: Thu, 18 Dec 2014 01:00:00 -0500 Subject: [PATCH 07/64] Bug 938034 - Enable gonk camera recording callback. r=roc --- dom/camera/GonkCameraControl.cpp | 6 + dom/camera/GonkCameraControl.h | 4 + dom/camera/GonkCameraSource.cpp | 32 +++++ dom/camera/GonkCameraSource.h | 27 ++++ .../webrtc/MediaEngineGonkVideoSource.cpp | 127 +++++++++++++++--- dom/media/webrtc/MediaEngineGonkVideoSource.h | 16 +++ .../src/mediapipeline/MediaPipeline.cpp | 4 +- 7 files changed, 195 insertions(+), 21 deletions(-) diff --git a/dom/camera/GonkCameraControl.cpp b/dom/camera/GonkCameraControl.cpp index ccb110188fd1..618c915aeb68 100644 --- a/dom/camera/GonkCameraControl.cpp +++ b/dom/camera/GonkCameraControl.cpp @@ -903,6 +903,12 @@ nsGonkCameraControl::SetThumbnailSizeImpl(const Size& aSize) return SetAndPush(CAMERA_PARAM_THUMBNAILSIZE, size); } +android::sp +nsGonkCameraControl::GetCameraHw() +{ + return mCameraHw; +} + nsresult nsGonkCameraControl::SetThumbnailSize(const Size& aSize) { diff --git a/dom/camera/GonkCameraControl.h b/dom/camera/GonkCameraControl.h index 17c19aac54a6..307036d98931 100644 --- a/dom/camera/GonkCameraControl.h +++ b/dom/camera/GonkCameraControl.h @@ -32,6 +32,7 @@ namespace android { class GonkCameraHardware; class MediaProfiles; class GonkRecorder; + class GonkCameraSource; } namespace mozilla { @@ -154,6 +155,9 @@ protected: nsresult UpdateThumbnailSize(); nsresult SetThumbnailSizeImpl(const Size& aSize); + friend class android::GonkCameraSource; + android::sp GetCameraHw(); + int32_t RationalizeRotation(int32_t aRotation); uint32_t mCameraId; diff --git a/dom/camera/GonkCameraSource.cpp b/dom/camera/GonkCameraSource.cpp index df25082b1a84..9cc6192b3bff 100644 --- a/dom/camera/GonkCameraSource.cpp +++ b/dom/camera/GonkCameraSource.cpp @@ -46,6 +46,7 @@ #include "GonkCameraSource.h" #include "GonkCameraListener.h" #include "GonkCameraHwMgr.h" +#include "ICameraControl.h" using namespace mozilla; @@ -157,6 +158,16 @@ GonkCameraSource *GonkCameraSource::Create( return source; } +GonkCameraSource *GonkCameraSource::Create( + ICameraControl* aControl, + Size videoSize, + int32_t frameRate) +{ + mozilla::nsGonkCameraControl* control = + static_cast(aControl); + return Create(control->GetCameraHw(), videoSize, frameRate, false); +} + GonkCameraSource::GonkCameraSource( const sp& aCameraHw, Size videoSize, @@ -596,6 +607,10 @@ status_t GonkCameraSource::reset() { } releaseCamera(); + if (mDirectBufferListener.get()) { + mDirectBufferListener = nullptr; + } + if (mCollectStats) { CS_LOGI("Frames received/encoded/dropped: %d/%d/%d in %lld us", mNumFramesReceived, mNumFramesEncoded, mNumFramesDropped, @@ -652,6 +667,14 @@ void GonkCameraSource::signalBufferReturned(MediaBuffer *buffer) { CHECK(!"signalBufferReturned: bogus buffer"); } +status_t GonkCameraSource::AddDirectBufferListener(DirectBufferListener* aListener) { + if (mDirectBufferListener.get()) { + return UNKNOWN_ERROR; + } + mDirectBufferListener = aListener; + return OK; +} + status_t GonkCameraSource::read( MediaBuffer **buffer, const ReadOptions *options) { CS_LOGV("read"); @@ -761,6 +784,15 @@ void GonkCameraSource::dataCallbackTimestamp(int64_t timestampUs, if(prevRateLimit != rateLimit) { mCameraHw->OnRateLimitPreview(rateLimit); } + + if (mDirectBufferListener.get()) { + MediaBuffer* mediaBuffer; + if (read(&mediaBuffer) == OK) { + mDirectBufferListener->BufferAvailable(mediaBuffer); + // read() calls MediaBuffer->add_ref() so it needs to be released here. + mediaBuffer->release(); + } + } } bool GonkCameraSource::isMetaDataStoredInVideoBuffers() const { diff --git a/dom/camera/GonkCameraSource.h b/dom/camera/GonkCameraSource.h index f7b17c2755d5..9e912a493f3e 100644 --- a/dom/camera/GonkCameraSource.h +++ b/dom/camera/GonkCameraSource.h @@ -27,6 +27,10 @@ #include "GonkCameraHwMgr.h" +namespace mozilla { +class ICameraControl; +} + namespace android { class IMemory; @@ -39,6 +43,10 @@ public: int32_t frameRate, bool storeMetaDataInVideoBuffers = false); + static GonkCameraSource *Create(mozilla::ICameraControl* aControl, + Size videoSize, + int32_t frameRate); + virtual ~GonkCameraSource(); virtual status_t start(MetaData *params = NULL); @@ -75,6 +83,24 @@ public: virtual void signalBufferReturned(MediaBuffer* buffer); + /** + * It sends recording frames to listener directly in the same thread. + * Because recording frame is critical resource and it should not be + * propagated to other thread as much as possible or there could be frame + * rate jitter due to camera HAL waiting for resource. + */ + class DirectBufferListener : public RefBase { + public: + DirectBufferListener() {}; + + virtual status_t BufferAvailable(MediaBuffer* aBuffer) = 0; + + protected: + virtual ~DirectBufferListener() {} + }; + + status_t AddDirectBufferListener(DirectBufferListener* aListener); + protected: enum CameraFlags { @@ -136,6 +162,7 @@ private: bool mCollectStats; bool mIsMetaDataStoredInVideoBuffers; sp mCameraHw; + sp mDirectBufferListener; void releaseQueuedFrames(); void releaseOneRecordingFrame(const sp& frame); diff --git a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp index 984379a9992c..a885ceb96675 100644 --- a/dom/media/webrtc/MediaEngineGonkVideoSource.cpp +++ b/dom/media/webrtc/MediaEngineGonkVideoSource.cpp @@ -15,11 +15,13 @@ #include "libyuv.h" #include "mtransport/runnable_utils.h" +#include "GonkCameraImage.h" namespace mozilla { using namespace mozilla::dom; using namespace mozilla::gfx; +using namespace android; #ifdef PR_LOGGING extern PRLogModuleInfo* GetMediaManagerLog(); @@ -30,6 +32,29 @@ extern PRLogModuleInfo* GetMediaManagerLog(); #define LOGFRAME(msg) #endif +class MediaBufferListener : public GonkCameraSource::DirectBufferListener { +public: + MediaBufferListener(MediaEngineGonkVideoSource* aMediaEngine) + : mMediaEngine(aMediaEngine) + { + } + + status_t BufferAvailable(MediaBuffer* aBuffer) + { + nsresult rv = mMediaEngine->OnNewMediaBufferFrame(aBuffer); + if (NS_SUCCEEDED(rv)) { + return OK; + } + return UNKNOWN_ERROR; + } + + ~MediaBufferListener() + { + } + + nsRefPtr mMediaEngine; +}; + #define WEBRTC_GONK_VIDEO_SOURCE_POOL_BUFFERS 10 // We are subclassed from CameraControlListener, which implements a @@ -168,6 +193,46 @@ MediaEngineGonkVideoSource::Start(SourceMediaStream* aStream, TrackID aID) return NS_ERROR_FAILURE; } + if (NS_FAILED(InitDirectMediaBuffer())) { + return NS_ERROR_FAILURE; + } + + return NS_OK; +} + +nsresult +MediaEngineGonkVideoSource::InitDirectMediaBuffer() +{ + // Check available buffer resolution. + nsTArray videoSizes; + mCameraControl->Get(CAMERA_PARAM_SUPPORTED_VIDEOSIZES, videoSizes); + if (!videoSizes.Length()) { + return NS_ERROR_FAILURE; + } + + // TODO: MediaEgnine should use supported recording frame sizes as the size + // range in MediaTrackConstraintSet and find the best match. + // Here we use the first one as the default size (largest supported size). + android::Size videoSize; + videoSize.width = videoSizes[0].width; + videoSize.height = videoSizes[0].height; + + LOG(("Intial size, width: %d, height: %d", videoSize.width, videoSize.height)); + mCameraSource = GonkCameraSource::Create(mCameraControl, + videoSize, + MediaEngine::DEFAULT_VIDEO_FPS); + + status_t rv; + rv = mCameraSource->AddDirectBufferListener(new MediaBufferListener(this)); + if (rv != OK) { + return NS_ERROR_FAILURE; + } + + rv = mCameraSource->start(nullptr); + if (rv != OK) { + return NS_ERROR_FAILURE; + } + return NS_OK; } @@ -353,6 +418,9 @@ void MediaEngineGonkVideoSource::StopImpl() { MOZ_ASSERT(NS_IsMainThread()); + mCameraSource->stop(); + mCameraSource = nullptr; + hal::UnregisterScreenConfigurationObserver(this); mCameraControl->Stop(); } @@ -589,17 +657,17 @@ MediaEngineGonkVideoSource::ConvertPixelFormatToFOURCC(int aFormat) void MediaEngineGonkVideoSource::RotateImage(layers::Image* aImage, uint32_t aWidth, uint32_t aHeight) { layers::GrallocImage *nativeImage = static_cast(aImage); - android::sp graphicBuffer = nativeImage->GetGraphicBuffer(); + android::sp graphicBuffer = nativeImage->GetGraphicBuffer(); void *pMem = nullptr; // Bug 1109957 size will be wrong if width or height are odd uint32_t size = aWidth * aHeight * 3 / 2; MOZ_ASSERT(!(aWidth & 1) && !(aHeight & 1)); - graphicBuffer->lock(android::GraphicBuffer::USAGE_SW_READ_MASK, &pMem); + graphicBuffer->lock(GraphicBuffer::USAGE_SW_READ_MASK, &pMem); uint8_t* srcPtr = static_cast(pMem); // Create a video frame and append it to the track. - ImageFormat format = ImageFormat::GRALLOC_PLANAR_YCBCR; + ImageFormat format = ImageFormat::GONK_CAMERA_IMAGE; nsRefPtr image = mImageContainer->CreateImage(format); uint32_t dstWidth; @@ -657,23 +725,8 @@ MediaEngineGonkVideoSource::RotateImage(layers::Image* aImage, uint32_t aWidth, data.mGraphicBuffer = textureClient; videoImage->SetData(data); - // implicitly releases last image + // Implicitly releases last preview image. mImage = image.forget(); - - // Push the frame into the MSG with a minimal duration. This will likely - // mean we'll still get NotifyPull calls which will then return the same - // frame again with a longer duration. However, this means we won't - // fail to get the frame in and drop frames. - - // XXX The timestamp for the frame should be base on the Capture time, - // not the MSG time, and MSG should never, ever block on a (realtime) - // video frame (or even really for streaming - audio yes, video probably no). - uint32_t len = mSources.Length(); - for (uint32_t i = 0; i < len; i++) { - if (mSources[i]) { - AppendToTrack(mSources[i], mImage, mTrackID, 1); // shortest possible duration - } - } } bool @@ -702,4 +755,40 @@ MediaEngineGonkVideoSource::OnNewPreviewFrame(layers::Image* aImage, uint32_t aW return true; // return true because we're accepting the frame } +nsresult +MediaEngineGonkVideoSource::OnNewMediaBufferFrame(MediaBuffer* aBuffer) +{ + { + ReentrantMonitorAutoEnter sync(mCallbackMonitor); + if (mState == kStopped) { + return NS_OK; + } + } + + MonitorAutoLock enter(mMonitor); + if (mImage) { + GonkCameraImage* cameraImage = static_cast(mImage.get()); + + cameraImage->SetBuffer(aBuffer); + + uint32_t len = mSources.Length(); + for (uint32_t i = 0; i < len; i++) { + if (mSources[i]) { + // Duration is 1 here. + // Ideally, it should be camera timestamp here and the MSG will have + // enough sample duration without calling NotifyPull() anymore. + // Unfortunately, clock in gonk camera looks like is a different one + // comparing to MSG. As result, it causes time inaccurate. (frames be + // queued in MSG longer and longer as time going by in device like Frame) + AppendToTrack(mSources[i], cameraImage, mTrackID, 1); + } + } + // Clear MediaBuffer immediately, it prevents MediaBuffer is kept in + // MediaStreamGraph thread. + cameraImage->ClearBuffer(); + } + + return NS_OK; +} + } // namespace mozilla diff --git a/dom/media/webrtc/MediaEngineGonkVideoSource.h b/dom/media/webrtc/MediaEngineGonkVideoSource.h index 7884f0f0ce03..2d361705b8d9 100644 --- a/dom/media/webrtc/MediaEngineGonkVideoSource.h +++ b/dom/media/webrtc/MediaEngineGonkVideoSource.h @@ -16,6 +16,11 @@ #include "mozilla/ReentrantMonitor.h" #include "mozilla/dom/File.h" #include "mozilla/layers/TextureClientRecycleAllocator.h" +#include "GonkCameraSource.h" + +namespace android { +class MOZ_EXPORT MediaBuffer; +} namespace mozilla { @@ -91,6 +96,12 @@ public: // current screen orientation. nsresult UpdatePhotoOrientation(); + // It adds aBuffer to current preview image and sends this image to MediaStreamDirectListener + // via AppendToTrack(). Due to MediaBuffer is limited resource, it will clear + // image's MediaBuffer by calling GonkCameraImage::ClearBuffer() before leaving + // this function. + nsresult OnNewMediaBufferFrame(android::MediaBuffer* aBuffer); + protected: ~MediaEngineGonkVideoSource() { @@ -101,12 +112,17 @@ protected: void Shutdown(); void ChooseCapability(const VideoTrackConstraintsN& aConstraints, const MediaEnginePrefs& aPrefs); + // Initialize the recording frame (MediaBuffer) callback and Gonk camera. + // MediaBuffer will transfers to MediaStreamGraph via AppendToTrack. + nsresult InitDirectMediaBuffer(); mozilla::ReentrantMonitor mCallbackMonitor; // Monitor for camera callback handling // This is only modified on MainThread (AllocImpl and DeallocImpl) nsRefPtr mCameraControl; nsCOMPtr mLastCapture; + android::sp mCameraSource; + // These are protected by mMonitor in parent class nsTArray> mPhotoCallbacks; int mRotation; diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp index f4e0a0863594..d42df013958b 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp @@ -1172,8 +1172,8 @@ void MediaPipelineTransmit::PipelineListener::ProcessVideoChunk( ImageFormat format = img->GetFormat(); #ifdef WEBRTC_GONK - if (format == ImageFormat::GRALLOC_PLANAR_YCBCR) { - layers::GrallocImage *nativeImage = static_cast(img); + layers::GrallocImage* nativeImage = img->AsGrallocImage(); + if (nativeImage) { android::sp graphicBuffer = nativeImage->GetGraphicBuffer(); int pixelFormat = graphicBuffer->getPixelFormat(); /* PixelFormat is an enum == int */ mozilla::VideoType destFormat; From ab3bec2d73da8ed304094defed508881a6618aa9 Mon Sep 17 00:00:00 2001 From: Francois Marier Date: Thu, 18 Dec 2014 13:59:04 +0200 Subject: [PATCH 08/64] Bug 1100206 - Teach the parser about the integrity attribute. r=hsivonen --- parser/html/javasrc/AttributeName.java | 3 + parser/html/nsHtml5AtomList.h | 1 + parser/html/nsHtml5AttributeName.cpp | 560 +++++++++++++------------ parser/html/nsHtml5AttributeName.h | 1 + 4 files changed, 287 insertions(+), 278 deletions(-) diff --git a/parser/html/javasrc/AttributeName.java b/parser/html/javasrc/AttributeName.java index 749d1154ea18..62babdf73f8a 100644 --- a/parser/html/javasrc/AttributeName.java +++ b/parser/html/javasrc/AttributeName.java @@ -1021,6 +1021,7 @@ public final class AttributeName public static final AttributeName ONDRAGEND = new AttributeName(ALL_NO_NS, SAME_LOCAL("ondragend"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); public static final AttributeName ONMOVEEND = new AttributeName(ALL_NO_NS, SAME_LOCAL("onmoveend"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); public static final AttributeName ONINVALID = new AttributeName(ALL_NO_NS, SAME_LOCAL("oninvalid"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); + public static final AttributeName INTEGRITY = new AttributeName(ALL_NO_NS, SAME_LOCAL("integrity"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); public static final AttributeName ONKEYDOWN = new AttributeName(ALL_NO_NS, SAME_LOCAL("onkeydown"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); public static final AttributeName ONFOCUSIN = new AttributeName(ALL_NO_NS, SAME_LOCAL("onfocusin"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); public static final AttributeName ONMOUSEUP = new AttributeName(ALL_NO_NS, SAME_LOCAL("onmouseup"), ALL_NO_PREFIX, NCNAME_HTML | NCNAME_FOREIGN | NCNAME_LANG); @@ -1602,6 +1603,7 @@ public final class AttributeName ONDRAGEND, ONMOVEEND, ONINVALID, + INTEGRITY, ONKEYDOWN, ONFOCUSIN, ONMOUSEUP, @@ -2184,6 +2186,7 @@ public final class AttributeName 313706996, 313707317, 313710350, + 313795700, 314027746, 314038181, 314091299, diff --git a/parser/html/nsHtml5AtomList.h b/parser/html/nsHtml5AtomList.h index ad78bac2224e..fc6a892e98b1 100644 --- a/parser/html/nsHtml5AtomList.h +++ b/parser/html/nsHtml5AtomList.h @@ -381,6 +381,7 @@ HTML5_ATOM(intercept, "intercept") HTML5_ATOM(ondragend, "ondragend") HTML5_ATOM(onmoveend, "onmoveend") HTML5_ATOM(oninvalid, "oninvalid") +HTML5_ATOM(integrity, "integrity") HTML5_ATOM(onkeydown, "onkeydown") HTML5_ATOM(onfocusin, "onfocusin") HTML5_ATOM(onmouseup, "onmouseup") diff --git a/parser/html/nsHtml5AttributeName.cpp b/parser/html/nsHtml5AttributeName.cpp index 160183bbe6aa..ce9906b683cc 100644 --- a/parser/html/nsHtml5AttributeName.cpp +++ b/parser/html/nsHtml5AttributeName.cpp @@ -499,6 +499,7 @@ nsHtml5AttributeName* nsHtml5AttributeName::ATTR_INTERCEPT = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ONDRAGEND = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ONMOVEEND = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ONINVALID = nullptr; +nsHtml5AttributeName* nsHtml5AttributeName::ATTR_INTEGRITY = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ONKEYDOWN = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ONFOCUSIN = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_ONMOUSEUP = nullptr; @@ -776,7 +777,7 @@ nsHtml5AttributeName* nsHtml5AttributeName::ATTR_GLYPH_ORIENTATION_VERTICAL = nu nsHtml5AttributeName* nsHtml5AttributeName::ATTR_COLOR_INTERPOLATION_FILTERS = nullptr; nsHtml5AttributeName* nsHtml5AttributeName::ATTR_GLYPH_ORIENTATION_HORIZONTAL = nullptr; nsHtml5AttributeName** nsHtml5AttributeName::ATTRIBUTE_NAMES = 0; -static int32_t const ATTRIBUTE_HASHES_DATA[] = { 1153, 1383, 1601, 1793, 1827, 1857, 68600, 69146, 69177, 70237, 70270, 71572, 71669, 72415, 72444, 74846, 74904, 74943, 75001, 75276, 75590, 84742, 84839, 85575, 85963, 85992, 87204, 88074, 88171, 89130, 89163, 3207892, 3283895, 3284791, 3338752, 3358197, 3369562, 3539124, 3562402, 3574260, 3670335, 3696933, 3721879, 135280021, 135346322, 136317019, 136475749, 136548517, 136652214, 136884919, 136902418, 136942992, 137292068, 139120259, 139785574, 142250603, 142314056, 142331176, 142519584, 144752417, 145106895, 146147200, 146765926, 148805544, 149655723, 149809441, 150018784, 150445028, 150813181, 150923321, 152528754, 152536216, 152647366, 152962785, 155219321, 155654904, 157317483, 157350248, 157437941, 157447478, 157604838, 157685404, 157894402, 158315188, 166078431, 169409980, 169700259, 169856932, 170007032, 170409695, 170466488, 170513710, 170608367, 173028944, 173896963, 176090625, 176129212, 179390001, 179489057, 179627464, 179840468, 179849042, 180004216, 181779081, 183027151, 183645319, 183698797, 185922012, 185997252, 188312483, 188675799, 190977533, 190992569, 191006194, 191033518, 191038774, 191096249, 191166163, 191194426, 191443343, 191522106, 191568039, 200104642, 202506661, 202537381, 202602917, 203070590, 203120766, 203389054, 203690071, 203971238, 203986524, 209040857, 209125756, 212055489, 212322418, 212746849, 213002877, 213055164, 213088023, 213259873, 213273386, 213435118, 213437318, 213438231, 213493071, 213532268, 213542834, 213584431, 213659891, 215285828, 215880731, 216112976, 216684637, 217369699, 217565298, 217576549, 218186795, 219743185, 220082234, 221623802, 221986406, 222283890, 223089542, 223138630, 223311265, 224431494, 224547358, 224587256, 224589550, 224655650, 224785518, 224810917, 224813302, 225126263, 225429618, 225432950, 225440869, 236107233, 236709921, 236838947, 237117095, 237143271, 237172455, 237209953, 237354143, 237372743, 237668065, 237703073, 237714273, 239743521, 240512803, 240522627, 240560417, 240656513, 241015715, 241062755, 241065383, 243523041, 245865199, 246261793, 246556195, 246774817, 246923491, 246928419, 246981667, 247014847, 247058369, 247112833, 247118177, 247119137, 247128739, 247316903, 249533729, 250235623, 250269543, 251402351, 252339047, 253260911, 253293679, 254844367, 255547879, 256077281, 256345377, 258124199, 258354465, 258605063, 258744193, 258845603, 258856961, 258926689, 269869248, 270174334, 270709417, 270778994, 270781796, 271102503, 271478858, 271490090, 272870654, 273335275, 273369140, 273924313, 274108530, 274116736, 276818662, 277476156, 279156579, 279349675, 280108533, 280128712, 280132869, 280162403, 280280292, 280413430, 280506130, 280677397, 280678580, 280686710, 280689066, 282736758, 283110901, 283275116, 283823226, 283890012, 284479340, 284606461, 286700477, 286798916, 291557706, 291665349, 291804100, 292138018, 292166446, 292418738, 292451039, 300298041, 300374839, 300597935, 303073389, 303083839, 303266673, 303354997, 303430688, 303576261, 303724281, 303819694, 304242723, 304382625, 306247792, 307227811, 307468786, 307724489, 310252031, 310358241, 310373094, 310833159, 311015256, 313357609, 313683893, 313701861, 313706996, 313707317, 313710350, 314027746, 314038181, 314091299, 314205627, 314233813, 316741830, 316797986, 317486755, 317794164, 320076137, 322657125, 322887778, 323506876, 323572412, 323605180, 325060058, 325320188, 325398738, 325541490, 325671619, 333868843, 336806130, 337212108, 337282686, 337285434, 337585223, 338036037, 338298087, 338566051, 340943551, 341190970, 342995704, 343352124, 343912673, 344585053, 346977248, 347218098, 347262163, 347278576, 347438191, 347655959, 347684788, 347726430, 347727772, 347776035, 347776629, 349500753, 350880161, 350887073, 353384123, 355496998, 355906922, 355979793, 356545959, 358637867, 358905016, 359164318, 359247286, 359350571, 359579447, 365560330, 367399355, 367420285, 367510727, 368013212, 370234760, 370353345, 370710317, 371074566, 371122285, 371194213, 371448425, 371448430, 371545055, 371593469, 371596922, 371758751, 371964792, 372151328, 376550136, 376710172, 376795771, 376826271, 376906556, 380514830, 380774774, 380775037, 381030322, 381136500, 381281631, 381282269, 381285504, 381330595, 381331422, 381335911, 381336484, 383907298, 383917408, 384595009, 384595013, 387799894, 387823201, 392581647, 392584937, 392742684, 392906485, 393003349, 400644707, 400973830, 404428547, 404432113, 404432865, 404469244, 404478897, 404694860, 406887479, 408294949, 408789955, 410022510, 410467324, 410586448, 410945965, 411845275, 414327152, 414327932, 414329781, 414346257, 414346439, 414639928, 414835998, 414894517, 414986533, 417465377, 417465381, 417492216, 418259232, 419310946, 420103495, 420242342, 420380455, 420658662, 420717432, 423183880, 424539259, 425929170, 425972964, 426050649, 426126450, 426142833, 426607922, 437289840, 437347469, 437412335, 437423943, 437455540, 437462252, 437597991, 437617485, 437986305, 437986507, 437986828, 437987072, 438015591, 438034813, 438038966, 438179623, 438347971, 438483573, 438547062, 438895551, 441592676, 442032555, 443548979, 447881379, 447881655, 447881895, 447887844, 448416189, 448445746, 448449012, 450942191, 452816744, 453668677, 454434495, 456610076, 456642844, 456738709, 457544600, 459451897, 459680944, 468058810, 468083581, 470964084, 471470955, 471567278, 472267822, 481177859, 481210627, 481435874, 481455115, 481485378, 481490218, 485105638, 486005878, 486383494, 487988916, 488103783, 490661867, 491574090, 491578272, 493041952, 493441205, 493582844, 493716979, 504577572, 504740359, 505091638, 505592418, 505656212, 509516275, 514998531, 515571132, 515594682, 518712698, 521362273, 526592419, 526807354, 527348842, 538294791, 544689535, 545535009, 548544752, 548563346, 548595116, 551679010, 558034099, 560329411, 560356209, 560671018, 560671152, 560692590, 560845442, 569212097, 569474241, 572252718, 575326764, 576174758, 576190819, 582099184, 582099438, 582372519, 582558889, 586552164, 591325418, 594231990, 594243961, 605711268, 615672071, 616086845, 621792370, 624879850, 627432831, 640040548, 654392808, 658675477, 659420283, 672891587, 694768102, 705890982, 725543146, 759097578, 761686526, 795383908, 878105336, 908643300, 945213471 }; +static int32_t const ATTRIBUTE_HASHES_DATA[] = { 1153, 1383, 1601, 1793, 1827, 1857, 68600, 69146, 69177, 70237, 70270, 71572, 71669, 72415, 72444, 74846, 74904, 74943, 75001, 75276, 75590, 84742, 84839, 85575, 85963, 85992, 87204, 88074, 88171, 89130, 89163, 3207892, 3283895, 3284791, 3338752, 3358197, 3369562, 3539124, 3562402, 3574260, 3670335, 3696933, 3721879, 135280021, 135346322, 136317019, 136475749, 136548517, 136652214, 136884919, 136902418, 136942992, 137292068, 139120259, 139785574, 142250603, 142314056, 142331176, 142519584, 144752417, 145106895, 146147200, 146765926, 148805544, 149655723, 149809441, 150018784, 150445028, 150813181, 150923321, 152528754, 152536216, 152647366, 152962785, 155219321, 155654904, 157317483, 157350248, 157437941, 157447478, 157604838, 157685404, 157894402, 158315188, 166078431, 169409980, 169700259, 169856932, 170007032, 170409695, 170466488, 170513710, 170608367, 173028944, 173896963, 176090625, 176129212, 179390001, 179489057, 179627464, 179840468, 179849042, 180004216, 181779081, 183027151, 183645319, 183698797, 185922012, 185997252, 188312483, 188675799, 190977533, 190992569, 191006194, 191033518, 191038774, 191096249, 191166163, 191194426, 191443343, 191522106, 191568039, 200104642, 202506661, 202537381, 202602917, 203070590, 203120766, 203389054, 203690071, 203971238, 203986524, 209040857, 209125756, 212055489, 212322418, 212746849, 213002877, 213055164, 213088023, 213259873, 213273386, 213435118, 213437318, 213438231, 213493071, 213532268, 213542834, 213584431, 213659891, 215285828, 215880731, 216112976, 216684637, 217369699, 217565298, 217576549, 218186795, 219743185, 220082234, 221623802, 221986406, 222283890, 223089542, 223138630, 223311265, 224431494, 224547358, 224587256, 224589550, 224655650, 224785518, 224810917, 224813302, 225126263, 225429618, 225432950, 225440869, 236107233, 236709921, 236838947, 237117095, 237143271, 237172455, 237209953, 237354143, 237372743, 237668065, 237703073, 237714273, 239743521, 240512803, 240522627, 240560417, 240656513, 241015715, 241062755, 241065383, 243523041, 245865199, 246261793, 246556195, 246774817, 246923491, 246928419, 246981667, 247014847, 247058369, 247112833, 247118177, 247119137, 247128739, 247316903, 249533729, 250235623, 250269543, 251402351, 252339047, 253260911, 253293679, 254844367, 255547879, 256077281, 256345377, 258124199, 258354465, 258605063, 258744193, 258845603, 258856961, 258926689, 269869248, 270174334, 270709417, 270778994, 270781796, 271102503, 271478858, 271490090, 272870654, 273335275, 273369140, 273924313, 274108530, 274116736, 276818662, 277476156, 279156579, 279349675, 280108533, 280128712, 280132869, 280162403, 280280292, 280413430, 280506130, 280677397, 280678580, 280686710, 280689066, 282736758, 283110901, 283275116, 283823226, 283890012, 284479340, 284606461, 286700477, 286798916, 291557706, 291665349, 291804100, 292138018, 292166446, 292418738, 292451039, 300298041, 300374839, 300597935, 303073389, 303083839, 303266673, 303354997, 303430688, 303576261, 303724281, 303819694, 304242723, 304382625, 306247792, 307227811, 307468786, 307724489, 310252031, 310358241, 310373094, 310833159, 311015256, 313357609, 313683893, 313701861, 313706996, 313707317, 313710350, 313795700, 314027746, 314038181, 314091299, 314205627, 314233813, 316741830, 316797986, 317486755, 317794164, 320076137, 322657125, 322887778, 323506876, 323572412, 323605180, 325060058, 325320188, 325398738, 325541490, 325671619, 333868843, 336806130, 337212108, 337282686, 337285434, 337585223, 338036037, 338298087, 338566051, 340943551, 341190970, 342995704, 343352124, 343912673, 344585053, 346977248, 347218098, 347262163, 347278576, 347438191, 347655959, 347684788, 347726430, 347727772, 347776035, 347776629, 349500753, 350880161, 350887073, 353384123, 355496998, 355906922, 355979793, 356545959, 358637867, 358905016, 359164318, 359247286, 359350571, 359579447, 365560330, 367399355, 367420285, 367510727, 368013212, 370234760, 370353345, 370710317, 371074566, 371122285, 371194213, 371448425, 371448430, 371545055, 371593469, 371596922, 371758751, 371964792, 372151328, 376550136, 376710172, 376795771, 376826271, 376906556, 380514830, 380774774, 380775037, 381030322, 381136500, 381281631, 381282269, 381285504, 381330595, 381331422, 381335911, 381336484, 383907298, 383917408, 384595009, 384595013, 387799894, 387823201, 392581647, 392584937, 392742684, 392906485, 393003349, 400644707, 400973830, 404428547, 404432113, 404432865, 404469244, 404478897, 404694860, 406887479, 408294949, 408789955, 410022510, 410467324, 410586448, 410945965, 411845275, 414327152, 414327932, 414329781, 414346257, 414346439, 414639928, 414835998, 414894517, 414986533, 417465377, 417465381, 417492216, 418259232, 419310946, 420103495, 420242342, 420380455, 420658662, 420717432, 423183880, 424539259, 425929170, 425972964, 426050649, 426126450, 426142833, 426607922, 437289840, 437347469, 437412335, 437423943, 437455540, 437462252, 437597991, 437617485, 437986305, 437986507, 437986828, 437987072, 438015591, 438034813, 438038966, 438179623, 438347971, 438483573, 438547062, 438895551, 441592676, 442032555, 443548979, 447881379, 447881655, 447881895, 447887844, 448416189, 448445746, 448449012, 450942191, 452816744, 453668677, 454434495, 456610076, 456642844, 456738709, 457544600, 459451897, 459680944, 468058810, 468083581, 470964084, 471470955, 471567278, 472267822, 481177859, 481210627, 481435874, 481455115, 481485378, 481490218, 485105638, 486005878, 486383494, 487988916, 488103783, 490661867, 491574090, 491578272, 493041952, 493441205, 493582844, 493716979, 504577572, 504740359, 505091638, 505592418, 505656212, 509516275, 514998531, 515571132, 515594682, 518712698, 521362273, 526592419, 526807354, 527348842, 538294791, 544689535, 545535009, 548544752, 548563346, 548595116, 551679010, 558034099, 560329411, 560356209, 560671018, 560671152, 560692590, 560845442, 569212097, 569474241, 572252718, 575326764, 576174758, 576190819, 582099184, 582099438, 582372519, 582558889, 586552164, 591325418, 594231990, 594243961, 605711268, 615672071, 616086845, 621792370, 624879850, 627432831, 640040548, 654392808, 658675477, 659420283, 672891587, 694768102, 705890982, 725543146, 759097578, 761686526, 795383908, 878105336, 908643300, 945213471 }; staticJArray nsHtml5AttributeName::ATTRIBUTE_HASHES = { ATTRIBUTE_HASHES_DATA, MOZ_ARRAY_LENGTH(ATTRIBUTE_HASHES_DATA) }; void nsHtml5AttributeName::initializeStatics() @@ -1117,6 +1118,7 @@ nsHtml5AttributeName::initializeStatics() ATTR_ONDRAGEND = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::ondragend), ALL_NO_PREFIX); ATTR_ONMOVEEND = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::onmoveend), ALL_NO_PREFIX); ATTR_ONINVALID = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::oninvalid), ALL_NO_PREFIX); + ATTR_INTEGRITY = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::integrity), ALL_NO_PREFIX); ATTR_ONKEYDOWN = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::onkeydown), ALL_NO_PREFIX); ATTR_ONFOCUSIN = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::onfocusin), ALL_NO_PREFIX); ATTR_ONMOUSEUP = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::onmouseup), ALL_NO_PREFIX); @@ -1393,7 +1395,7 @@ nsHtml5AttributeName::initializeStatics() ATTR_GLYPH_ORIENTATION_VERTICAL = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::glyph_orientation_vertical), ALL_NO_PREFIX); ATTR_COLOR_INTERPOLATION_FILTERS = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::color_interpolation_filters), ALL_NO_PREFIX); ATTR_GLYPH_ORIENTATION_HORIZONTAL = new nsHtml5AttributeName(ALL_NO_NS, SAME_LOCAL(nsHtml5Atoms::glyph_orientation_horizontal), ALL_NO_PREFIX); - ATTRIBUTE_NAMES = new nsHtml5AttributeName*[580]; + ATTRIBUTE_NAMES = new nsHtml5AttributeName*[581]; ATTRIBUTE_NAMES[0] = ATTR_D; ATTRIBUTE_NAMES[1] = ATTR_K; ATTRIBUTE_NAMES[2] = ATTR_R; @@ -1698,282 +1700,283 @@ nsHtml5AttributeName::initializeStatics() ATTRIBUTE_NAMES[301] = ATTR_ONDRAGEND; ATTRIBUTE_NAMES[302] = ATTR_ONMOVEEND; ATTRIBUTE_NAMES[303] = ATTR_ONINVALID; - ATTRIBUTE_NAMES[304] = ATTR_ONKEYDOWN; - ATTRIBUTE_NAMES[305] = ATTR_ONFOCUSIN; - ATTRIBUTE_NAMES[306] = ATTR_ONMOUSEUP; - ATTRIBUTE_NAMES[307] = ATTR_INPUTMODE; - ATTRIBUTE_NAMES[308] = ATTR_ONROWEXIT; - ATTRIBUTE_NAMES[309] = ATTR_MATHCOLOR; - ATTRIBUTE_NAMES[310] = ATTR_MASKUNITS; - ATTRIBUTE_NAMES[311] = ATTR_MAXLENGTH; - ATTRIBUTE_NAMES[312] = ATTR_LINEBREAK; - ATTRIBUTE_NAMES[313] = ATTR_TRANSFORM; - ATTRIBUTE_NAMES[314] = ATTR_V_HANGING; - ATTRIBUTE_NAMES[315] = ATTR_VALUETYPE; - ATTRIBUTE_NAMES[316] = ATTR_POINTSATZ; - ATTRIBUTE_NAMES[317] = ATTR_POINTSATX; - ATTRIBUTE_NAMES[318] = ATTR_POINTSATY; - ATTRIBUTE_NAMES[319] = ATTR_SYMMETRIC; - ATTRIBUTE_NAMES[320] = ATTR_SCROLLING; - ATTRIBUTE_NAMES[321] = ATTR_REPEATDUR; - ATTRIBUTE_NAMES[322] = ATTR_SELECTION; - ATTRIBUTE_NAMES[323] = ATTR_SEPARATOR; - ATTRIBUTE_NAMES[324] = ATTR_XML_SPACE; - ATTRIBUTE_NAMES[325] = ATTR_AUTOSUBMIT; - ATTRIBUTE_NAMES[326] = ATTR_ALPHABETIC; - ATTRIBUTE_NAMES[327] = ATTR_ACTIONTYPE; - ATTRIBUTE_NAMES[328] = ATTR_ACCUMULATE; - ATTRIBUTE_NAMES[329] = ATTR_ARIA_LEVEL; - ATTRIBUTE_NAMES[330] = ATTR_COLUMNSPAN; - ATTRIBUTE_NAMES[331] = ATTR_CAP_HEIGHT; - ATTRIBUTE_NAMES[332] = ATTR_BACKGROUND; - ATTRIBUTE_NAMES[333] = ATTR_GLYPH_NAME; - ATTRIBUTE_NAMES[334] = ATTR_GROUPALIGN; - ATTRIBUTE_NAMES[335] = ATTR_FONTFAMILY; - ATTRIBUTE_NAMES[336] = ATTR_FONTWEIGHT; - ATTRIBUTE_NAMES[337] = ATTR_FONT_STYLE; - ATTRIBUTE_NAMES[338] = ATTR_KEYSPLINES; - ATTRIBUTE_NAMES[339] = ATTR_HTTP_EQUIV; - ATTRIBUTE_NAMES[340] = ATTR_ONACTIVATE; - ATTRIBUTE_NAMES[341] = ATTR_OCCURRENCE; - ATTRIBUTE_NAMES[342] = ATTR_IRRELEVANT; - ATTRIBUTE_NAMES[343] = ATTR_ONDBLCLICK; - ATTRIBUTE_NAMES[344] = ATTR_ONDRAGDROP; - ATTRIBUTE_NAMES[345] = ATTR_ONKEYPRESS; - ATTRIBUTE_NAMES[346] = ATTR_ONROWENTER; - ATTRIBUTE_NAMES[347] = ATTR_ONDRAGOVER; - ATTRIBUTE_NAMES[348] = ATTR_ONFOCUSOUT; - ATTRIBUTE_NAMES[349] = ATTR_ONMOUSEOUT; - ATTRIBUTE_NAMES[350] = ATTR_NUMOCTAVES; - ATTRIBUTE_NAMES[351] = ATTR_MARKER_MID; - ATTRIBUTE_NAMES[352] = ATTR_MARKER_END; - ATTRIBUTE_NAMES[353] = ATTR_TEXTLENGTH; - ATTRIBUTE_NAMES[354] = ATTR_VISIBILITY; - ATTRIBUTE_NAMES[355] = ATTR_VIEWTARGET; - ATTRIBUTE_NAMES[356] = ATTR_VERT_ADV_Y; - ATTRIBUTE_NAMES[357] = ATTR_PATHLENGTH; - ATTRIBUTE_NAMES[358] = ATTR_REPEAT_MAX; - ATTRIBUTE_NAMES[359] = ATTR_RADIOGROUP; - ATTRIBUTE_NAMES[360] = ATTR_STOP_COLOR; - ATTRIBUTE_NAMES[361] = ATTR_SEPARATORS; - ATTRIBUTE_NAMES[362] = ATTR_REPEAT_MIN; - ATTRIBUTE_NAMES[363] = ATTR_ROWSPACING; - ATTRIBUTE_NAMES[364] = ATTR_ZOOMANDPAN; - ATTRIBUTE_NAMES[365] = ATTR_XLINK_TYPE; - ATTRIBUTE_NAMES[366] = ATTR_XLINK_ROLE; - ATTRIBUTE_NAMES[367] = ATTR_XLINK_HREF; - ATTRIBUTE_NAMES[368] = ATTR_XLINK_SHOW; - ATTRIBUTE_NAMES[369] = ATTR_ACCENTUNDER; - ATTRIBUTE_NAMES[370] = ATTR_ARIA_SECRET; - ATTRIBUTE_NAMES[371] = ATTR_ARIA_ATOMIC; - ATTRIBUTE_NAMES[372] = ATTR_ARIA_HIDDEN; - ATTRIBUTE_NAMES[373] = ATTR_ARIA_FLOWTO; - ATTRIBUTE_NAMES[374] = ATTR_ARABIC_FORM; - ATTRIBUTE_NAMES[375] = ATTR_CELLPADDING; - ATTRIBUTE_NAMES[376] = ATTR_CELLSPACING; - ATTRIBUTE_NAMES[377] = ATTR_COLUMNWIDTH; - ATTRIBUTE_NAMES[378] = ATTR_CROSSORIGIN; - ATTRIBUTE_NAMES[379] = ATTR_COLUMNALIGN; - ATTRIBUTE_NAMES[380] = ATTR_COLUMNLINES; - ATTRIBUTE_NAMES[381] = ATTR_CONTEXTMENU; - ATTRIBUTE_NAMES[382] = ATTR_BASEPROFILE; - ATTRIBUTE_NAMES[383] = ATTR_FONT_FAMILY; - ATTRIBUTE_NAMES[384] = ATTR_FRAMEBORDER; - ATTRIBUTE_NAMES[385] = ATTR_FILTERUNITS; - ATTRIBUTE_NAMES[386] = ATTR_FLOOD_COLOR; - ATTRIBUTE_NAMES[387] = ATTR_FONT_WEIGHT; - ATTRIBUTE_NAMES[388] = ATTR_HORIZ_ADV_X; - ATTRIBUTE_NAMES[389] = ATTR_ONDRAGLEAVE; - ATTRIBUTE_NAMES[390] = ATTR_ONMOUSEMOVE; - ATTRIBUTE_NAMES[391] = ATTR_ORIENTATION; - ATTRIBUTE_NAMES[392] = ATTR_ONMOUSEDOWN; - ATTRIBUTE_NAMES[393] = ATTR_ONMOUSEOVER; - ATTRIBUTE_NAMES[394] = ATTR_ONDRAGENTER; - ATTRIBUTE_NAMES[395] = ATTR_IDEOGRAPHIC; - ATTRIBUTE_NAMES[396] = ATTR_ONBEFORECUT; - ATTRIBUTE_NAMES[397] = ATTR_ONFORMINPUT; - ATTRIBUTE_NAMES[398] = ATTR_ONDRAGSTART; - ATTRIBUTE_NAMES[399] = ATTR_ONMOVESTART; - ATTRIBUTE_NAMES[400] = ATTR_MARKERUNITS; - ATTRIBUTE_NAMES[401] = ATTR_MATHVARIANT; - ATTRIBUTE_NAMES[402] = ATTR_MARGINWIDTH; - ATTRIBUTE_NAMES[403] = ATTR_MARKERWIDTH; - ATTRIBUTE_NAMES[404] = ATTR_TEXT_ANCHOR; - ATTRIBUTE_NAMES[405] = ATTR_TABLEVALUES; - ATTRIBUTE_NAMES[406] = ATTR_SCRIPTLEVEL; - ATTRIBUTE_NAMES[407] = ATTR_REPEATCOUNT; - ATTRIBUTE_NAMES[408] = ATTR_STITCHTILES; - ATTRIBUTE_NAMES[409] = ATTR_STARTOFFSET; - ATTRIBUTE_NAMES[410] = ATTR_SCROLLDELAY; - ATTRIBUTE_NAMES[411] = ATTR_XMLNS_XLINK; - ATTRIBUTE_NAMES[412] = ATTR_XLINK_TITLE; - ATTRIBUTE_NAMES[413] = ATTR_ARIA_INVALID; - ATTRIBUTE_NAMES[414] = ATTR_ARIA_PRESSED; - ATTRIBUTE_NAMES[415] = ATTR_ARIA_CHECKED; - ATTRIBUTE_NAMES[416] = ATTR_AUTOCOMPLETE; - ATTRIBUTE_NAMES[417] = ATTR_ARIA_SETSIZE; - ATTRIBUTE_NAMES[418] = ATTR_ARIA_CHANNEL; - ATTRIBUTE_NAMES[419] = ATTR_EQUALCOLUMNS; - ATTRIBUTE_NAMES[420] = ATTR_DISPLAYSTYLE; - ATTRIBUTE_NAMES[421] = ATTR_DATAFORMATAS; - ATTRIBUTE_NAMES[422] = ATTR_FILL_OPACITY; - ATTRIBUTE_NAMES[423] = ATTR_FONT_VARIANT; - ATTRIBUTE_NAMES[424] = ATTR_FONT_STRETCH; - ATTRIBUTE_NAMES[425] = ATTR_FRAMESPACING; - ATTRIBUTE_NAMES[426] = ATTR_KERNELMATRIX; - ATTRIBUTE_NAMES[427] = ATTR_ONDEACTIVATE; - ATTRIBUTE_NAMES[428] = ATTR_ONROWSDELETE; - ATTRIBUTE_NAMES[429] = ATTR_ONMOUSELEAVE; - ATTRIBUTE_NAMES[430] = ATTR_ONFORMCHANGE; - ATTRIBUTE_NAMES[431] = ATTR_ONCELLCHANGE; - ATTRIBUTE_NAMES[432] = ATTR_ONMOUSEWHEEL; - ATTRIBUTE_NAMES[433] = ATTR_ONMOUSEENTER; - ATTRIBUTE_NAMES[434] = ATTR_ONAFTERPRINT; - ATTRIBUTE_NAMES[435] = ATTR_ONBEFORECOPY; - ATTRIBUTE_NAMES[436] = ATTR_MARGINHEIGHT; - ATTRIBUTE_NAMES[437] = ATTR_MARKERHEIGHT; - ATTRIBUTE_NAMES[438] = ATTR_MARKER_START; - ATTRIBUTE_NAMES[439] = ATTR_MATHEMATICAL; - ATTRIBUTE_NAMES[440] = ATTR_LENGTHADJUST; - ATTRIBUTE_NAMES[441] = ATTR_UNSELECTABLE; - ATTRIBUTE_NAMES[442] = ATTR_UNICODE_BIDI; - ATTRIBUTE_NAMES[443] = ATTR_UNITS_PER_EM; - ATTRIBUTE_NAMES[444] = ATTR_WORD_SPACING; - ATTRIBUTE_NAMES[445] = ATTR_WRITING_MODE; - ATTRIBUTE_NAMES[446] = ATTR_V_ALPHABETIC; - ATTRIBUTE_NAMES[447] = ATTR_PATTERNUNITS; - ATTRIBUTE_NAMES[448] = ATTR_SPREADMETHOD; - ATTRIBUTE_NAMES[449] = ATTR_SURFACESCALE; - ATTRIBUTE_NAMES[450] = ATTR_STROKE_WIDTH; - ATTRIBUTE_NAMES[451] = ATTR_REPEAT_START; - ATTRIBUTE_NAMES[452] = ATTR_STDDEVIATION; - ATTRIBUTE_NAMES[453] = ATTR_STOP_OPACITY; - ATTRIBUTE_NAMES[454] = ATTR_ARIA_CONTROLS; - ATTRIBUTE_NAMES[455] = ATTR_ARIA_HASPOPUP; - ATTRIBUTE_NAMES[456] = ATTR_ACCENT_HEIGHT; - ATTRIBUTE_NAMES[457] = ATTR_ARIA_VALUENOW; - ATTRIBUTE_NAMES[458] = ATTR_ARIA_RELEVANT; - ATTRIBUTE_NAMES[459] = ATTR_ARIA_POSINSET; - ATTRIBUTE_NAMES[460] = ATTR_ARIA_VALUEMAX; - ATTRIBUTE_NAMES[461] = ATTR_ARIA_READONLY; - ATTRIBUTE_NAMES[462] = ATTR_ARIA_SELECTED; - ATTRIBUTE_NAMES[463] = ATTR_ARIA_REQUIRED; - ATTRIBUTE_NAMES[464] = ATTR_ARIA_EXPANDED; - ATTRIBUTE_NAMES[465] = ATTR_ARIA_DISABLED; - ATTRIBUTE_NAMES[466] = ATTR_ATTRIBUTETYPE; - ATTRIBUTE_NAMES[467] = ATTR_ATTRIBUTENAME; - ATTRIBUTE_NAMES[468] = ATTR_ARIA_DATATYPE; - ATTRIBUTE_NAMES[469] = ATTR_ARIA_VALUEMIN; - ATTRIBUTE_NAMES[470] = ATTR_BASEFREQUENCY; - ATTRIBUTE_NAMES[471] = ATTR_COLUMNSPACING; - ATTRIBUTE_NAMES[472] = ATTR_COLOR_PROFILE; - ATTRIBUTE_NAMES[473] = ATTR_CLIPPATHUNITS; - ATTRIBUTE_NAMES[474] = ATTR_DEFINITIONURL; - ATTRIBUTE_NAMES[475] = ATTR_GRADIENTUNITS; - ATTRIBUTE_NAMES[476] = ATTR_FLOOD_OPACITY; - ATTRIBUTE_NAMES[477] = ATTR_ONAFTERUPDATE; - ATTRIBUTE_NAMES[478] = ATTR_ONERRORUPDATE; - ATTRIBUTE_NAMES[479] = ATTR_ONBEFOREPASTE; - ATTRIBUTE_NAMES[480] = ATTR_ONLOSECAPTURE; - ATTRIBUTE_NAMES[481] = ATTR_ONCONTEXTMENU; - ATTRIBUTE_NAMES[482] = ATTR_ONSELECTSTART; - ATTRIBUTE_NAMES[483] = ATTR_ONBEFOREPRINT; - ATTRIBUTE_NAMES[484] = ATTR_MOVABLELIMITS; - ATTRIBUTE_NAMES[485] = ATTR_LINETHICKNESS; - ATTRIBUTE_NAMES[486] = ATTR_UNICODE_RANGE; - ATTRIBUTE_NAMES[487] = ATTR_THINMATHSPACE; - ATTRIBUTE_NAMES[488] = ATTR_VERT_ORIGIN_X; - ATTRIBUTE_NAMES[489] = ATTR_VERT_ORIGIN_Y; - ATTRIBUTE_NAMES[490] = ATTR_V_IDEOGRAPHIC; - ATTRIBUTE_NAMES[491] = ATTR_PRESERVEALPHA; - ATTRIBUTE_NAMES[492] = ATTR_SCRIPTMINSIZE; - ATTRIBUTE_NAMES[493] = ATTR_SPECIFICATION; - ATTRIBUTE_NAMES[494] = ATTR_XLINK_ACTUATE; - ATTRIBUTE_NAMES[495] = ATTR_XLINK_ARCROLE; - ATTRIBUTE_NAMES[496] = ATTR_ACCEPT_CHARSET; - ATTRIBUTE_NAMES[497] = ATTR_ALIGNMENTSCOPE; - ATTRIBUTE_NAMES[498] = ATTR_ARIA_MULTILINE; - ATTRIBUTE_NAMES[499] = ATTR_BASELINE_SHIFT; - ATTRIBUTE_NAMES[500] = ATTR_HORIZ_ORIGIN_X; - ATTRIBUTE_NAMES[501] = ATTR_HORIZ_ORIGIN_Y; - ATTRIBUTE_NAMES[502] = ATTR_ONBEFOREUPDATE; - ATTRIBUTE_NAMES[503] = ATTR_ONFILTERCHANGE; - ATTRIBUTE_NAMES[504] = ATTR_ONROWSINSERTED; - ATTRIBUTE_NAMES[505] = ATTR_ONBEFOREUNLOAD; - ATTRIBUTE_NAMES[506] = ATTR_MATHBACKGROUND; - ATTRIBUTE_NAMES[507] = ATTR_LETTER_SPACING; - ATTRIBUTE_NAMES[508] = ATTR_LIGHTING_COLOR; - ATTRIBUTE_NAMES[509] = ATTR_THICKMATHSPACE; - ATTRIBUTE_NAMES[510] = ATTR_TEXT_RENDERING; - ATTRIBUTE_NAMES[511] = ATTR_V_MATHEMATICAL; - ATTRIBUTE_NAMES[512] = ATTR_POINTER_EVENTS; - ATTRIBUTE_NAMES[513] = ATTR_PRIMITIVEUNITS; - ATTRIBUTE_NAMES[514] = ATTR_SYSTEMLANGUAGE; - ATTRIBUTE_NAMES[515] = ATTR_STROKE_LINECAP; - ATTRIBUTE_NAMES[516] = ATTR_SUBSCRIPTSHIFT; - ATTRIBUTE_NAMES[517] = ATTR_STROKE_OPACITY; - ATTRIBUTE_NAMES[518] = ATTR_ARIA_DROPEFFECT; - ATTRIBUTE_NAMES[519] = ATTR_ARIA_LABELLEDBY; - ATTRIBUTE_NAMES[520] = ATTR_ARIA_TEMPLATEID; - ATTRIBUTE_NAMES[521] = ATTR_COLOR_RENDERING; - ATTRIBUTE_NAMES[522] = ATTR_CONTENTEDITABLE; - ATTRIBUTE_NAMES[523] = ATTR_DIFFUSECONSTANT; - ATTRIBUTE_NAMES[524] = ATTR_ONDATAAVAILABLE; - ATTRIBUTE_NAMES[525] = ATTR_ONCONTROLSELECT; - ATTRIBUTE_NAMES[526] = ATTR_IMAGE_RENDERING; - ATTRIBUTE_NAMES[527] = ATTR_MEDIUMMATHSPACE; - ATTRIBUTE_NAMES[528] = ATTR_TEXT_DECORATION; - ATTRIBUTE_NAMES[529] = ATTR_SHAPE_RENDERING; - ATTRIBUTE_NAMES[530] = ATTR_STROKE_LINEJOIN; - ATTRIBUTE_NAMES[531] = ATTR_REPEAT_TEMPLATE; - ATTRIBUTE_NAMES[532] = ATTR_ARIA_DESCRIBEDBY; - ATTRIBUTE_NAMES[533] = ATTR_FONT_SIZE_ADJUST; - ATTRIBUTE_NAMES[534] = ATTR_KERNELUNITLENGTH; - ATTRIBUTE_NAMES[535] = ATTR_ONBEFOREACTIVATE; - ATTRIBUTE_NAMES[536] = ATTR_ONPROPERTYCHANGE; - ATTRIBUTE_NAMES[537] = ATTR_ONDATASETCHANGED; - ATTRIBUTE_NAMES[538] = ATTR_MASKCONTENTUNITS; - ATTRIBUTE_NAMES[539] = ATTR_PATTERNTRANSFORM; - ATTRIBUTE_NAMES[540] = ATTR_REQUIREDFEATURES; - ATTRIBUTE_NAMES[541] = ATTR_RENDERING_INTENT; - ATTRIBUTE_NAMES[542] = ATTR_SPECULAREXPONENT; - ATTRIBUTE_NAMES[543] = ATTR_SPECULARCONSTANT; - ATTRIBUTE_NAMES[544] = ATTR_SUPERSCRIPTSHIFT; - ATTRIBUTE_NAMES[545] = ATTR_STROKE_DASHARRAY; - ATTRIBUTE_NAMES[546] = ATTR_XCHANNELSELECTOR; - ATTRIBUTE_NAMES[547] = ATTR_YCHANNELSELECTOR; - ATTRIBUTE_NAMES[548] = ATTR_ARIA_AUTOCOMPLETE; - ATTRIBUTE_NAMES[549] = ATTR_ENABLE_BACKGROUND; - ATTRIBUTE_NAMES[550] = ATTR_DOMINANT_BASELINE; - ATTRIBUTE_NAMES[551] = ATTR_GRADIENTTRANSFORM; - ATTRIBUTE_NAMES[552] = ATTR_ONBEFORDEACTIVATE; - ATTRIBUTE_NAMES[553] = ATTR_ONDATASETCOMPLETE; - ATTRIBUTE_NAMES[554] = ATTR_OVERLINE_POSITION; - ATTRIBUTE_NAMES[555] = ATTR_ONBEFOREEDITFOCUS; - ATTRIBUTE_NAMES[556] = ATTR_LIMITINGCONEANGLE; - ATTRIBUTE_NAMES[557] = ATTR_VERYTHINMATHSPACE; - ATTRIBUTE_NAMES[558] = ATTR_STROKE_DASHOFFSET; - ATTRIBUTE_NAMES[559] = ATTR_STROKE_MITERLIMIT; - ATTRIBUTE_NAMES[560] = ATTR_ALIGNMENT_BASELINE; - ATTRIBUTE_NAMES[561] = ATTR_ONREADYSTATECHANGE; - ATTRIBUTE_NAMES[562] = ATTR_OVERLINE_THICKNESS; - ATTRIBUTE_NAMES[563] = ATTR_UNDERLINE_POSITION; - ATTRIBUTE_NAMES[564] = ATTR_VERYTHICKMATHSPACE; - ATTRIBUTE_NAMES[565] = ATTR_REQUIREDEXTENSIONS; - ATTRIBUTE_NAMES[566] = ATTR_COLOR_INTERPOLATION; - ATTRIBUTE_NAMES[567] = ATTR_UNDERLINE_THICKNESS; - ATTRIBUTE_NAMES[568] = ATTR_PRESERVEASPECTRATIO; - ATTRIBUTE_NAMES[569] = ATTR_PATTERNCONTENTUNITS; - ATTRIBUTE_NAMES[570] = ATTR_ARIA_MULTISELECTABLE; - ATTRIBUTE_NAMES[571] = ATTR_SCRIPTSIZEMULTIPLIER; - ATTRIBUTE_NAMES[572] = ATTR_ARIA_ACTIVEDESCENDANT; - ATTRIBUTE_NAMES[573] = ATTR_VERYVERYTHINMATHSPACE; - ATTRIBUTE_NAMES[574] = ATTR_VERYVERYTHICKMATHSPACE; - ATTRIBUTE_NAMES[575] = ATTR_STRIKETHROUGH_POSITION; - ATTRIBUTE_NAMES[576] = ATTR_STRIKETHROUGH_THICKNESS; - ATTRIBUTE_NAMES[577] = ATTR_GLYPH_ORIENTATION_VERTICAL; - ATTRIBUTE_NAMES[578] = ATTR_COLOR_INTERPOLATION_FILTERS; - ATTRIBUTE_NAMES[579] = ATTR_GLYPH_ORIENTATION_HORIZONTAL; + ATTRIBUTE_NAMES[304] = ATTR_INTEGRITY; + ATTRIBUTE_NAMES[305] = ATTR_ONKEYDOWN; + ATTRIBUTE_NAMES[306] = ATTR_ONFOCUSIN; + ATTRIBUTE_NAMES[307] = ATTR_ONMOUSEUP; + ATTRIBUTE_NAMES[308] = ATTR_INPUTMODE; + ATTRIBUTE_NAMES[309] = ATTR_ONROWEXIT; + ATTRIBUTE_NAMES[310] = ATTR_MATHCOLOR; + ATTRIBUTE_NAMES[311] = ATTR_MASKUNITS; + ATTRIBUTE_NAMES[312] = ATTR_MAXLENGTH; + ATTRIBUTE_NAMES[313] = ATTR_LINEBREAK; + ATTRIBUTE_NAMES[314] = ATTR_TRANSFORM; + ATTRIBUTE_NAMES[315] = ATTR_V_HANGING; + ATTRIBUTE_NAMES[316] = ATTR_VALUETYPE; + ATTRIBUTE_NAMES[317] = ATTR_POINTSATZ; + ATTRIBUTE_NAMES[318] = ATTR_POINTSATX; + ATTRIBUTE_NAMES[319] = ATTR_POINTSATY; + ATTRIBUTE_NAMES[320] = ATTR_SYMMETRIC; + ATTRIBUTE_NAMES[321] = ATTR_SCROLLING; + ATTRIBUTE_NAMES[322] = ATTR_REPEATDUR; + ATTRIBUTE_NAMES[323] = ATTR_SELECTION; + ATTRIBUTE_NAMES[324] = ATTR_SEPARATOR; + ATTRIBUTE_NAMES[325] = ATTR_XML_SPACE; + ATTRIBUTE_NAMES[326] = ATTR_AUTOSUBMIT; + ATTRIBUTE_NAMES[327] = ATTR_ALPHABETIC; + ATTRIBUTE_NAMES[328] = ATTR_ACTIONTYPE; + ATTRIBUTE_NAMES[329] = ATTR_ACCUMULATE; + ATTRIBUTE_NAMES[330] = ATTR_ARIA_LEVEL; + ATTRIBUTE_NAMES[331] = ATTR_COLUMNSPAN; + ATTRIBUTE_NAMES[332] = ATTR_CAP_HEIGHT; + ATTRIBUTE_NAMES[333] = ATTR_BACKGROUND; + ATTRIBUTE_NAMES[334] = ATTR_GLYPH_NAME; + ATTRIBUTE_NAMES[335] = ATTR_GROUPALIGN; + ATTRIBUTE_NAMES[336] = ATTR_FONTFAMILY; + ATTRIBUTE_NAMES[337] = ATTR_FONTWEIGHT; + ATTRIBUTE_NAMES[338] = ATTR_FONT_STYLE; + ATTRIBUTE_NAMES[339] = ATTR_KEYSPLINES; + ATTRIBUTE_NAMES[340] = ATTR_HTTP_EQUIV; + ATTRIBUTE_NAMES[341] = ATTR_ONACTIVATE; + ATTRIBUTE_NAMES[342] = ATTR_OCCURRENCE; + ATTRIBUTE_NAMES[343] = ATTR_IRRELEVANT; + ATTRIBUTE_NAMES[344] = ATTR_ONDBLCLICK; + ATTRIBUTE_NAMES[345] = ATTR_ONDRAGDROP; + ATTRIBUTE_NAMES[346] = ATTR_ONKEYPRESS; + ATTRIBUTE_NAMES[347] = ATTR_ONROWENTER; + ATTRIBUTE_NAMES[348] = ATTR_ONDRAGOVER; + ATTRIBUTE_NAMES[349] = ATTR_ONFOCUSOUT; + ATTRIBUTE_NAMES[350] = ATTR_ONMOUSEOUT; + ATTRIBUTE_NAMES[351] = ATTR_NUMOCTAVES; + ATTRIBUTE_NAMES[352] = ATTR_MARKER_MID; + ATTRIBUTE_NAMES[353] = ATTR_MARKER_END; + ATTRIBUTE_NAMES[354] = ATTR_TEXTLENGTH; + ATTRIBUTE_NAMES[355] = ATTR_VISIBILITY; + ATTRIBUTE_NAMES[356] = ATTR_VIEWTARGET; + ATTRIBUTE_NAMES[357] = ATTR_VERT_ADV_Y; + ATTRIBUTE_NAMES[358] = ATTR_PATHLENGTH; + ATTRIBUTE_NAMES[359] = ATTR_REPEAT_MAX; + ATTRIBUTE_NAMES[360] = ATTR_RADIOGROUP; + ATTRIBUTE_NAMES[361] = ATTR_STOP_COLOR; + ATTRIBUTE_NAMES[362] = ATTR_SEPARATORS; + ATTRIBUTE_NAMES[363] = ATTR_REPEAT_MIN; + ATTRIBUTE_NAMES[364] = ATTR_ROWSPACING; + ATTRIBUTE_NAMES[365] = ATTR_ZOOMANDPAN; + ATTRIBUTE_NAMES[366] = ATTR_XLINK_TYPE; + ATTRIBUTE_NAMES[367] = ATTR_XLINK_ROLE; + ATTRIBUTE_NAMES[368] = ATTR_XLINK_HREF; + ATTRIBUTE_NAMES[369] = ATTR_XLINK_SHOW; + ATTRIBUTE_NAMES[370] = ATTR_ACCENTUNDER; + ATTRIBUTE_NAMES[371] = ATTR_ARIA_SECRET; + ATTRIBUTE_NAMES[372] = ATTR_ARIA_ATOMIC; + ATTRIBUTE_NAMES[373] = ATTR_ARIA_HIDDEN; + ATTRIBUTE_NAMES[374] = ATTR_ARIA_FLOWTO; + ATTRIBUTE_NAMES[375] = ATTR_ARABIC_FORM; + ATTRIBUTE_NAMES[376] = ATTR_CELLPADDING; + ATTRIBUTE_NAMES[377] = ATTR_CELLSPACING; + ATTRIBUTE_NAMES[378] = ATTR_COLUMNWIDTH; + ATTRIBUTE_NAMES[379] = ATTR_CROSSORIGIN; + ATTRIBUTE_NAMES[380] = ATTR_COLUMNALIGN; + ATTRIBUTE_NAMES[381] = ATTR_COLUMNLINES; + ATTRIBUTE_NAMES[382] = ATTR_CONTEXTMENU; + ATTRIBUTE_NAMES[383] = ATTR_BASEPROFILE; + ATTRIBUTE_NAMES[384] = ATTR_FONT_FAMILY; + ATTRIBUTE_NAMES[385] = ATTR_FRAMEBORDER; + ATTRIBUTE_NAMES[386] = ATTR_FILTERUNITS; + ATTRIBUTE_NAMES[387] = ATTR_FLOOD_COLOR; + ATTRIBUTE_NAMES[388] = ATTR_FONT_WEIGHT; + ATTRIBUTE_NAMES[389] = ATTR_HORIZ_ADV_X; + ATTRIBUTE_NAMES[390] = ATTR_ONDRAGLEAVE; + ATTRIBUTE_NAMES[391] = ATTR_ONMOUSEMOVE; + ATTRIBUTE_NAMES[392] = ATTR_ORIENTATION; + ATTRIBUTE_NAMES[393] = ATTR_ONMOUSEDOWN; + ATTRIBUTE_NAMES[394] = ATTR_ONMOUSEOVER; + ATTRIBUTE_NAMES[395] = ATTR_ONDRAGENTER; + ATTRIBUTE_NAMES[396] = ATTR_IDEOGRAPHIC; + ATTRIBUTE_NAMES[397] = ATTR_ONBEFORECUT; + ATTRIBUTE_NAMES[398] = ATTR_ONFORMINPUT; + ATTRIBUTE_NAMES[399] = ATTR_ONDRAGSTART; + ATTRIBUTE_NAMES[400] = ATTR_ONMOVESTART; + ATTRIBUTE_NAMES[401] = ATTR_MARKERUNITS; + ATTRIBUTE_NAMES[402] = ATTR_MATHVARIANT; + ATTRIBUTE_NAMES[403] = ATTR_MARGINWIDTH; + ATTRIBUTE_NAMES[404] = ATTR_MARKERWIDTH; + ATTRIBUTE_NAMES[405] = ATTR_TEXT_ANCHOR; + ATTRIBUTE_NAMES[406] = ATTR_TABLEVALUES; + ATTRIBUTE_NAMES[407] = ATTR_SCRIPTLEVEL; + ATTRIBUTE_NAMES[408] = ATTR_REPEATCOUNT; + ATTRIBUTE_NAMES[409] = ATTR_STITCHTILES; + ATTRIBUTE_NAMES[410] = ATTR_STARTOFFSET; + ATTRIBUTE_NAMES[411] = ATTR_SCROLLDELAY; + ATTRIBUTE_NAMES[412] = ATTR_XMLNS_XLINK; + ATTRIBUTE_NAMES[413] = ATTR_XLINK_TITLE; + ATTRIBUTE_NAMES[414] = ATTR_ARIA_INVALID; + ATTRIBUTE_NAMES[415] = ATTR_ARIA_PRESSED; + ATTRIBUTE_NAMES[416] = ATTR_ARIA_CHECKED; + ATTRIBUTE_NAMES[417] = ATTR_AUTOCOMPLETE; + ATTRIBUTE_NAMES[418] = ATTR_ARIA_SETSIZE; + ATTRIBUTE_NAMES[419] = ATTR_ARIA_CHANNEL; + ATTRIBUTE_NAMES[420] = ATTR_EQUALCOLUMNS; + ATTRIBUTE_NAMES[421] = ATTR_DISPLAYSTYLE; + ATTRIBUTE_NAMES[422] = ATTR_DATAFORMATAS; + ATTRIBUTE_NAMES[423] = ATTR_FILL_OPACITY; + ATTRIBUTE_NAMES[424] = ATTR_FONT_VARIANT; + ATTRIBUTE_NAMES[425] = ATTR_FONT_STRETCH; + ATTRIBUTE_NAMES[426] = ATTR_FRAMESPACING; + ATTRIBUTE_NAMES[427] = ATTR_KERNELMATRIX; + ATTRIBUTE_NAMES[428] = ATTR_ONDEACTIVATE; + ATTRIBUTE_NAMES[429] = ATTR_ONROWSDELETE; + ATTRIBUTE_NAMES[430] = ATTR_ONMOUSELEAVE; + ATTRIBUTE_NAMES[431] = ATTR_ONFORMCHANGE; + ATTRIBUTE_NAMES[432] = ATTR_ONCELLCHANGE; + ATTRIBUTE_NAMES[433] = ATTR_ONMOUSEWHEEL; + ATTRIBUTE_NAMES[434] = ATTR_ONMOUSEENTER; + ATTRIBUTE_NAMES[435] = ATTR_ONAFTERPRINT; + ATTRIBUTE_NAMES[436] = ATTR_ONBEFORECOPY; + ATTRIBUTE_NAMES[437] = ATTR_MARGINHEIGHT; + ATTRIBUTE_NAMES[438] = ATTR_MARKERHEIGHT; + ATTRIBUTE_NAMES[439] = ATTR_MARKER_START; + ATTRIBUTE_NAMES[440] = ATTR_MATHEMATICAL; + ATTRIBUTE_NAMES[441] = ATTR_LENGTHADJUST; + ATTRIBUTE_NAMES[442] = ATTR_UNSELECTABLE; + ATTRIBUTE_NAMES[443] = ATTR_UNICODE_BIDI; + ATTRIBUTE_NAMES[444] = ATTR_UNITS_PER_EM; + ATTRIBUTE_NAMES[445] = ATTR_WORD_SPACING; + ATTRIBUTE_NAMES[446] = ATTR_WRITING_MODE; + ATTRIBUTE_NAMES[447] = ATTR_V_ALPHABETIC; + ATTRIBUTE_NAMES[448] = ATTR_PATTERNUNITS; + ATTRIBUTE_NAMES[449] = ATTR_SPREADMETHOD; + ATTRIBUTE_NAMES[450] = ATTR_SURFACESCALE; + ATTRIBUTE_NAMES[451] = ATTR_STROKE_WIDTH; + ATTRIBUTE_NAMES[452] = ATTR_REPEAT_START; + ATTRIBUTE_NAMES[453] = ATTR_STDDEVIATION; + ATTRIBUTE_NAMES[454] = ATTR_STOP_OPACITY; + ATTRIBUTE_NAMES[455] = ATTR_ARIA_CONTROLS; + ATTRIBUTE_NAMES[456] = ATTR_ARIA_HASPOPUP; + ATTRIBUTE_NAMES[457] = ATTR_ACCENT_HEIGHT; + ATTRIBUTE_NAMES[458] = ATTR_ARIA_VALUENOW; + ATTRIBUTE_NAMES[459] = ATTR_ARIA_RELEVANT; + ATTRIBUTE_NAMES[460] = ATTR_ARIA_POSINSET; + ATTRIBUTE_NAMES[461] = ATTR_ARIA_VALUEMAX; + ATTRIBUTE_NAMES[462] = ATTR_ARIA_READONLY; + ATTRIBUTE_NAMES[463] = ATTR_ARIA_SELECTED; + ATTRIBUTE_NAMES[464] = ATTR_ARIA_REQUIRED; + ATTRIBUTE_NAMES[465] = ATTR_ARIA_EXPANDED; + ATTRIBUTE_NAMES[466] = ATTR_ARIA_DISABLED; + ATTRIBUTE_NAMES[467] = ATTR_ATTRIBUTETYPE; + ATTRIBUTE_NAMES[468] = ATTR_ATTRIBUTENAME; + ATTRIBUTE_NAMES[469] = ATTR_ARIA_DATATYPE; + ATTRIBUTE_NAMES[470] = ATTR_ARIA_VALUEMIN; + ATTRIBUTE_NAMES[471] = ATTR_BASEFREQUENCY; + ATTRIBUTE_NAMES[472] = ATTR_COLUMNSPACING; + ATTRIBUTE_NAMES[473] = ATTR_COLOR_PROFILE; + ATTRIBUTE_NAMES[474] = ATTR_CLIPPATHUNITS; + ATTRIBUTE_NAMES[475] = ATTR_DEFINITIONURL; + ATTRIBUTE_NAMES[476] = ATTR_GRADIENTUNITS; + ATTRIBUTE_NAMES[477] = ATTR_FLOOD_OPACITY; + ATTRIBUTE_NAMES[478] = ATTR_ONAFTERUPDATE; + ATTRIBUTE_NAMES[479] = ATTR_ONERRORUPDATE; + ATTRIBUTE_NAMES[480] = ATTR_ONBEFOREPASTE; + ATTRIBUTE_NAMES[481] = ATTR_ONLOSECAPTURE; + ATTRIBUTE_NAMES[482] = ATTR_ONCONTEXTMENU; + ATTRIBUTE_NAMES[483] = ATTR_ONSELECTSTART; + ATTRIBUTE_NAMES[484] = ATTR_ONBEFOREPRINT; + ATTRIBUTE_NAMES[485] = ATTR_MOVABLELIMITS; + ATTRIBUTE_NAMES[486] = ATTR_LINETHICKNESS; + ATTRIBUTE_NAMES[487] = ATTR_UNICODE_RANGE; + ATTRIBUTE_NAMES[488] = ATTR_THINMATHSPACE; + ATTRIBUTE_NAMES[489] = ATTR_VERT_ORIGIN_X; + ATTRIBUTE_NAMES[490] = ATTR_VERT_ORIGIN_Y; + ATTRIBUTE_NAMES[491] = ATTR_V_IDEOGRAPHIC; + ATTRIBUTE_NAMES[492] = ATTR_PRESERVEALPHA; + ATTRIBUTE_NAMES[493] = ATTR_SCRIPTMINSIZE; + ATTRIBUTE_NAMES[494] = ATTR_SPECIFICATION; + ATTRIBUTE_NAMES[495] = ATTR_XLINK_ACTUATE; + ATTRIBUTE_NAMES[496] = ATTR_XLINK_ARCROLE; + ATTRIBUTE_NAMES[497] = ATTR_ACCEPT_CHARSET; + ATTRIBUTE_NAMES[498] = ATTR_ALIGNMENTSCOPE; + ATTRIBUTE_NAMES[499] = ATTR_ARIA_MULTILINE; + ATTRIBUTE_NAMES[500] = ATTR_BASELINE_SHIFT; + ATTRIBUTE_NAMES[501] = ATTR_HORIZ_ORIGIN_X; + ATTRIBUTE_NAMES[502] = ATTR_HORIZ_ORIGIN_Y; + ATTRIBUTE_NAMES[503] = ATTR_ONBEFOREUPDATE; + ATTRIBUTE_NAMES[504] = ATTR_ONFILTERCHANGE; + ATTRIBUTE_NAMES[505] = ATTR_ONROWSINSERTED; + ATTRIBUTE_NAMES[506] = ATTR_ONBEFOREUNLOAD; + ATTRIBUTE_NAMES[507] = ATTR_MATHBACKGROUND; + ATTRIBUTE_NAMES[508] = ATTR_LETTER_SPACING; + ATTRIBUTE_NAMES[509] = ATTR_LIGHTING_COLOR; + ATTRIBUTE_NAMES[510] = ATTR_THICKMATHSPACE; + ATTRIBUTE_NAMES[511] = ATTR_TEXT_RENDERING; + ATTRIBUTE_NAMES[512] = ATTR_V_MATHEMATICAL; + ATTRIBUTE_NAMES[513] = ATTR_POINTER_EVENTS; + ATTRIBUTE_NAMES[514] = ATTR_PRIMITIVEUNITS; + ATTRIBUTE_NAMES[515] = ATTR_SYSTEMLANGUAGE; + ATTRIBUTE_NAMES[516] = ATTR_STROKE_LINECAP; + ATTRIBUTE_NAMES[517] = ATTR_SUBSCRIPTSHIFT; + ATTRIBUTE_NAMES[518] = ATTR_STROKE_OPACITY; + ATTRIBUTE_NAMES[519] = ATTR_ARIA_DROPEFFECT; + ATTRIBUTE_NAMES[520] = ATTR_ARIA_LABELLEDBY; + ATTRIBUTE_NAMES[521] = ATTR_ARIA_TEMPLATEID; + ATTRIBUTE_NAMES[522] = ATTR_COLOR_RENDERING; + ATTRIBUTE_NAMES[523] = ATTR_CONTENTEDITABLE; + ATTRIBUTE_NAMES[524] = ATTR_DIFFUSECONSTANT; + ATTRIBUTE_NAMES[525] = ATTR_ONDATAAVAILABLE; + ATTRIBUTE_NAMES[526] = ATTR_ONCONTROLSELECT; + ATTRIBUTE_NAMES[527] = ATTR_IMAGE_RENDERING; + ATTRIBUTE_NAMES[528] = ATTR_MEDIUMMATHSPACE; + ATTRIBUTE_NAMES[529] = ATTR_TEXT_DECORATION; + ATTRIBUTE_NAMES[530] = ATTR_SHAPE_RENDERING; + ATTRIBUTE_NAMES[531] = ATTR_STROKE_LINEJOIN; + ATTRIBUTE_NAMES[532] = ATTR_REPEAT_TEMPLATE; + ATTRIBUTE_NAMES[533] = ATTR_ARIA_DESCRIBEDBY; + ATTRIBUTE_NAMES[534] = ATTR_FONT_SIZE_ADJUST; + ATTRIBUTE_NAMES[535] = ATTR_KERNELUNITLENGTH; + ATTRIBUTE_NAMES[536] = ATTR_ONBEFOREACTIVATE; + ATTRIBUTE_NAMES[537] = ATTR_ONPROPERTYCHANGE; + ATTRIBUTE_NAMES[538] = ATTR_ONDATASETCHANGED; + ATTRIBUTE_NAMES[539] = ATTR_MASKCONTENTUNITS; + ATTRIBUTE_NAMES[540] = ATTR_PATTERNTRANSFORM; + ATTRIBUTE_NAMES[541] = ATTR_REQUIREDFEATURES; + ATTRIBUTE_NAMES[542] = ATTR_RENDERING_INTENT; + ATTRIBUTE_NAMES[543] = ATTR_SPECULAREXPONENT; + ATTRIBUTE_NAMES[544] = ATTR_SPECULARCONSTANT; + ATTRIBUTE_NAMES[545] = ATTR_SUPERSCRIPTSHIFT; + ATTRIBUTE_NAMES[546] = ATTR_STROKE_DASHARRAY; + ATTRIBUTE_NAMES[547] = ATTR_XCHANNELSELECTOR; + ATTRIBUTE_NAMES[548] = ATTR_YCHANNELSELECTOR; + ATTRIBUTE_NAMES[549] = ATTR_ARIA_AUTOCOMPLETE; + ATTRIBUTE_NAMES[550] = ATTR_ENABLE_BACKGROUND; + ATTRIBUTE_NAMES[551] = ATTR_DOMINANT_BASELINE; + ATTRIBUTE_NAMES[552] = ATTR_GRADIENTTRANSFORM; + ATTRIBUTE_NAMES[553] = ATTR_ONBEFORDEACTIVATE; + ATTRIBUTE_NAMES[554] = ATTR_ONDATASETCOMPLETE; + ATTRIBUTE_NAMES[555] = ATTR_OVERLINE_POSITION; + ATTRIBUTE_NAMES[556] = ATTR_ONBEFOREEDITFOCUS; + ATTRIBUTE_NAMES[557] = ATTR_LIMITINGCONEANGLE; + ATTRIBUTE_NAMES[558] = ATTR_VERYTHINMATHSPACE; + ATTRIBUTE_NAMES[559] = ATTR_STROKE_DASHOFFSET; + ATTRIBUTE_NAMES[560] = ATTR_STROKE_MITERLIMIT; + ATTRIBUTE_NAMES[561] = ATTR_ALIGNMENT_BASELINE; + ATTRIBUTE_NAMES[562] = ATTR_ONREADYSTATECHANGE; + ATTRIBUTE_NAMES[563] = ATTR_OVERLINE_THICKNESS; + ATTRIBUTE_NAMES[564] = ATTR_UNDERLINE_POSITION; + ATTRIBUTE_NAMES[565] = ATTR_VERYTHICKMATHSPACE; + ATTRIBUTE_NAMES[566] = ATTR_REQUIREDEXTENSIONS; + ATTRIBUTE_NAMES[567] = ATTR_COLOR_INTERPOLATION; + ATTRIBUTE_NAMES[568] = ATTR_UNDERLINE_THICKNESS; + ATTRIBUTE_NAMES[569] = ATTR_PRESERVEASPECTRATIO; + ATTRIBUTE_NAMES[570] = ATTR_PATTERNCONTENTUNITS; + ATTRIBUTE_NAMES[571] = ATTR_ARIA_MULTISELECTABLE; + ATTRIBUTE_NAMES[572] = ATTR_SCRIPTSIZEMULTIPLIER; + ATTRIBUTE_NAMES[573] = ATTR_ARIA_ACTIVEDESCENDANT; + ATTRIBUTE_NAMES[574] = ATTR_VERYVERYTHINMATHSPACE; + ATTRIBUTE_NAMES[575] = ATTR_VERYVERYTHICKMATHSPACE; + ATTRIBUTE_NAMES[576] = ATTR_STRIKETHROUGH_POSITION; + ATTRIBUTE_NAMES[577] = ATTR_STRIKETHROUGH_THICKNESS; + ATTRIBUTE_NAMES[578] = ATTR_GLYPH_ORIENTATION_VERTICAL; + ATTRIBUTE_NAMES[579] = ATTR_COLOR_INTERPOLATION_FILTERS; + ATTRIBUTE_NAMES[580] = ATTR_GLYPH_ORIENTATION_HORIZONTAL; } void @@ -2291,6 +2294,7 @@ nsHtml5AttributeName::releaseStatics() delete ATTR_ONDRAGEND; delete ATTR_ONMOVEEND; delete ATTR_ONINVALID; + delete ATTR_INTEGRITY; delete ATTR_ONKEYDOWN; delete ATTR_ONFOCUSIN; delete ATTR_ONMOUSEUP; diff --git a/parser/html/nsHtml5AttributeName.h b/parser/html/nsHtml5AttributeName.h index 5284c70fda1f..afbdfe317df0 100644 --- a/parser/html/nsHtml5AttributeName.h +++ b/parser/html/nsHtml5AttributeName.h @@ -396,6 +396,7 @@ class nsHtml5AttributeName static nsHtml5AttributeName* ATTR_ONDRAGEND; static nsHtml5AttributeName* ATTR_ONMOVEEND; static nsHtml5AttributeName* ATTR_ONINVALID; + static nsHtml5AttributeName* ATTR_INTEGRITY; static nsHtml5AttributeName* ATTR_ONKEYDOWN; static nsHtml5AttributeName* ATTR_ONFOCUSIN; static nsHtml5AttributeName* ATTR_ONMOUSEUP; From d5d65784008f8e0816987b2a39f5324d5d252f88 Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Thu, 18 Dec 2014 16:50:34 +0800 Subject: [PATCH 09/64] Bug 1109486 - Unconditionally use UTF-8 as default Charset. r=smaug --- dom/base/nsXMLHttpRequest.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp index 3d3f80761ebb..5246a80f75da 100644 --- a/dom/base/nsXMLHttpRequest.cpp +++ b/dom/base/nsXMLHttpRequest.cpp @@ -2403,10 +2403,8 @@ GetRequestBody(nsIDOMDocument* aDoc, nsIInputStream** aResult, aContentType.AssignLiteral("application/xml"); nsCOMPtr doc(do_QueryInterface(aDoc)); NS_ENSURE_STATE(doc); - aCharset = doc->GetDocumentCharacterSet(); + aCharset.AssignLiteral("UTF-8"); - // Serialize to a stream so that the encoding used will - // match the document's. nsresult rv; nsCOMPtr serializer = do_CreateInstance(NS_XMLSERIALIZER_CONTRACTID, &rv); From f1cac9eeeaf5bd44b4500e10efb41243934a55e2 Mon Sep 17 00:00:00 2001 From: Jeremy Chen Date: Wed, 17 Dec 2014 15:58:37 +0800 Subject: [PATCH 10/64] Bug 1109486 - Mochitest test case. r=smaug --- dom/base/test/test_XHRSendData.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/base/test/test_XHRSendData.html b/dom/base/test/test_XHRSendData.html index da707c1aa0dc..b65dfb5a4e0f 100644 --- a/dom/base/test/test_XHRSendData.html +++ b/dom/base/test/test_XHRSendData.html @@ -127,22 +127,22 @@ tests = [{ body: null, }, { body: testDoc1, resBody: "\nhi", - resContentType: "application/xml; charset=windows-1252", + resContentType: "application/xml; charset=UTF-8", }, { body: testDoc1, contentType: "foo/bar", resBody: "\nhi", - resContentType: "foo/bar; charset=windows-1252", + resContentType: "foo/bar; charset=UTF-8", }, { body: testDoc1, contentType: "foo/bar; charset=ascii; baz=bin", resBody: "\nhi", - resContentType: "foo/bar; charset=windows-1252; baz=bin", + resContentType: "foo/bar; charset=UTF-8; baz=bin", }, { body: testDoc1, contentType: "foo/bar; charset=wIndows-1252", resBody: "\nhi", - resContentType: "foo/bar; charset=wIndows-1252", + resContentType: "foo/bar; charset=UTF-8", }, { body: testDoc2, resBody: "\ntext", From 2307cf43b4b48ded5b349c489d0e285d36380def Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Wed, 17 Dec 2014 10:40:00 -0500 Subject: [PATCH 11/64] Bug 1109704 - Expose details settings informations in about:memory. r=qdot We want to have a better breakdown of how many get/set operations we are doing for each setting lock. Given that we keep track of all locks, this may consume quite some memory, so we introduce a new preference to enable this feature. We also add memory reporting for the SettingService lock. --- dom/settings/SettingsRequestManager.jsm | 94 ++++++++++++++++++++++--- dom/settings/SettingsService.js | 73 ++++++++++++++++++- 2 files changed, 157 insertions(+), 10 deletions(-) diff --git a/dom/settings/SettingsRequestManager.jsm b/dom/settings/SettingsRequestManager.jsm index 934712dd0ae2..bb4ee1b3baa0 100644 --- a/dom/settings/SettingsRequestManager.jsm +++ b/dom/settings/SettingsRequestManager.jsm @@ -17,12 +17,15 @@ Cu.import("resource://gre/modules/PermissionsTable.jsm"); let DEBUG = false; let VERBOSE = false; +let TRACK = false; try { DEBUG = Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.debug.enabled"); VERBOSE = Services.prefs.getBoolPref("dom.mozSettings.SettingsRequestManager.verbose.enabled"); + TRACK = + Services.prefs.getBoolPref("dom.mozSettings.trackTasksUsage"); } catch (ex) { } let allowForceReadOnly = false; @@ -207,7 +210,12 @@ let SettingsRequestManager = { // for message managers and check permissions on them before we send // settings notifications to child processes. observerPrincipalCache: new Map(), - tasksConsumed: 0, + totalProcessed: 0, + tasksConsumed: {}, + totalSetProcessed: 0, + tasksSetConsumed: {}, + totalGetProcessed: 0, + tasksGetConsumed: {}, init: function() { if (VERBOSE) debug("init"); @@ -650,6 +658,13 @@ let SettingsRequestManager = { } let currentTask = lock.tasks.shift(); let promises = []; + if (TRACK) { + if (this.tasksConsumed[aLockID] === undefined) { + this.tasksConsumed[aLockID] = 0; + this.tasksGetConsumed[aLockID] = 0; + this.tasksSetConsumed[aLockID] = 0; + } + } while (currentTask) { if (VERBOSE) debug("Running Operation " + currentTask.operation); if (lock.finalizing) { @@ -659,12 +674,23 @@ let SettingsRequestManager = { currentTask.defer.reject("Cannot call new task after finalizing"); } else { let p; - this.tasksConsumed++; + this.totalProcessed++; + if (TRACK) { + this.tasksConsumed[aLockID]++; + } switch (currentTask.operation) { case "get": + this.totalGetProcessed++; + if (TRACK) { + this.tasksGetConsumed[aLockID]++; + } p = this.taskGet(currentTask); break; case "set": + this.totalSetProcessed++; + if (TRACK) { + this.tasksSetConsumed[aLockID]++; + } p = this.taskSet(currentTask); break; case "clear": @@ -753,23 +779,75 @@ let SettingsRequestManager = { continue; } - let path = "settings-locks/tasks/queue-length(id=" + lockId + ")"; + let path = "settings-locks/tasks/lock(id=" + lockId + ")/"; - aCallback.callback("", path, + aCallback.callback("", path + "alive", Ci.nsIMemoryReporter.KIND_OTHER, Ci.nsIMemoryReporter.UNITS_COUNT, length, - "Tasks queue length for this lock", + "Alive tasks for this lock", aData); } aCallback.callback("", - "settings-locks/tasks/processed", + "settings-locks/tasks-total/processed", Ci.nsIMemoryReporter.KIND_OTHER, Ci.nsIMemoryReporter.UNITS_COUNT, - this.tasksConsumed, - "The number of tasks that were executed.", + this.totalProcessed, + "The total number of tasks that were executed.", aData); + + aCallback.callback("", + "settings-locks/tasks-total/set", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this.totalSetProcessed, + "The total number of set tasks that were executed.", + aData); + + aCallback.callback("", + "settings-locks/tasks-total/get", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this.totalGetProcessed, + "The total number of get tasks that were executed.", + aData); + + // if TRACK is not enabled, then, no details are available + if (!TRACK) { + return; + } + + for (let lockId of Object.keys(this.tasksConsumed)) { + let lock = this.lockInfo[lockId]; + let length = 0; + if (lock) { + length = lock.tasks.length; + } + + let path = "settings-locks/tasks/lock(id=" + lockId + ")/"; + + aCallback.callback("", path + "set", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this.tasksSetConsumed[lockId], + "Set tasks for this lock.", + aData); + + aCallback.callback("", path + "get", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this.tasksGetConsumed[lockId], + "Get tasks for this lock.", + aData); + + aCallback.callback("", path + "processed", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this.tasksConsumed[lockId], + "Number of tasks that were executed.", + aData); + } }, sendSettingsChange: function(aKey, aValue, aIsServiceLock) { diff --git a/dom/settings/SettingsService.js b/dom/settings/SettingsService.js index 5f6141c679af..7669de6552d7 100644 --- a/dom/settings/SettingsService.js +++ b/dom/settings/SettingsService.js @@ -32,8 +32,12 @@ XPCOMUtils.defineLazyServiceGetter(this, "uuidgen", XPCOMUtils.defineLazyServiceGetter(this, "cpmm", "@mozilla.org/childprocessmessagemanager;1", "nsIMessageSender"); +XPCOMUtils.defineLazyServiceGetter(this, "mrm", + "@mozilla.org/memory-reporter-manager;1", + "nsIMemoryReporterManager"); -const nsIClassInfo = Ci.nsIClassInfo; +const nsIClassInfo = Ci.nsIClassInfo; +const kXpcomShutdownObserverTopic = "xpcom-shutdown"; const SETTINGSSERVICELOCK_CONTRACTID = "@mozilla.org/settingsServiceLock;1"; const SETTINGSSERVICELOCK_CID = Components.ID("{d7a395a0-e292-11e1-834e-1761d57f5f99}"); @@ -85,6 +89,7 @@ SettingsServiceLock.prototype = { runOrFinalizeQueries: function() { if (!this._requests || Object.keys(this._requests).length == 0) { + this._settingsService.unregisterLock(this._id); cpmm.sendAsyncMessage("Settings:Finalize", {lockID: this._id}, undefined, Services.scriptSecurityManager.getSystemPrincipal()); } else { cpmm.sendAsyncMessage("Settings:Run", {lockID: this._id}, undefined, Services.scriptSecurityManager.getSystemPrincipal()); @@ -229,17 +234,81 @@ const SETTINGSSERVICE_CID = Components.ID("{f656f0c0-f776-11e1-a21f-08002 function SettingsService() { if (VERBOSE) debug("settingsService Constructor"); + this._locks = []; + this._createdLocks = 0; + this._unregisteredLocks = 0; + this.init(); } SettingsService.prototype = { + init: function() { + Services.obs.addObserver(this, kXpcomShutdownObserverTopic, false); + mrm.registerStrongReporter(this); + }, + + uninit: function() { + Services.obs.removeObserver(this, kXpcomShutdownObserverTopic); + mrm.unregisterStrongReporter(this); + }, + + observe: function(aSubject, aTopic, aData) { + if (VERBOSE) debug("observe: " + aTopic); + if (aTopic === kXpcomShutdownObserverTopic) { + this.uninit(); + } + }, + createLock: function createLock(aCallback) { var lock = new SettingsServiceLock(this, aCallback); + this.registerLock(lock._id); return lock; }, + registerLock: function(aLockID) { + this._locks.push(aLockID); + this._createdLocks++; + }, + + unregisterLock: function(aLockID) { + let lock_index = this._locks.indexOf(aLockID); + if (lock_index != -1) { + if (VERBOSE) debug("Unregistering lock " + aLockID); + this._locks.splice(lock_index, 1); + this._unregisteredLocks++; + } + }, + + collectReports: function(aCallback, aData, aAnonymize) { + aCallback.callback("", + "settings-service-locks/alive", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this._locks.length, + "The number of service locks that are currently alives.", + aData); + + aCallback.callback("", + "settings-service-locks/created", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this._createdLocks, + "The number of service locks that were created.", + aData); + + aCallback.callback("", + "settings-service-locks/deleted", + Ci.nsIMemoryReporter.KIND_OTHER, + Ci.nsIMemoryReporter.UNITS_COUNT, + this._unregisteredLocks, + "The number of service locks that were deleted.", + aData); + }, + classID : SETTINGSSERVICE_CID, - QueryInterface : XPCOMUtils.generateQI([Ci.nsISettingsService]) + QueryInterface : XPCOMUtils.generateQI([Ci.nsISettingsService, + Ci.nsIObserver, + Ci.nsIMemoryReporter]) }; this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SettingsService, SettingsServiceLock]); From 1b154e6ec501964d2b21f9a47db996ca0ffe386e Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Thu, 18 Dec 2014 15:56:54 +0100 Subject: [PATCH 12/64] Bug 1112170 - allow the basic compositor backend to use tiling. r=Bas --- gfx/layers/client/ClientPaintedLayer.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gfx/layers/client/ClientPaintedLayer.cpp b/gfx/layers/client/ClientPaintedLayer.cpp index f9c980eee535..9c8aba56094d 100644 --- a/gfx/layers/client/ClientPaintedLayer.cpp +++ b/gfx/layers/client/ClientPaintedLayer.cpp @@ -162,10 +162,7 @@ ClientLayerManager::CreatePaintedLayerWithHint(PaintedLayerCreationHint aHint) #ifdef MOZ_B2G aHint == SCROLLABLE && #endif - gfxPlatform::GetPlatform()->UseTiling() && - (AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_OPENGL || - AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9 || - AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D11)) { + gfxPlatform::GetPlatform()->UseTiling()) { nsRefPtr layer = new ClientTiledPaintedLayer(this, aHint); CREATE_SHADOW(Painted); return layer.forget(); From cd9abe9d0a7e752690fb27fb1433493551fcead5 Mon Sep 17 00:00:00 2001 From: Yura Zenevich Date: Thu, 18 Dec 2014 10:31:55 -0500 Subject: [PATCH 13/64] Bug 1109282 - adding a accessibility checks for singleTap. r=dburns --- testing/marionette/client/marionette/__init__.py | 1 + testing/marionette/client/marionette/errors.py | 4 + testing/marionette/client/marionette/marionette.py | 2 + .../marionette/tests/unit/test_accessibility.py | 86 +++++++++++++++ .../client/marionette/tests/unit/unit-tests.ini | 2 + .../client/marionette/www/test_accessibility.html | 38 +++++++ testing/marionette/marionette-elements.js | 122 +++++++++++++++++++++ testing/marionette/marionette-listener.js | 54 ++++++++- testing/marionette/marionette-server.js | 7 +- 9 files changed, 311 insertions(+), 5 deletions(-) create mode 100644 testing/marionette/client/marionette/tests/unit/test_accessibility.py create mode 100644 testing/marionette/client/marionette/www/test_accessibility.html --- .../marionette/client/marionette/__init__.py | 1 + .../marionette/client/marionette/errors.py | 4 + .../client/marionette/marionette.py | 2 + .../tests/unit/test_accessibility.py | 86 ++++++++++++ .../marionette/tests/unit/unit-tests.ini | 2 + .../marionette/www/test_accessibility.html | 38 ++++++ testing/marionette/marionette-elements.js | 122 ++++++++++++++++++ testing/marionette/marionette-listener.js | 54 +++++++- testing/marionette/marionette-server.js | 7 +- 9 files changed, 311 insertions(+), 5 deletions(-) create mode 100644 testing/marionette/client/marionette/tests/unit/test_accessibility.py create mode 100644 testing/marionette/client/marionette/www/test_accessibility.html diff --git a/testing/marionette/client/marionette/__init__.py b/testing/marionette/client/marionette/__init__.py index 0f42de010171..67a263367d59 100644 --- a/testing/marionette/client/marionette/__init__.py +++ b/testing/marionette/client/marionette/__init__.py @@ -8,6 +8,7 @@ from marionette import Marionette, HTMLElement, Actions, MultiActions from marionette_test import MarionetteTestCase, MarionetteJSTestCase, CommonTestCase, expectedFailure, skip, SkipTest from errors import ( ElementNotVisibleException, + ElementNotAccessibleException, ErrorCodes, FrameSendFailureError, FrameSendNotInitializedError, diff --git a/testing/marionette/client/marionette/errors.py b/testing/marionette/client/marionette/errors.py index aee6aa24c52f..81ca613bfc4b 100644 --- a/testing/marionette/client/marionette/errors.py +++ b/testing/marionette/client/marionette/errors.py @@ -13,6 +13,7 @@ class ErrorCodes(object): ELEMENT_NOT_VISIBLE = 11 INVALID_ELEMENT_STATE = 12 UNKNOWN_ERROR = 13 + ELEMENT_NOT_ACCESSIBLE = 56 ELEMENT_IS_NOT_SELECTABLE = 15 JAVASCRIPT_ERROR = 17 XPATH_LOOKUP_ERROR = 19 @@ -113,6 +114,9 @@ class ElementNotVisibleException(MarionetteException): super(ElementNotVisibleException, self).__init__( message, status=status, cause=cause, stacktrace=stacktrace) +class ElementNotAccessibleException(MarionetteException): + pass + class NoSuchFrameException(MarionetteException): pass diff --git a/testing/marionette/client/marionette/marionette.py b/testing/marionette/client/marionette/marionette.py index 35a7fee5a0b6..75a8ee91ccbd 100644 --- a/testing/marionette/client/marionette/marionette.py +++ b/testing/marionette/client/marionette/marionette.py @@ -677,6 +677,8 @@ class Marionette(object): raise errors.StaleElementException(message=message, status=status, stacktrace=stacktrace) elif status == errors.ErrorCodes.ELEMENT_NOT_VISIBLE: raise errors.ElementNotVisibleException(message=message, status=status, stacktrace=stacktrace) + elif status == errors.ErrorCodes.ELEMENT_NOT_ACCESSIBLE: + raise errors.ElementNotAccessibleException(message=message, status=status, stacktrace=stacktrace) elif status == errors.ErrorCodes.INVALID_ELEMENT_STATE: raise errors.InvalidElementStateException(message=message, status=status, stacktrace=stacktrace) elif status == errors.ErrorCodes.UNKNOWN_ERROR: diff --git a/testing/marionette/client/marionette/tests/unit/test_accessibility.py b/testing/marionette/client/marionette/tests/unit/test_accessibility.py new file mode 100644 index 000000000000..1326181dc07e --- /dev/null +++ b/testing/marionette/client/marionette/tests/unit/test_accessibility.py @@ -0,0 +1,86 @@ +# 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/. + +from marionette_test import MarionetteTestCase +from errors import ElementNotAccessibleException +from errors import ElementNotVisibleException + + +class TestAccessibility(MarionetteTestCase): + + # Elements that are accessible with and without the accessibliity API + valid_elementIDs = [ + # Button1 is an accessible button with a valid accessible name + # computed from subtree + "button1", + # Button2 is an accessible button with a valid accessible name + # computed from aria-label + "button2" + ] + + # Elements that are not accessible with the accessibility API + invalid_elementIDs = [ + # Button3 does not have an accessible object + "button3", + # Button4 does not support any accessible actions + "button4", + # Button5 does not have a correct accessibility role and may not be + # manipulated via the accessibility API + "button5", + # Button6 is missing an accesible name + "button6", + # Button7 is not currently visible via the accessibility API and may + # not be manipulated by it + "button7", + # Button8 is not currently visible via the accessibility API and may + # not be manipulated by it (in hidden subtree) + "button8" + ] + + # Elements that are either accessible to accessibility API or not accessible + # at all + falsy_elements = [ + # Element is only visible to the accessibility API and may be + # manipulated by it + "button9", + # Element is not currently visible + "button10" + ] + + def run_element_test(self, ids, testFn): + for id in ids: + element = self.marionette.find_element("id", id) + testFn(element) + + def setup_accessibility(self, raisesAccessibilityExceptions=True, navigate=True): + self.marionette.delete_session() + self.marionette.start_session( + {"raisesAccessibilityExceptions": raisesAccessibilityExceptions}) + # Navigate to test_accessibility.html + if navigate: + test_accessibility = self.marionette.absolute_url("test_accessibility.html") + self.marionette.navigate(test_accessibility) + + def test_valid_single_tap(self): + self.setup_accessibility() + # No exception should be raised + self.run_element_test(self.valid_elementIDs, lambda button: button.tap()) + + def test_invalid_single_tap(self): + self.setup_accessibility() + self.run_element_test(self.invalid_elementIDs, + lambda button: self.assertRaises(ElementNotAccessibleException, + button.tap)) + self.run_element_test(self.falsy_elements, + lambda button: self.assertRaises(ElementNotAccessibleException, + button.tap)) + + def test_invalid_single_tap_no_exceptions(self): + self.setup_accessibility(False, True) + # No exception should be raised + self.run_element_test(self.invalid_elementIDs, lambda button: button.tap()) + # Elements are invisible + self.run_element_test(self.falsy_elements, + lambda button: self.assertRaises(ElementNotVisibleException, + button.tap)) diff --git a/testing/marionette/client/marionette/tests/unit/unit-tests.ini b/testing/marionette/client/marionette/tests/unit/unit-tests.ini index 149c5dd450d2..e47ac7bbea75 100644 --- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini +++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini @@ -16,6 +16,8 @@ skip = false [test_session.py] [test_capabilities.py] +[test_accessibility.py] + [test_expectedfail.py] expected = fail [test_import_script.py] diff --git a/testing/marionette/client/marionette/www/test_accessibility.html b/testing/marionette/client/marionette/www/test_accessibility.html new file mode 100644 index 000000000000..c91be89819b8 --- /dev/null +++ b/testing/marionette/client/marionette/www/test_accessibility.html @@ -0,0 +1,38 @@ + + + + + + + +Marionette Test + + + + + I am a bad button with no accessible +

I am a bad button that is actually a header

+

+ I am a bad button that is actually an actionable header with a listener +

+ + + + + + + + diff --git a/testing/marionette/marionette-elements.js b/testing/marionette/marionette-elements.js index 323466bbf310..1f0281d12f6a 100644 --- a/testing/marionette/marionette-elements.js +++ b/testing/marionette/marionette-elements.js @@ -12,6 +12,7 @@ */ this.EXPORTED_SYMBOLS = [ + "Accessibility", "ElementManager", "CLASS_NAME", "SELECTOR", @@ -47,6 +48,127 @@ function ElementException(msg, num, stack) { this.stack = stack; } +this.Accessibility = function Accessibility() { + // A flag indicating whether the accessibility issue should be logged or cause + // an exception. Default: log to stdout. + this.strict = false; + this.accessibleRetrieval = Components.classes[ + '@mozilla.org/accessibleRetrieval;1'].getService( + Components.interfaces.nsIAccessibleRetrieval); +}; + +Accessibility.prototype = { + /** + * Accessible object roles that support some action + * @type Object + */ + actionableRoles: new Set([ + 'pushbutton', + 'checkbutton', + 'combobox', + 'key', + 'link', + 'menuitem', + 'check menu item', + 'radio menu item', + 'option', + 'radiobutton', + 'slider', + 'spinbutton', + 'pagetab', + 'entry', + 'outlineitem' + ]), + + /** + * Get an accessible object for a DOM element + * @param nsIDOMElement element + * @param Boolean mustHaveAccessible a flag indicating that the element must + * have an accessible object + * @return nsIAccessible object for the element + */ + getAccessibleObject(element, mustHaveAccessible = false) { + let acc = this.accessibleRetrieval.getAccessibleFor(element); + if (!acc && mustHaveAccessible) { + this.handleErrorMessage('Element does not have an accessible object'); + } + return acc; + }, + + /** + * Check if the accessible has a role that supports some action + * @param nsIAccessible object + * @return Boolean an indicator of role being actionable + */ + isActionableRole(accessible) { + return this.actionableRoles.has( + this.accessibleRetrieval.getStringRole(accessible.role)); + }, + + /** + * Determine if an accessible has at least one action that it supports + * @param nsIAccessible object + * @return Boolean an indicator of supporting at least one accessible action + */ + hasActionCount(accessible) { + return accessible.actionCount > 0; + }, + + /** + * Determine if an accessible has a valid name + * @param nsIAccessible object + * @return Boolean an indicator that the element has a non empty valid name + */ + hasValidName(accessible) { + return accessible.name && accessible.name.trim(); + }, + + /** + * Check if an accessible has a set hidden attribute + * @param nsIAccessible object + * @return Boolean an indicator that the element has a hidden accessible + * attribute set to true + */ + hasHiddenAttribute(accessible) { + let hidden; + try { + hidden = accessible.attributes.getStringProperty('hidden'); + } finally { + // If the property is missing, exception will be thrown. + return hidden && hidden === 'true'; + } + }, + + /** + * Check if an accessible is hidden from the user of the accessibility API + * @param nsIAccessible object + * @return Boolean an indicator that the element is hidden from the user + */ + isHidden(accessible) { + while (accessible) { + if (this.hasHiddenAttribute(accessible)) { + return true; + } + accessible = accessible.parent; + } + return false; + }, + + /** + * Send an error message or log the error message in the log + * @param String message + */ + handleErrorMessage(message) { + if (!message) { + return; + } + if (this.strict) { + throw new ElementException(message, 56, null); + } + dump(Date.now() + " Marionette: " + message); + } +}; + this.ElementManager = function ElementManager(notSupported) { this.seenItems = {}; this.timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); diff --git a/testing/marionette/marionette-listener.js b/testing/marionette/marionette-listener.js index 926ee2a3fe4c..4e2ad8318fce 100644 --- a/testing/marionette/marionette-listener.js +++ b/testing/marionette/marionette-listener.js @@ -39,6 +39,7 @@ let listenerId = null; //unique ID of this listener let curFrame = content; let previousFrame = null; let elementManager = new ElementManager([]); +let accessibility = new Accessibility(); let importedScripts = null; let inputSource = null; @@ -210,6 +211,7 @@ function waitForReady() { */ function newSession(msg) { isB2G = msg.json.B2G; + accessibility.strict = msg.json.raisesAccessibilityExceptions; resetValues(); if (isB2G) { readyStateTimer.initWithCallback(waitForReady, 100, Ci.nsITimer.TYPE_ONE_SHOT); @@ -945,11 +947,15 @@ function singleTap(msg) { let command_id = msg.json.command_id; try { let el = elementManager.getKnownElement(msg.json.id, curFrame); + let acc = accessibility.getAccessibleObject(el, true); // after this block, the element will be scrolled into view - if (!checkVisible(el, msg.json.corx, msg.json.cory)) { - sendError("Element is not currently visible and may not be manipulated", 11, null, command_id); - return; + let visible = checkVisible(el, msg.json.corx, msg.json.cory); + checkVisibleAccessibility(acc, visible); + if (!visible) { + sendError("Element is not currently visible and may not be manipulated", 11, null, command_id); + return; } + checkActionableAccessibility(acc); if (!curFrame.document.createTouch) { mouseEventsOnly = true; } @@ -962,6 +968,48 @@ function singleTap(msg) { } } +/** + * Check if the element's visible state corresponds to its accessibility API + * visibility + * @param nsIAccessible object + * @param Boolean visible element's visibility state + */ +function checkVisibleAccessibility(accesible, visible) { + if (!accesible) { + return; + } + let hiddenAccessibility = accessibility.isHidden(accesible); + let message; + if (visible && hiddenAccessibility) { + message = 'Element is not currently visible via the accessibility API ' + + 'and may not be manipulated by it'; + } else if (!visible && !hiddenAccessibility) { + message = 'Element is currently only visible via the accessibility API ' + + 'and can be manipulated by it'; + } + accessibility.handleErrorMessage(message); +} + +/** + * Check if it is possible to activate an element with the accessibility API + * @param nsIAccessible object + */ +function checkActionableAccessibility(accesible) { + if (!accesible) { + return; + } + let message; + if (!accessibility.hasActionCount(accesible)) { + message = 'Element does not support any accessible actions'; + } else if (!accessibility.isActionableRole(accesible)) { + message = 'Element does not have a correct accessibility role ' + + 'and may not be manipulated via the accessibility API'; + } else if (!accessibility.hasValidName(accesible)) { + message = 'Element is missing an accesible name'; + } + accessibility.handleErrorMessage(message); +} + /** * Given an element and a pair of coordinates, returns an array of the form * [ clientX, clientY, pageX, pageY, screenX, screenY ] diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index 5bb98fa334d5..0d479af522b6 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -174,6 +174,7 @@ function MarionetteServerConnection(aPrefix, aTransport, aServer) // Supported features "handlesAlerts": false, "nativeEvents": false, + "raisesAccessibilityExceptions": false, "rotatable": appName == "B2G", "secureSsl": false, "takesElementScreenshot": true, @@ -2899,8 +2900,10 @@ MarionetteServerConnection.prototype = { this.curBrowser.elementManager.seenItems[reg.id] = Cu.getWeakReference(listenerWindow); if (nullPrevious && (this.curBrowser.curFrameId != null)) { if (!this.sendAsync("newSession", - { B2G: (appName == "B2G") }, - this.newSessionCommandId)) { + { B2G: (appName == "B2G"), + raisesAccessibilityExceptions: + this.sessionCapabilities.raisesAccessibilityExceptions }, + this.newSessionCommandId)) { return; } if (this.curBrowser.newSession) { From c1e2ee5aa10881e0a4330bee1e992fe3c83aa126 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 18 Dec 2014 10:30:47 -0500 Subject: [PATCH 14/64] Bug 1112622 - Remove the special case to disable PGO with MSVC2010 from js/src/moz.build; r=glandium --HG-- extra : rebase_source : a60da260641a1b7fdc9352e970b5acba83a94a98 --- js/src/moz.build | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/src/moz.build b/js/src/moz.build index f944658480de..8d81b4727c2e 100644 --- a/js/src/moz.build +++ b/js/src/moz.build @@ -422,10 +422,7 @@ else: 'perf/pm_stub.cpp' ] -# Disable PGO for MSVC 2010 due to unpredictable performance, see -# bug 1030706. -if CONFIG['_MSC_VER'] != '1600': - MSVC_ENABLE_PGO = True +MSVC_ENABLE_PGO = True HostSimplePrograms([ 'host_jskwgen', From d40b227bc379e9cfc257ffc678e49e5482ba6003 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 18 Dec 2014 10:31:46 -0500 Subject: [PATCH 15/64] Bug 1109895 - Send the correct -m flags to clang-cl when building libvpx; r=jrmuizel --HG-- extra : rebase_source : 2806ced531eb39e33b30337f1112e4efb3e179db --- media/libvpx/moz.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media/libvpx/moz.build b/media/libvpx/moz.build index 86cfb43e1130..1b1a5baede53 100644 --- a/media/libvpx/moz.build +++ b/media/libvpx/moz.build @@ -92,7 +92,7 @@ if CONFIG['OS_TARGET'] == 'Android': '%s/sources/android/cpufeatures/cpu-features.c' % CONFIG['ANDROID_NDK'], ] -if not CONFIG['_MSC_VER']: +if CONFIG['CLANG_CL'] or not CONFIG['_MSC_VER']: for f in SOURCES: if f.endswith('.c'): if 'sse2' in f: From 2db568c04242f90dd02853d8cb0ad79ad9d651cb Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 18 Dec 2014 10:33:28 -0500 Subject: [PATCH 16/64] Bug 1109311 - Fix the -Wundefined-bool-conversion warning in nsHtml5TreeBuilder.cpp resulting from checking the value of this; r=hsivonen Clang gives the following warning for this code: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true --HG-- extra : rebase_source : cd9bc242d22b0a5aa6767ce442368638d6186400 --- parser/html/nsHtml5TreeBuilder.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/parser/html/nsHtml5TreeBuilder.cpp b/parser/html/nsHtml5TreeBuilder.cpp index 4b693dae0853..321e8ef68538 100644 --- a/parser/html/nsHtml5TreeBuilder.cpp +++ b/parser/html/nsHtml5TreeBuilder.cpp @@ -3212,15 +3212,11 @@ nsHtml5TreeBuilder::documentModeInternal(nsHtml5DocumentMode m, nsString* public { if (isSrcdocDocument) { quirks = false; - if (this) { - this->documentMode(STANDARDS_MODE); - } + this->documentMode(STANDARDS_MODE); return; } quirks = (m == QUIRKS_MODE); - if (this) { - this->documentMode(m); - } + this->documentMode(m); } bool From ce0524a7d7e8be01feb426d98c8c8b902faaa352 Mon Sep 17 00:00:00 2001 From: Georg Fritzsche Date: Thu, 18 Dec 2014 16:43:39 +0100 Subject: [PATCH 17/64] Bug 1110681 - The HealthReporter AsyncShutdownTimeout state should include what provider is currently initialized. r=yoric --- services/healthreport/healthreporter.jsm | 10 +++++++--- services/metrics/providermanager.jsm | 17 +++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/services/healthreport/healthreporter.jsm b/services/healthreport/healthreporter.jsm index 32f5adfa8d98..a929c12ba880 100644 --- a/services/healthreport/healthreporter.jsm +++ b/services/healthreport/healthreporter.jsm @@ -338,9 +338,10 @@ function AbstractHealthReporter(branch, policy, sessionRecorder) { this._initHistogram = hasFirstRun ? TELEMETRY_INIT : TELEMETRY_INIT_FIRSTRUN; this._dbOpenHistogram = hasFirstRun ? TELEMETRY_DB_OPEN : TELEMETRY_DB_OPEN_FIRSTRUN; - // This is set to the name of the provider that we are currently shutting down, if any. - // It is used for AsyncShutdownTimeout diagnostics. + // This is set to the name for the provider that we are currently initializing + // or shutting down, if any. This is used for AsyncShutdownTimeout diagnostics. this._currentProviderInShutdown = null; + this._currentProviderInInit = null; } AbstractHealthReporter.prototype = Object.freeze({ @@ -413,6 +414,7 @@ AbstractHealthReporter.prototype = Object.freeze({ hasStorage: !!this._storage, shutdownComplete: this._shutdownComplete, currentProviderInShutdown: this._currentProviderInShutdown, + currentProviderInInit: this._currentProviderInInit, })); try { @@ -500,8 +502,10 @@ AbstractHealthReporter.prototype = Object.freeze({ let catString = this._prefs.get("service.providerCategories") || ""; if (catString.length) { for (let category of catString.split(",")) { - yield this._providerManager.registerProvidersFromCategoryManager(category); + yield this._providerManager.registerProvidersFromCategoryManager(category, + providerName => this._currentProviderInInit = providerName); } + this._currentProviderInInit = null; } }), diff --git a/services/metrics/providermanager.jsm b/services/metrics/providermanager.jsm index 6f09662d3cb9..132a1dc5a1c9 100644 --- a/services/metrics/providermanager.jsm +++ b/services/metrics/providermanager.jsm @@ -101,14 +101,16 @@ this.ProviderManager.prototype = Object.freeze({ * * @param category * (string) Name of category from which to query and load. + * @param providerDiagnostic + * (function) Optional, called with the name of the provider currently being initialized. * @return a newly spawned Task. */ - registerProvidersFromCategoryManager: function (category) { + registerProvidersFromCategoryManager: function (category, providerDiagnostic) { this._log.info("Registering providers from category: " + category); let cm = Cc["@mozilla.org/categorymanager;1"] .getService(Ci.nsICategoryManager); - let promises = []; + let promiseList = []; let enumerator = cm.enumerateCategory(category); while (enumerator.hasMoreElements()) { let entry = enumerator.getNext() @@ -125,7 +127,7 @@ this.ProviderManager.prototype = Object.freeze({ let promise = this.registerProviderFromType(ns[entry]); if (promise) { - promises.push(promise); + promiseList.push({name: entry, promise: promise}); } } catch (ex) { this._recordProviderError(entry, @@ -135,9 +137,12 @@ this.ProviderManager.prototype = Object.freeze({ } } - return Task.spawn(function wait() { - for (let promise of promises) { - yield promise; + return Task.spawn(function* wait() { + for (let entry of promiseList) { + if (providerDiagnostic) { + providerDiagnostic(entry.name); + } + yield entry.promise; } }); }, From 25783fb2c3f19eb77ef2ee69522001e0dbc512f1 Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 18 Dec 2014 11:18:18 -0500 Subject: [PATCH 18/64] Backed out changeset eb6428c5e590 (bug 1109282) for webplatform test failures. --- .../marionette/client/marionette/__init__.py | 1 - .../marionette/client/marionette/errors.py | 4 - .../client/marionette/marionette.py | 2 - .../tests/unit/test_accessibility.py | 86 ------------ .../marionette/tests/unit/unit-tests.ini | 2 - .../marionette/www/test_accessibility.html | 38 ------ testing/marionette/marionette-elements.js | 122 ------------------ testing/marionette/marionette-listener.js | 54 +------- testing/marionette/marionette-server.js | 7 +- 9 files changed, 5 insertions(+), 311 deletions(-) delete mode 100644 testing/marionette/client/marionette/tests/unit/test_accessibility.py delete mode 100644 testing/marionette/client/marionette/www/test_accessibility.html diff --git a/testing/marionette/client/marionette/__init__.py b/testing/marionette/client/marionette/__init__.py index 67a263367d59..0f42de010171 100644 --- a/testing/marionette/client/marionette/__init__.py +++ b/testing/marionette/client/marionette/__init__.py @@ -8,7 +8,6 @@ from marionette import Marionette, HTMLElement, Actions, MultiActions from marionette_test import MarionetteTestCase, MarionetteJSTestCase, CommonTestCase, expectedFailure, skip, SkipTest from errors import ( ElementNotVisibleException, - ElementNotAccessibleException, ErrorCodes, FrameSendFailureError, FrameSendNotInitializedError, diff --git a/testing/marionette/client/marionette/errors.py b/testing/marionette/client/marionette/errors.py index 81ca613bfc4b..aee6aa24c52f 100644 --- a/testing/marionette/client/marionette/errors.py +++ b/testing/marionette/client/marionette/errors.py @@ -13,7 +13,6 @@ class ErrorCodes(object): ELEMENT_NOT_VISIBLE = 11 INVALID_ELEMENT_STATE = 12 UNKNOWN_ERROR = 13 - ELEMENT_NOT_ACCESSIBLE = 56 ELEMENT_IS_NOT_SELECTABLE = 15 JAVASCRIPT_ERROR = 17 XPATH_LOOKUP_ERROR = 19 @@ -114,9 +113,6 @@ class ElementNotVisibleException(MarionetteException): super(ElementNotVisibleException, self).__init__( message, status=status, cause=cause, stacktrace=stacktrace) -class ElementNotAccessibleException(MarionetteException): - pass - class NoSuchFrameException(MarionetteException): pass diff --git a/testing/marionette/client/marionette/marionette.py b/testing/marionette/client/marionette/marionette.py index 75a8ee91ccbd..35a7fee5a0b6 100644 --- a/testing/marionette/client/marionette/marionette.py +++ b/testing/marionette/client/marionette/marionette.py @@ -677,8 +677,6 @@ class Marionette(object): raise errors.StaleElementException(message=message, status=status, stacktrace=stacktrace) elif status == errors.ErrorCodes.ELEMENT_NOT_VISIBLE: raise errors.ElementNotVisibleException(message=message, status=status, stacktrace=stacktrace) - elif status == errors.ErrorCodes.ELEMENT_NOT_ACCESSIBLE: - raise errors.ElementNotAccessibleException(message=message, status=status, stacktrace=stacktrace) elif status == errors.ErrorCodes.INVALID_ELEMENT_STATE: raise errors.InvalidElementStateException(message=message, status=status, stacktrace=stacktrace) elif status == errors.ErrorCodes.UNKNOWN_ERROR: diff --git a/testing/marionette/client/marionette/tests/unit/test_accessibility.py b/testing/marionette/client/marionette/tests/unit/test_accessibility.py deleted file mode 100644 index 1326181dc07e..000000000000 --- a/testing/marionette/client/marionette/tests/unit/test_accessibility.py +++ /dev/null @@ -1,86 +0,0 @@ -# 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/. - -from marionette_test import MarionetteTestCase -from errors import ElementNotAccessibleException -from errors import ElementNotVisibleException - - -class TestAccessibility(MarionetteTestCase): - - # Elements that are accessible with and without the accessibliity API - valid_elementIDs = [ - # Button1 is an accessible button with a valid accessible name - # computed from subtree - "button1", - # Button2 is an accessible button with a valid accessible name - # computed from aria-label - "button2" - ] - - # Elements that are not accessible with the accessibility API - invalid_elementIDs = [ - # Button3 does not have an accessible object - "button3", - # Button4 does not support any accessible actions - "button4", - # Button5 does not have a correct accessibility role and may not be - # manipulated via the accessibility API - "button5", - # Button6 is missing an accesible name - "button6", - # Button7 is not currently visible via the accessibility API and may - # not be manipulated by it - "button7", - # Button8 is not currently visible via the accessibility API and may - # not be manipulated by it (in hidden subtree) - "button8" - ] - - # Elements that are either accessible to accessibility API or not accessible - # at all - falsy_elements = [ - # Element is only visible to the accessibility API and may be - # manipulated by it - "button9", - # Element is not currently visible - "button10" - ] - - def run_element_test(self, ids, testFn): - for id in ids: - element = self.marionette.find_element("id", id) - testFn(element) - - def setup_accessibility(self, raisesAccessibilityExceptions=True, navigate=True): - self.marionette.delete_session() - self.marionette.start_session( - {"raisesAccessibilityExceptions": raisesAccessibilityExceptions}) - # Navigate to test_accessibility.html - if navigate: - test_accessibility = self.marionette.absolute_url("test_accessibility.html") - self.marionette.navigate(test_accessibility) - - def test_valid_single_tap(self): - self.setup_accessibility() - # No exception should be raised - self.run_element_test(self.valid_elementIDs, lambda button: button.tap()) - - def test_invalid_single_tap(self): - self.setup_accessibility() - self.run_element_test(self.invalid_elementIDs, - lambda button: self.assertRaises(ElementNotAccessibleException, - button.tap)) - self.run_element_test(self.falsy_elements, - lambda button: self.assertRaises(ElementNotAccessibleException, - button.tap)) - - def test_invalid_single_tap_no_exceptions(self): - self.setup_accessibility(False, True) - # No exception should be raised - self.run_element_test(self.invalid_elementIDs, lambda button: button.tap()) - # Elements are invisible - self.run_element_test(self.falsy_elements, - lambda button: self.assertRaises(ElementNotVisibleException, - button.tap)) diff --git a/testing/marionette/client/marionette/tests/unit/unit-tests.ini b/testing/marionette/client/marionette/tests/unit/unit-tests.ini index e47ac7bbea75..149c5dd450d2 100644 --- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini +++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini @@ -16,8 +16,6 @@ skip = false [test_session.py] [test_capabilities.py] -[test_accessibility.py] - [test_expectedfail.py] expected = fail [test_import_script.py] diff --git a/testing/marionette/client/marionette/www/test_accessibility.html b/testing/marionette/client/marionette/www/test_accessibility.html deleted file mode 100644 index c91be89819b8..000000000000 --- a/testing/marionette/client/marionette/www/test_accessibility.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - -Marionette Test - - - - - I am a bad button with no accessible -

I am a bad button that is actually a header

-

- I am a bad button that is actually an actionable header with a listener -

- - - - - - - - diff --git a/testing/marionette/marionette-elements.js b/testing/marionette/marionette-elements.js index 1f0281d12f6a..323466bbf310 100644 --- a/testing/marionette/marionette-elements.js +++ b/testing/marionette/marionette-elements.js @@ -12,7 +12,6 @@ */ this.EXPORTED_SYMBOLS = [ - "Accessibility", "ElementManager", "CLASS_NAME", "SELECTOR", @@ -48,127 +47,6 @@ function ElementException(msg, num, stack) { this.stack = stack; } -this.Accessibility = function Accessibility() { - // A flag indicating whether the accessibility issue should be logged or cause - // an exception. Default: log to stdout. - this.strict = false; - this.accessibleRetrieval = Components.classes[ - '@mozilla.org/accessibleRetrieval;1'].getService( - Components.interfaces.nsIAccessibleRetrieval); -}; - -Accessibility.prototype = { - /** - * Accessible object roles that support some action - * @type Object - */ - actionableRoles: new Set([ - 'pushbutton', - 'checkbutton', - 'combobox', - 'key', - 'link', - 'menuitem', - 'check menu item', - 'radio menu item', - 'option', - 'radiobutton', - 'slider', - 'spinbutton', - 'pagetab', - 'entry', - 'outlineitem' - ]), - - /** - * Get an accessible object for a DOM element - * @param nsIDOMElement element - * @param Boolean mustHaveAccessible a flag indicating that the element must - * have an accessible object - * @return nsIAccessible object for the element - */ - getAccessibleObject(element, mustHaveAccessible = false) { - let acc = this.accessibleRetrieval.getAccessibleFor(element); - if (!acc && mustHaveAccessible) { - this.handleErrorMessage('Element does not have an accessible object'); - } - return acc; - }, - - /** - * Check if the accessible has a role that supports some action - * @param nsIAccessible object - * @return Boolean an indicator of role being actionable - */ - isActionableRole(accessible) { - return this.actionableRoles.has( - this.accessibleRetrieval.getStringRole(accessible.role)); - }, - - /** - * Determine if an accessible has at least one action that it supports - * @param nsIAccessible object - * @return Boolean an indicator of supporting at least one accessible action - */ - hasActionCount(accessible) { - return accessible.actionCount > 0; - }, - - /** - * Determine if an accessible has a valid name - * @param nsIAccessible object - * @return Boolean an indicator that the element has a non empty valid name - */ - hasValidName(accessible) { - return accessible.name && accessible.name.trim(); - }, - - /** - * Check if an accessible has a set hidden attribute - * @param nsIAccessible object - * @return Boolean an indicator that the element has a hidden accessible - * attribute set to true - */ - hasHiddenAttribute(accessible) { - let hidden; - try { - hidden = accessible.attributes.getStringProperty('hidden'); - } finally { - // If the property is missing, exception will be thrown. - return hidden && hidden === 'true'; - } - }, - - /** - * Check if an accessible is hidden from the user of the accessibility API - * @param nsIAccessible object - * @return Boolean an indicator that the element is hidden from the user - */ - isHidden(accessible) { - while (accessible) { - if (this.hasHiddenAttribute(accessible)) { - return true; - } - accessible = accessible.parent; - } - return false; - }, - - /** - * Send an error message or log the error message in the log - * @param String message - */ - handleErrorMessage(message) { - if (!message) { - return; - } - if (this.strict) { - throw new ElementException(message, 56, null); - } - dump(Date.now() + " Marionette: " + message); - } -}; - this.ElementManager = function ElementManager(notSupported) { this.seenItems = {}; this.timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer); diff --git a/testing/marionette/marionette-listener.js b/testing/marionette/marionette-listener.js index 4e2ad8318fce..926ee2a3fe4c 100644 --- a/testing/marionette/marionette-listener.js +++ b/testing/marionette/marionette-listener.js @@ -39,7 +39,6 @@ let listenerId = null; //unique ID of this listener let curFrame = content; let previousFrame = null; let elementManager = new ElementManager([]); -let accessibility = new Accessibility(); let importedScripts = null; let inputSource = null; @@ -211,7 +210,6 @@ function waitForReady() { */ function newSession(msg) { isB2G = msg.json.B2G; - accessibility.strict = msg.json.raisesAccessibilityExceptions; resetValues(); if (isB2G) { readyStateTimer.initWithCallback(waitForReady, 100, Ci.nsITimer.TYPE_ONE_SHOT); @@ -947,15 +945,11 @@ function singleTap(msg) { let command_id = msg.json.command_id; try { let el = elementManager.getKnownElement(msg.json.id, curFrame); - let acc = accessibility.getAccessibleObject(el, true); // after this block, the element will be scrolled into view - let visible = checkVisible(el, msg.json.corx, msg.json.cory); - checkVisibleAccessibility(acc, visible); - if (!visible) { - sendError("Element is not currently visible and may not be manipulated", 11, null, command_id); - return; + if (!checkVisible(el, msg.json.corx, msg.json.cory)) { + sendError("Element is not currently visible and may not be manipulated", 11, null, command_id); + return; } - checkActionableAccessibility(acc); if (!curFrame.document.createTouch) { mouseEventsOnly = true; } @@ -968,48 +962,6 @@ function singleTap(msg) { } } -/** - * Check if the element's visible state corresponds to its accessibility API - * visibility - * @param nsIAccessible object - * @param Boolean visible element's visibility state - */ -function checkVisibleAccessibility(accesible, visible) { - if (!accesible) { - return; - } - let hiddenAccessibility = accessibility.isHidden(accesible); - let message; - if (visible && hiddenAccessibility) { - message = 'Element is not currently visible via the accessibility API ' + - 'and may not be manipulated by it'; - } else if (!visible && !hiddenAccessibility) { - message = 'Element is currently only visible via the accessibility API ' + - 'and can be manipulated by it'; - } - accessibility.handleErrorMessage(message); -} - -/** - * Check if it is possible to activate an element with the accessibility API - * @param nsIAccessible object - */ -function checkActionableAccessibility(accesible) { - if (!accesible) { - return; - } - let message; - if (!accessibility.hasActionCount(accesible)) { - message = 'Element does not support any accessible actions'; - } else if (!accessibility.isActionableRole(accesible)) { - message = 'Element does not have a correct accessibility role ' + - 'and may not be manipulated via the accessibility API'; - } else if (!accessibility.hasValidName(accesible)) { - message = 'Element is missing an accesible name'; - } - accessibility.handleErrorMessage(message); -} - /** * Given an element and a pair of coordinates, returns an array of the form * [ clientX, clientY, pageX, pageY, screenX, screenY ] diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index 0d479af522b6..5bb98fa334d5 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -174,7 +174,6 @@ function MarionetteServerConnection(aPrefix, aTransport, aServer) // Supported features "handlesAlerts": false, "nativeEvents": false, - "raisesAccessibilityExceptions": false, "rotatable": appName == "B2G", "secureSsl": false, "takesElementScreenshot": true, @@ -2900,10 +2899,8 @@ MarionetteServerConnection.prototype = { this.curBrowser.elementManager.seenItems[reg.id] = Cu.getWeakReference(listenerWindow); if (nullPrevious && (this.curBrowser.curFrameId != null)) { if (!this.sendAsync("newSession", - { B2G: (appName == "B2G"), - raisesAccessibilityExceptions: - this.sessionCapabilities.raisesAccessibilityExceptions }, - this.newSessionCommandId)) { + { B2G: (appName == "B2G") }, + this.newSessionCommandId)) { return; } if (this.curBrowser.newSession) { From 20f79754b399ba75d57deca28ff2922d6888dfa3 Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Thu, 18 Dec 2014 08:30:05 -0800 Subject: [PATCH 19/64] Bug 1101974. Part 1: Create VsyncDispatcher at nsBaseWidget. r=roc --- widget/nsBaseWidget.cpp | 27 ++++++++++++++++++++++++++- widget/nsBaseWidget.h | 5 +++++ widget/nsIWidget.h | 7 +++++++ 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 124246dddcb7..0623e91f075e 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -43,6 +43,7 @@ #include "mozilla/MouseEvents.h" #include "GLConsts.h" #include "mozilla/unused.h" +#include "mozilla/VsyncDispatcher.h" #include "mozilla/layers/APZCTreeManager.h" #include "mozilla/layers/ChromeProcessController.h" @@ -111,6 +112,7 @@ nsBaseWidget::nsBaseWidget() : mWidgetListener(nullptr) , mAttachedWidgetListener(nullptr) , mContext(nullptr) +, mVsyncDispatcher(nullptr) , mCursor(eCursor_standard) , mUpdateCursor(true) , mBorderStyle(eBorderStyle_none) @@ -229,8 +231,12 @@ nsBaseWidget::~nsBaseWidget() NS_IF_RELEASE(mContext); delete mOriginalBounds; -} + // Can have base widgets that are things like tooltips which don't have vsyncDispatchers + if (mVsyncDispatcher) { + mVsyncDispatcher->Shutdown(); + } +} //------------------------------------------------------------------------- // @@ -944,6 +950,24 @@ nsBaseWidget::GetPreferredCompositorBackends(nsTArray& aHints) aHints.AppendElement(LayersBackend::LAYERS_BASIC); } +void nsBaseWidget::CreateVsyncDispatcher() +{ + if (gfxPrefs::HardwareVsyncEnabled()) { + // Parent directly listens to the vsync source whereas + // child process communicate via IPC + // Should be called AFTER gfxPlatform is initialized + if (XRE_IsParentProcess()) { + mVsyncDispatcher = new VsyncDispatcher(); + } + } +} + +VsyncDispatcher* +nsBaseWidget::GetVsyncDispatcher() +{ + return mVsyncDispatcher; +} + void nsBaseWidget::CreateCompositor(int aWidth, int aHeight) { // This makes sure that gfxPlatforms gets initialized if it hasn't by now. @@ -961,6 +985,7 @@ void nsBaseWidget::CreateCompositor(int aWidth, int aHeight) return; } + CreateVsyncDispatcher(); mCompositorParent = NewCompositorParent(aWidth, aHeight); MessageChannel *parentChannel = mCompositorParent->GetIPCChannel(); nsRefPtr lm = new ClientLayerManager(this); diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h index 3a1cb6f4c52d..15bf254732c9 100644 --- a/widget/nsBaseWidget.h +++ b/widget/nsBaseWidget.h @@ -37,6 +37,8 @@ class CompositorParent; class APZCTreeManager; class GeckoContentController; } + +class VsyncDispatcher; } namespace base { @@ -138,6 +140,8 @@ public: LayerManagerPersistence aPersistence = LAYER_MANAGER_CURRENT, bool* aAllowRetaining = nullptr); + VsyncDispatcher* GetVsyncDispatcher() MOZ_OVERRIDE; + virtual void CreateVsyncDispatcher(); virtual CompositorParent* NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight); virtual void CreateCompositor(); virtual void CreateCompositor(int aWidth, int aHeight); @@ -414,6 +418,7 @@ protected: nsRefPtr mBasicLayerManager; nsRefPtr mCompositorChild; nsRefPtr mCompositorParent; + nsRefPtr mVsyncDispatcher; nsRefPtr mAPZC; nsRefPtr mShutdownObserver; nsCursor mCursor; diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h index 14e44ee6221d..97f34cf52884 100644 --- a/widget/nsIWidget.h +++ b/widget/nsIWidget.h @@ -36,6 +36,7 @@ class nsIntRegion; class nsIScreen; namespace mozilla { +class VsyncDispatcher; namespace dom { class TabChild; } @@ -691,6 +692,7 @@ class nsIWidget : public nsISupports { typedef mozilla::widget::InputContext InputContext; typedef mozilla::widget::InputContextAction InputContextAction; typedef mozilla::widget::SizeConstraints SizeConstraints; + typedef mozilla::VsyncDispatcher VsyncDispatcher; // Used in UpdateThemeGeometries. struct ThemeGeometry { @@ -869,6 +871,11 @@ class nsIWidget : public nsISupports { */ virtual float GetDPI() = 0; + /** + * Returns the VsyncDispatcher associated with this widget + */ + virtual VsyncDispatcher* GetVsyncDispatcher() = 0; + /** * Return the default scale factor for the window. This is the * default number of device pixels per CSS pixel to use. This should From 8c6ce778ad6eb8001ab26e0924aa2b91f10c900f Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Thu, 18 Dec 2014 08:30:06 -0800 Subject: [PATCH 20/64] Bug 1101974. Part 2: Access VsyncDispatcher through nsIWidget interface. r=benwa --- gfx/layers/ipc/CompositorParent.cpp | 51 ++++++++++++++++------------- gfx/layers/ipc/CompositorParent.h | 5 +-- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/gfx/layers/ipc/CompositorParent.cpp b/gfx/layers/ipc/CompositorParent.cpp index 9b98b13f21b5..1c3d54b6c701 100644 --- a/gfx/layers/ipc/CompositorParent.cpp +++ b/gfx/layers/ipc/CompositorParent.cpp @@ -196,23 +196,30 @@ static void SetThreadPriority() hal::SetCurrentThreadPriority(hal::THREAD_PRIORITY_COMPOSITOR); } -CompositorVsyncObserver::CompositorVsyncObserver(CompositorParent* aCompositorParent) +CompositorVsyncObserver::CompositorVsyncObserver(CompositorParent* aCompositorParent, nsIWidget* aWidget) : mNeedsComposite(false) , mIsObservingVsync(false) , mCompositorParent(aCompositorParent) , mCurrentCompositeTaskMonitor("CurrentCompositeTaskMonitor") , mCurrentCompositeTask(nullptr) { - + MOZ_ASSERT(NS_IsMainThread()); + MOZ_ASSERT(aWidget != nullptr); + mVsyncDispatcher = aWidget->GetVsyncDispatcher(); +#ifdef MOZ_WIDGET_GONK + GeckoTouchDispatcher::SetCompositorVsyncObserver(this); +#endif } CompositorVsyncObserver::~CompositorVsyncObserver() { - MOZ_ASSERT(NS_IsMainThread()); - UnobserveVsync(); - mCompositorParent = nullptr; - mNeedsComposite = false; + MOZ_ASSERT(CompositorParent::IsInCompositorThread()); + MOZ_ASSERT(!mIsObservingVsync); + // The VsyncDispatcher is cleaned up before this in the nsBaseWidget, which stops vsync listeners CancelCurrentCompositeTask(); + mCompositorParent = nullptr; + mVsyncDispatcher = nullptr; + mNeedsComposite = false; } /** @@ -225,9 +232,14 @@ CompositorVsyncObserver::~CompositorVsyncObserver() void CompositorVsyncObserver::SetNeedsComposite(bool aNeedsComposite) { - MOZ_ASSERT(CompositorParent::IsInCompositorThread()); - mNeedsComposite = aNeedsComposite; + if (aNeedsComposite && !CompositorParent::IsInCompositorThread()) { + CompositorParent::CompositorLoop()->PostTask(FROM_HERE, + NewRunnableMethod(this, + &CompositorVsyncObserver::SetNeedsComposite, + aNeedsComposite)); + } + mNeedsComposite = aNeedsComposite; if (!mIsObservingVsync && mNeedsComposite) { ObserveVsync(); } @@ -273,10 +285,6 @@ CompositorVsyncObserver::Composite(TimeStamp aVsyncTimestamp) if (mNeedsComposite && mCompositorParent) { mNeedsComposite = false; mCompositorParent->CompositeCallback(aVsyncTimestamp); - } else { - // We're getting vsync notifications but we don't need to composite so - // unregister the vsync. - UnobserveVsync(); } DispatchTouchEvents(aVsyncTimestamp); @@ -289,15 +297,11 @@ CompositorVsyncObserver::NeedsComposite() return mNeedsComposite; } -/** - * Since the vsync thread has its own locks before notifying us of vsync - * we can't register/unregister from the vsync thread. Any other thread is fine - */ void CompositorVsyncObserver::ObserveVsync() { MOZ_ASSERT(CompositorParent::IsInCompositorThread()); - VsyncDispatcher::GetInstance()->AddCompositorVsyncObserver(this); + mVsyncDispatcher->SetCompositorVsyncObserver(this); mIsObservingVsync = true; } @@ -305,7 +309,7 @@ void CompositorVsyncObserver::UnobserveVsync() { MOZ_ASSERT(CompositorParent::IsInCompositorThread() || NS_IsMainThread()); - VsyncDispatcher::GetInstance()->RemoveCompositorVsyncObserver(this); + mVsyncDispatcher->SetCompositorVsyncObserver(nullptr); mIsObservingVsync = false; } @@ -313,9 +317,7 @@ void CompositorVsyncObserver::DispatchTouchEvents(TimeStamp aVsyncTimestamp) { #ifdef MOZ_WIDGET_GONK - if (gfxPrefs::TouchResampling()) { - GeckoTouchDispatcher::NotifyVsync(aVsyncTimestamp); - } + GeckoTouchDispatcher::NotifyVsync(aVsyncTimestamp); #endif } @@ -385,7 +387,7 @@ CompositorParent::CompositorParent(nsIWidget* aWidget, } if (gfxPrefs::VsyncAlignedCompositor()) { - mCompositorVsyncObserver = new CompositorVsyncObserver(this); + mCompositorVsyncObserver = new CompositorVsyncObserver(this, aWidget); } gfxPlatform::GetPlatform()->ComputeTileSize(); @@ -428,7 +430,10 @@ CompositorParent::Destroy() mApzcTreeManager = nullptr; } sIndirectLayerTrees.erase(mRootLayerTreeID); - mCompositorVsyncObserver = nullptr; + if (mCompositorVsyncObserver) { + mCompositorVsyncObserver->UnobserveVsync(); + mCompositorVsyncObserver = nullptr; + } } void diff --git a/gfx/layers/ipc/CompositorParent.h b/gfx/layers/ipc/CompositorParent.h index f9765295b261..b950238abb64 100644 --- a/gfx/layers/ipc/CompositorParent.h +++ b/gfx/layers/ipc/CompositorParent.h @@ -100,12 +100,12 @@ class CompositorVsyncObserver MOZ_FINAL : public VsyncObserver friend class CompositorParent; public: - explicit CompositorVsyncObserver(CompositorParent* aCompositorParent); + explicit CompositorVsyncObserver(CompositorParent* aCompositorParent, nsIWidget* aWidget); virtual bool NotifyVsync(TimeStamp aVsyncTimestamp) MOZ_OVERRIDE; void SetNeedsComposite(bool aSchedule); bool NeedsComposite(); void CancelCurrentCompositeTask(); - + private: virtual ~CompositorVsyncObserver(); @@ -118,6 +118,7 @@ private: bool mNeedsComposite; bool mIsObservingVsync; nsRefPtr mCompositorParent; + nsRefPtr mVsyncDispatcher; mozilla::Monitor mCurrentCompositeTaskMonitor; CancelableTask* mCurrentCompositeTask; From 5119b7e4ebf8c6efd3285ff734ebff76d2cf872c Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Thu, 18 Dec 2014 08:30:06 -0800 Subject: [PATCH 21/64] Bug 1101974. Part 3 - Create VsyncSource / Display framework. r=kats --- gfx/thebes/VsyncSource.cpp | 66 ++++++++++++++++++++++++++++++++++++++ gfx/thebes/VsyncSource.h | 50 +++++++++++++++++++++++++++++ gfx/thebes/gfxPlatform.cpp | 6 ++-- gfx/thebes/gfxPlatform.h | 20 +++++++++++- gfx/thebes/moz.build | 5 +++ 5 files changed, 144 insertions(+), 3 deletions(-) create mode 100644 gfx/thebes/VsyncSource.cpp create mode 100644 gfx/thebes/VsyncSource.h diff --git a/gfx/thebes/VsyncSource.cpp b/gfx/thebes/VsyncSource.cpp new file mode 100644 index 000000000000..994b933f1706 --- /dev/null +++ b/gfx/thebes/VsyncSource.cpp @@ -0,0 +1,66 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * 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 "VsyncSource.h" +#include "gfxPlatform.h" +#include "mozilla/TimeStamp.h" +#include "mozilla/VsyncDispatcher.h" + +using namespace mozilla; +using namespace mozilla::gfx; + +void +VsyncSource::AddVsyncDispatcher(VsyncDispatcher* aVsyncDispatcher) +{ + MOZ_ASSERT(NS_IsMainThread()); + GetGlobalDisplay().AddVsyncDispatcher(aVsyncDispatcher); +} + +void +VsyncSource::RemoveVsyncDispatcher(VsyncDispatcher* aVsyncDispatcher) +{ + MOZ_ASSERT(NS_IsMainThread()); + GetGlobalDisplay().RemoveVsyncDispatcher(aVsyncDispatcher); +} + +VsyncSource::Display& +VsyncSource::FindDisplay(VsyncDispatcher* aVsyncDispatcher) +{ + return GetGlobalDisplay(); +} + +void +VsyncSource::Display::NotifyVsync(TimeStamp aVsyncTimestamp) +{ + // Called on the hardware vsync thread + for (size_t i = 0; i < mVsyncDispatchers.Length(); i++) { + mVsyncDispatchers[i]->NotifyVsync(aVsyncTimestamp); + } +} + +VsyncSource::Display::Display() +{ + MOZ_ASSERT(NS_IsMainThread()); +} + +VsyncSource::Display::~Display() +{ + MOZ_ASSERT(NS_IsMainThread()); + mVsyncDispatchers.Clear(); +} + +void +VsyncSource::Display::AddVsyncDispatcher(VsyncDispatcher* aVsyncDispatcher) +{ + MOZ_ASSERT(NS_IsMainThread()); + mVsyncDispatchers.AppendElement(aVsyncDispatcher); +} + +void +VsyncSource::Display::RemoveVsyncDispatcher(VsyncDispatcher* aVsyncDispatcher) +{ + MOZ_ASSERT(NS_IsMainThread()); + mVsyncDispatchers.RemoveElement(aVsyncDispatcher); +} diff --git a/gfx/thebes/VsyncSource.h b/gfx/thebes/VsyncSource.h new file mode 100644 index 000000000000..343753f7652a --- /dev/null +++ b/gfx/thebes/VsyncSource.h @@ -0,0 +1,50 @@ +/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * 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/RefPtr.h" +#include "mozilla/TimeStamp.h" +#include "nsISupportsImpl.h" +#include "nsTArray.h" + +namespace mozilla { +class VsyncDispatcher; + +namespace gfx { + +// Controls how and when to enable/disable vsync. Lives as long as the +// gfxPlatform does on the parent process +class VsyncSource +{ + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VsyncSource) +public: + // Controls vsync unique to each display and unique on each platform + class Display { + public: + Display(); + virtual ~Display(); + void AddVsyncDispatcher(mozilla::VsyncDispatcher* aVsyncDispatcher); + void RemoveVsyncDispatcher(mozilla::VsyncDispatcher* aVsyncDispatcher); + // Notified when this display's vsync occurs, on the hardware vsync thread + void NotifyVsync(mozilla::TimeStamp aVsyncTimestamp); + + // These should all only be called on the main thread + virtual void EnableVsync() = 0; + virtual void DisableVsync() = 0; + virtual bool IsVsyncEnabled() = 0; + + private: + nsTArray> mVsyncDispatchers; + }; // end Display + + void AddVsyncDispatcher(mozilla::VsyncDispatcher* aVsyncDispatcher); + void RemoveVsyncDispatcher(mozilla::VsyncDispatcher* aVsyncDispatcher); + +protected: + virtual Display& GetGlobalDisplay() = 0; // Works across all displays + virtual Display& FindDisplay(mozilla::VsyncDispatcher* aVsyncDispatcher); + virtual ~VsyncSource() {} +}; // VsyncSource +} // gfx +} // mozilla diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index 8faba21fba04..5de9c530b2fe 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -104,6 +104,7 @@ class mozilla::gl::SkiaGLGlue : public GenericAtomicRefCounted { #include "nsIGfxInfo.h" #include "nsIXULRuntime.h" +#include "VsyncSource.h" namespace mozilla { namespace layers { @@ -548,8 +549,8 @@ gfxPlatform::Init() RegisterStrongMemoryReporter(new GfxMemoryImageReporter()); - if (gfxPrefs::HardwareVsyncEnabled() && gfxPrefs::VsyncAlignedCompositor()) { - gPlatform->InitHardwareVsync(); + if (XRE_IsParentProcess() && gfxPrefs::HardwareVsyncEnabled()) { + gPlatform->mVsyncSource = gPlatform->CreateHardwareVsyncSource(); } } @@ -597,6 +598,7 @@ gfxPlatform::Shutdown() gPlatform->mMemoryPressureObserver = nullptr; gPlatform->mSkiaGlue = nullptr; + gPlatform->mVsyncSource = nullptr; } #ifdef MOZ_WIDGET_ANDROID diff --git a/gfx/thebes/gfxPlatform.h b/gfx/thebes/gfxPlatform.h index 30529b37d5d6..3320642a8941 100644 --- a/gfx/thebes/gfxPlatform.h +++ b/gfx/thebes/gfxPlatform.h @@ -50,6 +50,7 @@ class SourceSurface; class DataSourceSurface; class ScaledFont; class DrawEventRecorder; +class VsyncSource; inline uint32_t BackendTypeBit(BackendType b) @@ -583,6 +584,17 @@ public: static bool UsesOffMainThreadCompositing(); bool HasEnoughTotalSystemMemoryForSkiaGL(); + + /** + * Get the hardware vsync source for each platform. + * Should only exist and be valid on the parent process + */ + virtual mozilla::gfx::VsyncSource* GetHardwareVsync() { + MOZ_ASSERT(mVsyncSource != nullptr); + MOZ_ASSERT(XRE_IsParentProcess()); + return mVsyncSource; + } + protected: gfxPlatform(); virtual ~gfxPlatform(); @@ -593,7 +605,10 @@ protected: /** * Initialized hardware vsync based on each platform. */ - virtual void InitHardwareVsync() {} + virtual already_AddRefed CreateHardwareVsyncSource() { + NS_WARNING("Hardware vsync not supported on platform yet"); + return nullptr; + } /** * Helper method, creates a draw target for a specific Azure backend. @@ -659,6 +674,9 @@ protected: uint32_t mTotalSystemMemory; + // Hardware vsync source. Only valid on parent process + nsRefPtr mVsyncSource; + private: /** * Start up Thebes. diff --git a/gfx/thebes/moz.build b/gfx/thebes/moz.build index f0b8d284d5b3..5764eee2e20e 100644 --- a/gfx/thebes/moz.build +++ b/gfx/thebes/moz.build @@ -52,6 +52,7 @@ EXPORTS += [ 'gfxVR.h', 'GraphicsFilter.h', 'RoundedRect.h', + 'VsyncSource.h', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': @@ -246,6 +247,7 @@ UNIFIED_SOURCES += [ 'gfxUtils.cpp', 'gfxVR.cpp', 'nsUnicodeRange.cpp', + 'VsyncSource.cpp', ] if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': @@ -269,6 +271,9 @@ LOCAL_INCLUDES += [ '/dom/xml', ] +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': + LOCAL_INCLUDES += ['/widget/gonk'] + if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'): DEFINES['MOZ_ENABLE_FREETYPE'] = True From 8840203e64f579679654fc06d31044e96b1e4681 Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Thu, 18 Dec 2014 08:30:06 -0800 Subject: [PATCH 22/64] Bug 1101974. Part 4 - Refactor VsyncSource on OS X. r=mstange --- gfx/thebes/gfxPlatformMac.cpp | 123 ++++++++++++++++++++-------------- gfx/thebes/gfxPlatformMac.h | 9 ++- 2 files changed, 78 insertions(+), 54 deletions(-) diff --git a/gfx/thebes/gfxPlatformMac.cpp b/gfx/thebes/gfxPlatformMac.cpp index 3d3bad6dffcf..6b4bfc070a8e 100644 --- a/gfx/thebes/gfxPlatformMac.cpp +++ b/gfx/thebes/gfxPlatformMac.cpp @@ -26,6 +26,8 @@ #include #include "nsCocoaFeatures.h" +#include "mozilla/layers/CompositorParent.h" +#include "VsyncSource.h" using namespace mozilla; using namespace mozilla::gfx; @@ -38,7 +40,7 @@ typedef uint32_t AutoActivationSetting; // bug 567552 - disable auto-activation of fonts -static void +static void DisableFontActivation() { // get the main bundle identifier @@ -429,81 +431,98 @@ static CVReturn VsyncCallback(CVDisplayLinkRef aDisplayLink, CVOptionFlags* aFlagsOut, void* aDisplayLinkContext) { - mozilla::VsyncSource* vsyncSource = (mozilla::VsyncSource*) aDisplayLinkContext; - if (vsyncSource->IsVsyncEnabled()) { - // Now refers to "Now" as in when this callback is called or when the current frame - // is displayed. aOutputTime is when the next frame should be displayed. - // Now is VERY VERY noisy, aOutputTime is in the future though. - int64_t timestamp = aOutputTime->hostTime; - mozilla::TimeStamp vsyncTime = mozilla::TimeStamp::FromSystemTime(timestamp); - mozilla::VsyncDispatcher::GetInstance()->NotifyVsync(vsyncTime); - return kCVReturnSuccess; - } else { - return kCVReturnDisplayLinkNotRunning; - } + VsyncSource::Display* display = (VsyncSource::Display*) aDisplayLinkContext; + int64_t timestamp = aOutputTime->hostTime; + mozilla::TimeStamp vsyncTime = mozilla::TimeStamp::FromSystemTime(timestamp); + display->NotifyVsync(vsyncTime); + return kCVReturnSuccess; } -class OSXVsyncSource MOZ_FINAL : public mozilla::VsyncSource +class OSXVsyncSource MOZ_FINAL : public VsyncSource { public: OSXVsyncSource() { - EnableVsync(); } - virtual void EnableVsync() MOZ_OVERRIDE + virtual Display& GetGlobalDisplay() MOZ_OVERRIDE { - // Create a display link capable of being used with all active displays - // TODO: See if we need to create an active DisplayLink for each monitor in multi-monitor - // situations. According to the docs, it is compatible with all displays running on the computer - // But if we have different monitors at different display rates, we may hit issues. - if (CVDisplayLinkCreateWithActiveCGDisplays(&mDisplayLink) != kCVReturnSuccess) { - NS_WARNING("Could not create a display link, returning"); - return; - } - - // Set the renderer output callback function - if (CVDisplayLinkSetOutputCallback(mDisplayLink, &VsyncCallback, this) != kCVReturnSuccess) { - NS_WARNING("Could not set displaylink output callback"); - return; - } - - // Activate the display link - if (CVDisplayLinkStart(mDisplayLink) != kCVReturnSuccess) { - NS_WARNING("Could not activate the display link"); - mDisplayLink = nullptr; - } + return mGlobalDisplay; } - virtual void DisableVsync() MOZ_OVERRIDE +protected: + class OSXDisplay MOZ_FINAL : public VsyncSource::Display { - // Release the display link - if (mDisplayLink) { - CVDisplayLinkRelease(mDisplayLink); - mDisplayLink = nullptr; + public: + OSXDisplay() + { + EnableVsync(); } - } - virtual bool IsVsyncEnabled() MOZ_OVERRIDE - { - return mDisplayLink != nullptr; - } + ~OSXDisplay() + { + DisableVsync(); + } + + virtual void EnableVsync() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + // Create a display link capable of being used with all active displays + // TODO: See if we need to create an active DisplayLink for each monitor in multi-monitor + // situations. According to the docs, it is compatible with all displays running on the computer + // But if we have different monitors at different display rates, we may hit issues. + if (CVDisplayLinkCreateWithActiveCGDisplays(&mDisplayLink) != kCVReturnSuccess) { + NS_WARNING("Could not create a display link, returning"); + return; + } + + if (CVDisplayLinkSetOutputCallback(mDisplayLink, &VsyncCallback, this) != kCVReturnSuccess) { + NS_WARNING("Could not set displaylink output callback"); + return; + } + + if (CVDisplayLinkStart(mDisplayLink) != kCVReturnSuccess) { + NS_WARNING("Could not activate the display link"); + mDisplayLink = nullptr; + } + } + + virtual void DisableVsync() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + + // Release the display link + if (mDisplayLink) { + CVDisplayLinkRelease(mDisplayLink); + mDisplayLink = nullptr; + } + } + + virtual bool IsVsyncEnabled() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + return mDisplayLink != nullptr; + } + + private: + // Manages the display link render thread + CVDisplayLinkRef mDisplayLink; + }; // OSXDisplay private: virtual ~OSXVsyncSource() { - DisableVsync(); } - // Manages the display link render thread - CVDisplayLinkRef mDisplayLink; + OSXDisplay mGlobalDisplay; }; // OSXVsyncSource -void -gfxPlatformMac::InitHardwareVsync() +already_AddRefed +gfxPlatformMac::CreateHardwareVsyncSource() { nsRefPtr osxVsyncSource = new OSXVsyncSource(); - mozilla::VsyncDispatcher::GetInstance()->SetVsyncSource(osxVsyncSource); + return osxVsyncSource.forget(); } void diff --git a/gfx/thebes/gfxPlatformMac.h b/gfx/thebes/gfxPlatformMac.h index bf06fb446a2d..1ba32db2abbf 100644 --- a/gfx/thebes/gfxPlatformMac.h +++ b/gfx/thebes/gfxPlatformMac.h @@ -9,7 +9,12 @@ #include "nsTArrayForwardDeclare.h" #include "gfxPlatform.h" -namespace mozilla { namespace gfx { class DrawTarget; }} +namespace mozilla { +namespace gfx { +class DrawTarget; +class VsyncSource; +} // gfx +} // mozilla class gfxPlatformMac : public gfxPlatform { public: @@ -67,7 +72,7 @@ public: virtual bool UseTiling() MOZ_OVERRIDE; virtual bool UseProgressivePaint() MOZ_OVERRIDE; - virtual void InitHardwareVsync() MOZ_OVERRIDE; + virtual already_AddRefed CreateHardwareVsyncSource() MOZ_OVERRIDE; // lower threshold on font anti-aliasing uint32_t GetAntiAliasingThreshold() { return mFontAntiAliasingThreshold; } From 86ee98b4cd58fff440bdecd5aa12c5c83e155a9f Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Thu, 18 Dec 2014 08:30:06 -0800 Subject: [PATCH 23/64] Bug 1101974. Part 5 - Refactor VsyncDispatcher to use VsyncSource. r=kats --- widget/VsyncDispatcher.cpp | 82 +++++++++----------------------------- widget/VsyncDispatcher.h | 35 +++------------- 2 files changed, 25 insertions(+), 92 deletions(-) diff --git a/widget/VsyncDispatcher.cpp b/widget/VsyncDispatcher.cpp index 44168766e72b..5aa8c5322ca6 100644 --- a/widget/VsyncDispatcher.cpp +++ b/widget/VsyncDispatcher.cpp @@ -7,6 +7,8 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/layers/CompositorParent.h" #include "gfxPrefs.h" +#include "gfxPlatform.h" +#include "VsyncSource.h" #ifdef MOZ_ENABLE_PROFILER_SPS #include "GeckoProfiler.h" @@ -21,97 +23,51 @@ using namespace mozilla::layers; namespace mozilla { -StaticRefPtr sVsyncDispatcher; - -/*static*/ VsyncDispatcher* -VsyncDispatcher::GetInstance() -{ - if (!sVsyncDispatcher) { - sVsyncDispatcher = new VsyncDispatcher(); - ClearOnShutdown(&sVsyncDispatcher); - } - - return sVsyncDispatcher; -} - VsyncDispatcher::VsyncDispatcher() : mCompositorObserverLock("CompositorObserverLock") { - + MOZ_ASSERT(XRE_IsParentProcess()); + gfxPlatform::GetPlatform()->GetHardwareVsync()->AddVsyncDispatcher(this); } VsyncDispatcher::~VsyncDispatcher() { - MutexAutoLock lock(mCompositorObserverLock); - mCompositorObservers.Clear(); -} - -void -VsyncDispatcher::SetVsyncSource(VsyncSource* aVsyncSource) -{ - mVsyncSource = aVsyncSource; -} - -void -VsyncDispatcher::DispatchTouchEvents(bool aNotifiedCompositors, TimeStamp aVsyncTime) -{ - // Touch events can sometimes start a composite, so make sure we dispatch touches - // even if we don't composite -#ifdef MOZ_WIDGET_GONK - if (!aNotifiedCompositors && gfxPrefs::TouchResampling()) { - GeckoTouchDispatcher::NotifyVsync(aVsyncTime); - } -#endif + // We auto remove this vsync dispatcher from the vsync source in the nsBaseWidget + MOZ_ASSERT(NS_IsMainThread()); } void VsyncDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp) { - bool notifiedCompositors = false; + // In hardware vsync thread #ifdef MOZ_ENABLE_PROFILER_SPS if (profiler_is_active()) { CompositorParent::PostInsertVsyncProfilerMarker(aVsyncTimestamp); } #endif - if (gfxPrefs::VsyncAlignedCompositor()) { - MutexAutoLock lock(mCompositorObserverLock); - notifiedCompositors = NotifyVsyncObservers(aVsyncTimestamp, mCompositorObservers); + MutexAutoLock lock(mCompositorObserverLock); + if (gfxPrefs::VsyncAlignedCompositor() && mCompositorVsyncObserver) { + mCompositorVsyncObserver->NotifyVsync(aVsyncTimestamp); } - - DispatchTouchEvents(notifiedCompositors, aVsyncTimestamp); -} - -bool -VsyncDispatcher::NotifyVsyncObservers(TimeStamp aVsyncTimestamp, nsTArray>& aObservers) -{ - // Callers should lock the respective lock for the aObservers before calling this function - for (size_t i = 0; i < aObservers.Length(); i++) { - aObservers[i]->NotifyVsync(aVsyncTimestamp); - } - return !aObservers.IsEmpty(); } void -VsyncDispatcher::AddCompositorVsyncObserver(VsyncObserver* aVsyncObserver) +VsyncDispatcher::SetCompositorVsyncObserver(VsyncObserver* aVsyncObserver) { MOZ_ASSERT(CompositorParent::IsInCompositorThread()); MutexAutoLock lock(mCompositorObserverLock); - if (!mCompositorObservers.Contains(aVsyncObserver)) { - mCompositorObservers.AppendElement(aVsyncObserver); - } + mCompositorVsyncObserver = aVsyncObserver; } void -VsyncDispatcher::RemoveCompositorVsyncObserver(VsyncObserver* aVsyncObserver) +VsyncDispatcher::Shutdown() { - MOZ_ASSERT(CompositorParent::IsInCompositorThread() || NS_IsMainThread()); - MutexAutoLock lock(mCompositorObserverLock); - if (mCompositorObservers.Contains(aVsyncObserver)) { - mCompositorObservers.RemoveElement(aVsyncObserver); - } else { - NS_WARNING("Could not delete a compositor vsync observer\n"); - } + // Need to explicitly remove VsyncDispatcher when the nsBaseWidget shuts down. + // Otherwise, we would get dead vsync notifications between when the nsBaseWidget + // shuts down and the CompositorParent shuts down. + MOZ_ASSERT(XRE_IsParentProcess()); + MOZ_ASSERT(NS_IsMainThread()); + gfxPlatform::GetPlatform()->GetHardwareVsync()->RemoveVsyncDispatcher(this); } - } // namespace mozilla diff --git a/widget/VsyncDispatcher.h b/widget/VsyncDispatcher.h index 797a0b426b82..2a38f4707707 100644 --- a/widget/VsyncDispatcher.h +++ b/widget/VsyncDispatcher.h @@ -12,8 +12,6 @@ #include "nsTArray.h" #include "ThreadSafeRefcountingWithMainThreadDestruction.h" -class MessageLoop; - namespace mozilla { class TimeStamp; @@ -21,23 +19,10 @@ namespace layers { class CompositorVsyncObserver; } -// Controls how and when to enable/disable vsync. -class VsyncSource -{ -public: - NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VsyncSource) - virtual void EnableVsync() = 0; - virtual void DisableVsync() = 0; - virtual bool IsVsyncEnabled() = 0; - -protected: - virtual ~VsyncSource() {} -}; // VsyncSource - class VsyncObserver { // Must be destroyed on main thread since the compositor is as well - NS_INLINE_DECL_THREADSAFE_REFCOUNTING_WITH_MAIN_THREAD_DESTRUCTION(VsyncObserver) + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VsyncObserver) public: // The method called when a vsync occurs. Return true if some work was done. @@ -55,7 +40,8 @@ class VsyncDispatcher NS_INLINE_DECL_THREADSAFE_REFCOUNTING(VsyncDispatcher) public: - static VsyncDispatcher* GetInstance(); + VsyncDispatcher(); + // Called on the vsync thread when a hardware vsync occurs // The aVsyncTimestamp can mean different things depending on the platform: // b2g - The vsync timestamp of the previous frame that was just displayed @@ -63,24 +49,15 @@ public: // TODO: Windows / Linux. DOCUMENT THIS WHEN IMPLEMENTING ON THOSE PLATFORMS // Android: TODO void NotifyVsync(TimeStamp aVsyncTimestamp); - void SetVsyncSource(VsyncSource* aVsyncSource); // Compositor vsync observers must be added/removed on the compositor thread - void AddCompositorVsyncObserver(VsyncObserver* aVsyncObserver); - void RemoveCompositorVsyncObserver(VsyncObserver* aVsyncObserver); + void SetCompositorVsyncObserver(VsyncObserver* aVsyncObserver); + void Shutdown(); private: - VsyncDispatcher(); virtual ~VsyncDispatcher(); - void DispatchTouchEvents(bool aNotifiedCompositors, TimeStamp aVsyncTime); - - // Called on the vsync thread. Returns true if observers were notified - bool NotifyVsyncObservers(TimeStamp aVsyncTimestamp, nsTArray>& aObservers); - - // Can have multiple compositors. On desktop, this is 1 compositor per window Mutex mCompositorObserverLock; - nsTArray> mCompositorObservers; - nsRefPtr mVsyncSource; + nsRefPtr mCompositorVsyncObserver; }; // VsyncDispatcher } // namespace mozilla From 3027d1493ed551c3bc681d42b57b327368e8834a Mon Sep 17 00:00:00 2001 From: Mason Chang Date: Thu, 18 Dec 2014 08:30:06 -0800 Subject: [PATCH 24/64] Bug 1101974. Part 6. Create VsyncSource on b2g. r=kats --- gfx/thebes/gfxAndroidPlatform.cpp | 72 ++++++++++++++++++++++++++++ gfx/thebes/gfxAndroidPlatform.h | 2 + widget/gonk/GeckoTouchDispatcher.cpp | 19 +++++++- widget/gonk/GeckoTouchDispatcher.h | 8 ++++ widget/gonk/HwcComposer2D.cpp | 3 +- widget/gonk/nsAppShell.cpp | 1 + widget/gonk/nsWindow.cpp | 15 ++++++ widget/gonk/nsWindow.h | 1 + 8 files changed, 119 insertions(+), 2 deletions(-) diff --git a/gfx/thebes/gfxAndroidPlatform.cpp b/gfx/thebes/gfxAndroidPlatform.cpp index 9b35be25585d..e2251e423614 100644 --- a/gfx/thebes/gfxAndroidPlatform.cpp +++ b/gfx/thebes/gfxAndroidPlatform.cpp @@ -23,6 +23,7 @@ #include "nsServiceManagerUtils.h" #include "gfxPrefs.h" #include "cairo.h" +#include "VsyncSource.h" #ifdef MOZ_WIDGET_ANDROID #include "AndroidBridge.h" @@ -30,6 +31,8 @@ #ifdef MOZ_WIDGET_GONK #include +#include "mozilla/layers/CompositorParent.h" +#include "HwcComposer2D.h" #endif #include "ft2build.h" @@ -420,3 +423,72 @@ bool gfxAndroidPlatform::HaveChoiceOfHWAndSWCanvas() #endif return gfxPlatform::HaveChoiceOfHWAndSWCanvas(); } + +#ifdef MOZ_WIDGET_GONK +class GonkVsyncSource MOZ_FINAL : public VsyncSource +{ +public: + GonkVsyncSource() + { + } + + virtual Display& GetGlobalDisplay() MOZ_OVERRIDE + { + return mGlobalDisplay; + } + +protected: + class GonkDisplay MOZ_FINAL : public VsyncSource::Display + { + public: + GonkDisplay() : mVsyncEnabled(false) + { + EnableVsync(); + } + + ~GonkDisplay() + { + DisableVsync(); + } + + virtual void EnableVsync() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + mVsyncEnabled = HwcComposer2D::GetInstance()->EnableVsync(true); + } + + virtual void DisableVsync() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + mVsyncEnabled = HwcComposer2D::GetInstance()->EnableVsync(false); + } + + virtual bool IsVsyncEnabled() MOZ_OVERRIDE + { + MOZ_ASSERT(NS_IsMainThread()); + return mVsyncEnabled; + } + private: + bool mVsyncEnabled; + }; // GonkDisplay + +private: + virtual ~GonkVsyncSource() + { + } + + GonkDisplay mGlobalDisplay; +}; // GonkVsyncSource +#endif + +already_AddRefed +gfxAndroidPlatform::CreateHardwareVsyncSource() +{ +#ifdef MOZ_WIDGET_GONK + nsRefPtr vsyncSource = new GonkVsyncSource(); + return vsyncSource.forget(); +#else + NS_WARNING("Hardware vsync not supported on android yet"); + return nullptr; +#endif +} diff --git a/gfx/thebes/gfxAndroidPlatform.h b/gfx/thebes/gfxAndroidPlatform.h index 814d3e4b8dab..fc7e98778b5e 100644 --- a/gfx/thebes/gfxAndroidPlatform.h +++ b/gfx/thebes/gfxAndroidPlatform.h @@ -89,6 +89,8 @@ public: virtual bool HaveChoiceOfHWAndSWCanvas() MOZ_OVERRIDE; virtual bool UseAcceleratedSkiaCanvas() MOZ_OVERRIDE; + virtual already_AddRefed CreateHardwareVsyncSource() MOZ_OVERRIDE; + #ifdef MOZ_WIDGET_GONK virtual bool IsInGonkEmulator() const { return mIsInGonkEmulator; } diff --git a/widget/gonk/GeckoTouchDispatcher.cpp b/widget/gonk/GeckoTouchDispatcher.cpp index 7474a64f3a4b..e7d0e8e0c20d 100644 --- a/widget/gonk/GeckoTouchDispatcher.cpp +++ b/widget/gonk/GeckoTouchDispatcher.cpp @@ -29,6 +29,7 @@ #include "mozilla/TimeStamp.h" #include "mozilla/TouchEvents.h" #include "mozilla/dom/Touch.h" +#include "mozilla/layers/CompositorParent.h" #include "nsAppShell.h" #include "nsDebug.h" #include "nsThreadUtils.h" @@ -115,11 +116,23 @@ private: MultiTouchInput mTouch; }; +/* static */ void +GeckoTouchDispatcher::SetCompositorVsyncObserver(mozilla::layers::CompositorVsyncObserver *aObserver) +{ + MOZ_ASSERT(sTouchDispatcher != nullptr); + MOZ_ASSERT(NS_IsMainThread()); + // We assume on b2g that there is only 1 CompositorParent + MOZ_ASSERT(sTouchDispatcher->mCompositorVsyncObserver == nullptr); + if (gfxPrefs::TouchResampling()) { + sTouchDispatcher->mCompositorVsyncObserver = aObserver; + } +} + // Timestamp is in nanoseconds /* static */ bool GeckoTouchDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp) { - if (sTouchDispatcher == nullptr) { + if ((sTouchDispatcher == nullptr) || !gfxPrefs::TouchResampling()) { return false; } @@ -141,6 +154,10 @@ GeckoTouchDispatcher::NotifyVsync(TimeStamp aVsyncTimestamp) void GeckoTouchDispatcher::NotifyTouch(MultiTouchInput& aTouch, TimeStamp aEventTime) { + if (aTouch.mType == MultiTouchInput::MULTITOUCH_START && mCompositorVsyncObserver) { + mCompositorVsyncObserver->SetNeedsComposite(true); + } + if (aTouch.mType == MultiTouchInput::MULTITOUCH_MOVE) { MutexAutoLock lock(mTouchQueueLock); if (mResamplingEnabled) { diff --git a/widget/gonk/GeckoTouchDispatcher.h b/widget/gonk/GeckoTouchDispatcher.h index f188d385c934..8ff920f04038 100644 --- a/widget/gonk/GeckoTouchDispatcher.h +++ b/widget/gonk/GeckoTouchDispatcher.h @@ -22,12 +22,17 @@ #include "Units.h" #include "mozilla/Mutex.h" #include +#include "nsRefPtr.h" class nsIWidget; namespace mozilla { class WidgetMouseEvent; +namespace layers { +class CompositorVsyncObserver; +} + // Used to resample touch events whenever a vsync event occurs. It batches // touch moves and on every vsync, resamples the touch position to create smooth // scrolls. We use the Android touch resample algorithm. It uses a combination of @@ -48,6 +53,7 @@ public: void DispatchTouchEvent(MultiTouchInput& aMultiTouch); void DispatchTouchMoveEvents(TimeStamp aVsyncTime); static bool NotifyVsync(TimeStamp aVsyncTimestamp); + static void SetCompositorVsyncObserver(layers::CompositorVsyncObserver* aObserver); private: void ResampleTouchMoves(MultiTouchInput& aOutTouch, TimeStamp vsyncTime); @@ -78,6 +84,8 @@ private: // How far ahead can vsync events get ahead of touch events. TimeDuration mOldTouchThreshold; + + nsRefPtr mCompositorVsyncObserver; }; } // namespace mozilla diff --git a/widget/gonk/HwcComposer2D.cpp b/widget/gonk/HwcComposer2D.cpp index 47e7125b0980..2474de48e853 100644 --- a/widget/gonk/HwcComposer2D.cpp +++ b/widget/gonk/HwcComposer2D.cpp @@ -30,6 +30,7 @@ #include "mozilla/StaticPtr.h" #include "cutils/properties.h" #include "gfx2DGlue.h" +#include "nsWindow.h" #if ANDROID_VERSION >= 17 #include "libdisplay/FramebufferSurface.h" @@ -224,7 +225,7 @@ HwcComposer2D::Vsync(int aDisplay, nsecs_t aVsyncTimestamp) LOGE("Non-uniform vsync interval: %lld\n", vsyncInterval); } mLastVsyncTime = aVsyncTimestamp; - VsyncDispatcher::GetInstance()->NotifyVsync(vsyncTime); + nsWindow::NotifyVsync(vsyncTime); } // Called on the "invalidator" thread (run from HAL). diff --git a/widget/gonk/nsAppShell.cpp b/widget/gonk/nsAppShell.cpp index 8c74ca258bfb..acc588ac2456 100644 --- a/widget/gonk/nsAppShell.cpp +++ b/widget/gonk/nsAppShell.cpp @@ -73,6 +73,7 @@ // Defines kKeyMapping and GetKeyNameIndex() #include "GonkKeyMapping.h" +#include "mozilla/layers/CompositorParent.h" #include "GeckoTouchDispatcher.h" #define LOG(args...) \ diff --git a/widget/gonk/nsWindow.cpp b/widget/gonk/nsWindow.cpp index 31cd75d53bfa..fc126971220d 100644 --- a/widget/gonk/nsWindow.cpp +++ b/widget/gonk/nsWindow.cpp @@ -213,6 +213,21 @@ nsWindow::DoDraw(void) } } +/* static */ void +nsWindow::NotifyVsync(TimeStamp aVsyncTimestamp) +{ + if (!gFocusedWindow) { + return; + } + + VsyncDispatcher* vsyncDispatcher = gFocusedWindow->GetVsyncDispatcher(); + // During bootup, there is a delay between when the nsWindow is created + // and when the Compositor is created, but vsync is already turned on + if (vsyncDispatcher) { + vsyncDispatcher->NotifyVsync(aVsyncTimestamp); + } +} + nsEventStatus nsWindow::DispatchInputEvent(WidgetGUIEvent& aEvent, bool* aWasCaptured) { diff --git a/widget/gonk/nsWindow.h b/widget/gonk/nsWindow.h index 4b55e55c6aed..d4b17ab61227 100644 --- a/widget/gonk/nsWindow.h +++ b/widget/gonk/nsWindow.h @@ -49,6 +49,7 @@ public: nsWindow(); virtual ~nsWindow(); + static void NotifyVsync(mozilla::TimeStamp aVsyncTimestamp); static void DoDraw(void); static nsEventStatus DispatchInputEvent(mozilla::WidgetGUIEvent& aEvent, bool* aWasCaptured = nullptr); From 41d5e05bb1d273390312faf3221633ef5527986f Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Thu, 18 Dec 2014 12:22:50 -0500 Subject: [PATCH 25/64] Backed out changeset bf93cbec0450 (bug 1112170) for OSX asserts/crashes. --- gfx/layers/client/ClientPaintedLayer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gfx/layers/client/ClientPaintedLayer.cpp b/gfx/layers/client/ClientPaintedLayer.cpp index 9c8aba56094d..f9c980eee535 100644 --- a/gfx/layers/client/ClientPaintedLayer.cpp +++ b/gfx/layers/client/ClientPaintedLayer.cpp @@ -162,7 +162,10 @@ ClientLayerManager::CreatePaintedLayerWithHint(PaintedLayerCreationHint aHint) #ifdef MOZ_B2G aHint == SCROLLABLE && #endif - gfxPlatform::GetPlatform()->UseTiling()) { + gfxPlatform::GetPlatform()->UseTiling() && + (AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_OPENGL || + AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D9 || + AsShadowForwarder()->GetCompositorBackendType() == LayersBackend::LAYERS_D3D11)) { nsRefPtr layer = new ClientTiledPaintedLayer(this, aHint); CREATE_SHADOW(Painted); return layer.forget(); From 2bf4c5e7a9c59ff759d691f00aaa2ac5a1da1b10 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Tue, 9 Dec 2014 11:59:58 -0500 Subject: [PATCH 26/64] bug 1003450 [1/3] - node-http2 refuses PRIORITY in idle state r=hurley This only impacts the CI for h2-16 node-http2 as of at least 3.0.1 generates protocol error upon receipt of PRIORITY frames in the IDLE state.. the http2 makes this clearly legal in 5.1 Stream States -> idle "Receiving any frames other than HEADERS, PUSH_PROMISE or PRIORITY on a stream in this state MUST be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR." --- testing/xpcshell/node-http2/lib/protocol/stream.js | 2 ++ 1 file changed, 2 insertions(+) --- testing/xpcshell/node-http2/lib/protocol/stream.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/xpcshell/node-http2/lib/protocol/stream.js b/testing/xpcshell/node-http2/lib/protocol/stream.js index f54a01e8db8f..50abbe6fc439 100644 --- a/testing/xpcshell/node-http2/lib/protocol/stream.js +++ b/testing/xpcshell/node-http2/lib/protocol/stream.js @@ -443,6 +443,8 @@ Stream.prototype._transition = function transition(sending, frame) { this._initiated = sending; } else if (sending && RST_STREAM) { this._setState('CLOSED'); + } else if (PRIORITY) { + /* No state change */ } else { connectionError = 'PROTOCOL_ERROR'; } From 7edbeec28f4efb3a29660aacd9b95e8f6a657e14 Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Sat, 6 Dec 2014 14:26:50 -0500 Subject: [PATCH 27/64] bug 1003450 - [2/3] Group Dependency nodes for HTTP/2 r=hurley --- dom/base/Navigator.cpp | 6 ++ dom/base/nsScriptLoader.cpp | 11 ++- dom/base/nsXMLHttpRequest.cpp | 12 ++- layout/style/Loader.cpp | 12 +-- modules/libpref/init/all.js | 1 + netwerk/base/public/moz.build | 1 + netwerk/base/public/nsIClassOfService.idl | 45 +++++++++++ netwerk/ipc/NeckoChannelParams.ipdlh | 1 + netwerk/protocol/http/Http2Session.cpp | 77 ++++++++++++++----- netwerk/protocol/http/Http2Session.h | 13 ++++ netwerk/protocol/http/Http2Stream.cpp | 63 +++++++++++++-- netwerk/protocol/http/Http2Stream.h | 6 +- netwerk/protocol/http/HttpBaseChannel.cpp | 33 +------- netwerk/protocol/http/HttpBaseChannel.h | 12 +-- netwerk/protocol/http/HttpChannelChild.cpp | 39 ++++++++++ netwerk/protocol/http/HttpChannelChild.h | 4 + netwerk/protocol/http/HttpChannelParent.cpp | 18 ++++- netwerk/protocol/http/HttpChannelParent.h | 2 + netwerk/protocol/http/PHttpChannel.ipdl | 1 + netwerk/protocol/http/nsHttpChannel.cpp | 39 ++++++++-- netwerk/protocol/http/nsHttpChannel.h | 5 ++ netwerk/protocol/http/nsHttpConnectionMgr.cpp | 3 +- netwerk/protocol/http/nsHttpHandler.cpp | 7 ++ netwerk/protocol/http/nsHttpHandler.h | 2 + netwerk/protocol/http/nsHttpTransaction.cpp | 3 +- netwerk/protocol/http/nsHttpTransaction.h | 5 ++ .../protocol/http/nsIHttpChannelInternal.idl | 18 +---- .../protocol/websocket/WebSocketChannel.cpp | 7 +- netwerk/test/unit/test_http2.js | 9 +++ 29 files changed, 345 insertions(+), 110 deletions(-) create mode 100644 netwerk/base/public/nsIClassOfService.idl diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp index 1ba5d75ea83a..81752c673f46 100644 --- a/dom/base/Navigator.cpp +++ b/dom/base/Navigator.cpp @@ -15,6 +15,7 @@ #include "mozilla/dom/DesktopNotification.h" #include "mozilla/dom/File.h" #include "nsGeolocation.h" +#include "nsIClassOfService.h" #include "nsIHttpProtocolHandler.h" #include "nsIContentPolicy.h" #include "nsIContentSecurityPolicy.h" @@ -1190,6 +1191,11 @@ Navigator::SendBeacon(const nsAString& aUrl, p->SetPriority(nsISupportsPriority::PRIORITY_LOWEST); } + nsCOMPtr cos(do_QueryInterface(channel)); + if (cos) { + cos->AddClassFlags(nsIClassOfService::Background); + } + nsRefPtr cors = new nsCORSListenerProxy(new BeaconStreamListener(), principal, true); diff --git a/dom/base/nsScriptLoader.cpp b/dom/base/nsScriptLoader.cpp index 05cf6a863be8..5fe40e37cd7a 100644 --- a/dom/base/nsScriptLoader.cpp +++ b/dom/base/nsScriptLoader.cpp @@ -27,7 +27,7 @@ #include "nsJSPrincipals.h" #include "nsContentPolicyUtils.h" #include "nsIHttpChannel.h" -#include "nsIHttpChannelInternal.h" +#include "nsIClassOfService.h" #include "nsITimedChannel.h" #include "nsIScriptElement.h" #include "nsIDOMHTMLScriptElement.h" @@ -321,18 +321,17 @@ nsScriptLoader::StartLoad(nsScriptLoadRequest *aRequest, const nsAString &aType, NS_ENSURE_SUCCESS(rv, rv); nsIScriptElement *script = aRequest->mElement; - nsCOMPtr - internalHttpChannel(do_QueryInterface(channel)); + nsCOMPtr cos(do_QueryInterface(channel)); - if (internalHttpChannel) { + if (cos) { if (aScriptFromHead && !(script && (script->GetScriptAsync() || script->GetScriptDeferred()))) { // synchronous head scripts block lading of most other non js/css // content such as images - internalHttpChannel->SetLoadAsBlocking(true); + cos->AddClassFlags(nsIClassOfService::Leader); } else if (!(script && script->GetScriptDeferred())) { // other scripts are neither blocked nor prioritized unless marked deferred - internalHttpChannel->SetLoadUnblocked(true); + cos->AddClassFlags(nsIClassOfService::Unblocked); } } diff --git a/dom/base/nsXMLHttpRequest.cpp b/dom/base/nsXMLHttpRequest.cpp index 5246a80f75da..92f20ed8ebbb 100644 --- a/dom/base/nsXMLHttpRequest.cpp +++ b/dom/base/nsXMLHttpRequest.cpp @@ -66,6 +66,7 @@ #include "nsIPermissionManager.h" #include "nsMimeTypes.h" #include "nsIHttpChannelInternal.h" +#include "nsIClassOfService.h" #include "nsCharSeparatedTokenizer.h" #include "nsFormData.h" #include "nsStreamListenerWrapper.h" @@ -2889,14 +2890,17 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable& aBody) // the channel slow by default for pipeline purposes AddLoadFlags(mChannel, nsIRequest::INHIBIT_PIPELINE); - nsCOMPtr - internalHttpChannel(do_QueryInterface(mChannel)); - if (internalHttpChannel) { + nsCOMPtr cos(do_QueryInterface(mChannel)); + if (cos) { // we never let XHR be blocked by head CSS/JS loads to avoid // potential deadlock where server generation of CSS/JS requires // an XHR signal. - internalHttpChannel->SetLoadUnblocked(true); + cos->AddClassFlags(nsIClassOfService::Unblocked); + } + nsCOMPtr + internalHttpChannel(do_QueryInterface(mChannel)); + if (internalHttpChannel) { // Disable Necko-internal response timeouts. internalHttpChannel->SetResponseTimeoutEnabled(false); } diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp index 05f4d5c22e22..acf6db2675b0 100644 --- a/layout/style/Loader.cpp +++ b/layout/style/Loader.cpp @@ -36,7 +36,7 @@ #include "nsIScriptSecurityManager.h" #include "nsContentPolicyUtils.h" #include "nsIHttpChannel.h" -#include "nsIHttpChannelInternal.h" +#include "nsIClassOfService.h" #include "nsIScriptError.h" #include "nsMimeTypes.h" #include "nsIStyleSheetLinkingElement.h" @@ -1623,10 +1623,12 @@ Loader::LoadSheet(SheetLoadData* aLoadData, StyleSheetState aSheetState) return rv; } - nsCOMPtr - internalHttpChannel(do_QueryInterface(channel)); - if (internalHttpChannel) - internalHttpChannel->SetLoadAsBlocking(!aLoadData->mWasAlternate); + if (!aLoadData->mWasAlternate) { + nsCOMPtr cos(do_QueryInterface(channel)); + if (cos) { + cos->AddClassFlags(nsIClassOfService::Leader); + } + } nsCOMPtr httpChannel(do_QueryInterface(channel)); if (httpChannel) { diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index a322e619ac5f..f532dccadef6 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1284,6 +1284,7 @@ pref("network.http.spdy.enabled", true); pref("network.http.spdy.enabled.v3-1", true); pref("network.http.spdy.enabled.http2draft", true); pref("network.http.spdy.enabled.http2", true); +pref("network.http.spdy.enabled.deps", true); pref("network.http.spdy.enforce-tls-profile", true); pref("network.http.spdy.chunk-size", 16000); pref("network.http.spdy.timeout", 180); diff --git a/netwerk/base/public/moz.build b/netwerk/base/public/moz.build index cbe42a47b622..0d237a8995ad 100644 --- a/netwerk/base/public/moz.build +++ b/netwerk/base/public/moz.build @@ -30,6 +30,7 @@ XPIDL_SOURCES += [ 'nsIChannel.idl', 'nsIChannelEventSink.idl', 'nsIChildChannel.idl', + 'nsIClassOfService.idl', 'nsIContentSniffer.idl', 'nsICryptoFIPSInfo.idl', 'nsICryptoHash.idl', diff --git a/netwerk/base/public/nsIClassOfService.idl b/netwerk/base/public/nsIClassOfService.idl new file mode 100644 index 000000000000..44ae74b5b28f --- /dev/null +++ b/netwerk/base/public/nsIClassOfService.idl @@ -0,0 +1,45 @@ +/* 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 "nsISupports.idl" + +/** + * nsIClassOfService.idl + * + * Used to express class dependencies and characteristics - complimentary to + * nsISupportsPriority which is used to express weight + * + * Channels that implement this interface may make use of this + * information in different ways. + * + * The default gecko HTTP/1 stack makes Followers wait for Leaders to + * complete before dispatching followers. Other classes run in + * parallel - neither being blocked nor blocking. All grouping is done + * based on the Load Group - separate load groups proceed + * independently. + * + * HTTP/2 does not use the load group, but prioritization is done per + * HTTP/2 session. HTTP/2 dispatches all the requests as soon as + * possible. + * The various classes are assigned logical priority + * dependency groups and then transactions of that class depend on the + * group. In this model Followers block on Leaders and Speculative + * depends on Background. See Http2Stream.cpp for weighting details. + * + */ + +[scriptable, uuid(1ccb58ec-5e07-4cf9-a30d-ac5490d23b41)] +interface nsIClassOfService : nsISupports +{ + attribute unsigned long classFlags; + + void clearClassFlags(in unsigned long flags); + void addClassFlags(in unsigned long flags); + + const unsigned long Leader = 1 << 0; + const unsigned long Follower = 1 << 1; + const unsigned long Speculative = 1 << 2; + const unsigned long Background = 1 << 3; + const unsigned long Unblocked = 1 << 4; +}; diff --git a/netwerk/ipc/NeckoChannelParams.ipdlh b/netwerk/ipc/NeckoChannelParams.ipdlh index e2eea4087345..9a0783fc4eb1 100644 --- a/netwerk/ipc/NeckoChannelParams.ipdlh +++ b/netwerk/ipc/NeckoChannelParams.ipdlh @@ -41,6 +41,7 @@ struct HttpChannelOpenArgs OptionalInputStreamParams uploadStream; bool uploadStreamHasHeaders; uint16_t priority; + uint32_t classOfService; uint8_t redirectionLimit; bool allowPipelining; bool allowSTS; diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index bbc7f7b94207..9d0c480bf65b 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -103,6 +103,7 @@ Http2Session::Http2Session(nsISocketTransport *aSocketTransport) , mPreviousUsed(false) , mWaitingForSettingsAck(false) , mGoAwayOnPush(false) + , mUseH2Deps(false) { MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread); @@ -789,20 +790,26 @@ Http2Session::GenerateGoAway(uint32_t aStatusCode) FlushOutputQueue(); } -// The Hello is comprised of 24 octets of magic, which are designed to -// flush out silent but broken intermediaries, followed by a settings -// frame which sets a small flow control window for pushes and a -// window update frame which creates a large session flow control window +// The Hello is comprised of +// 1] 24 octets of magic, which are designed to +// flush out silent but broken intermediaries +// 2] a settings frame which sets a small flow control window for pushes +// 3] a window update frame which creates a large session flow control window +// 4] 5 priority frames for streams which will never be opened with headers +// these streams (3, 5, 7, 9, b) build a dependency tree that all other +// streams will be direct leaves of. void Http2Session::SendHello() { MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread); LOG3(("Http2Session::SendHello %p\n", this)); - // sized for magic + 4 settings and a session window update to follow - // 24 magic, 33 for settings (9 header + 4 settings @6), 13 for window update + // sized for magic + 4 settings and a session window update and 5 priority frames + // 24 magic, 33 for settings (9 header + 4 settings @6), 13 for window update, + // 5 priority frames at 14 (9 + 5) each static const uint32_t maxSettings = 4; - static const uint32_t maxDataLen = 24 + kFrameHeaderBytes + maxSettings * 6 + 13; + static const uint32_t prioritySize = 5 * (kFrameHeaderBytes + 5); + static const uint32_t maxDataLen = 24 + kFrameHeaderBytes + maxSettings * 6 + 13 + prioritySize; char *packet = EnsureOutputBuffer(maxDataLen); memcpy(packet, kMagicHello, 24); mOutputQueueUsed += 24; @@ -855,25 +862,57 @@ Http2Session::SendHello() // now bump the local session window from 64KB uint32_t sessionWindowBump = ASpdySession::kInitialRwin - kDefaultRwin; - if (kDefaultRwin >= ASpdySession::kInitialRwin) - goto sendHello_complete; + if (kDefaultRwin < ASpdySession::kInitialRwin) { + // send a window update for the session (Stream 0) for something large + mLocalSessionWindow = ASpdySession::kInitialRwin; - // send a window update for the session (Stream 0) for something large - mLocalSessionWindow = ASpdySession::kInitialRwin; + packet = mOutputQueueBuffer.get() + mOutputQueueUsed; + CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0); + mOutputQueueUsed += kFrameHeaderBytes + 4; + CopyAsNetwork32(packet + kFrameHeaderBytes, sessionWindowBump); - packet = mOutputQueueBuffer.get() + mOutputQueueUsed; - CreateFrameHeader(packet, 4, FRAME_TYPE_WINDOW_UPDATE, 0, 0); - mOutputQueueUsed += kFrameHeaderBytes + 4; - CopyAsNetwork32(packet + kFrameHeaderBytes, sessionWindowBump); + LOG3(("Session Window increase at start of session %p %u\n", + this, sessionWindowBump)); + LogIO(this, nullptr, "Session Window Bump ", packet, kFrameHeaderBytes + 4); + } - LOG3(("Session Window increase at start of session %p %u\n", - this, sessionWindowBump)); - LogIO(this, nullptr, "Session Window Bump ", packet, kFrameHeaderBytes + 4); + if (gHttpHandler->UseH2Deps() && gHttpHandler->CriticalRequestPrioritization()) { + mUseH2Deps = true; + MOZ_ASSERT(mNextStreamID == kLeaderGroupID); + CreatePriorityNode(kLeaderGroupID, 0, 200, "leader"); + mNextStreamID += 2; + MOZ_ASSERT(mNextStreamID == kOtherGroupID); + CreatePriorityNode(kOtherGroupID, 0, 100, "other"); + mNextStreamID += 2; + MOZ_ASSERT(mNextStreamID == kBackgroundGroupID); + CreatePriorityNode(kBackgroundGroupID, 0, 0, "background"); + mNextStreamID += 2; + MOZ_ASSERT(mNextStreamID == kSpeculativeGroupID); + CreatePriorityNode(kSpeculativeGroupID, kBackgroundGroupID, 0, "speculative"); + mNextStreamID += 2; + MOZ_ASSERT(mNextStreamID == kFollowerGroupID); + CreatePriorityNode(kFollowerGroupID, kLeaderGroupID, 0, "follower"); + mNextStreamID += 2; + } -sendHello_complete: FlushOutputQueue(); } +void +Http2Session::CreatePriorityNode(uint32_t streamID, uint32_t dependsOn, uint8_t weight, + const char *label) +{ + char *packet = mOutputQueueBuffer.get() + mOutputQueueUsed; + CreateFrameHeader(packet, 5, FRAME_TYPE_PRIORITY, 0, streamID); + mOutputQueueUsed += kFrameHeaderBytes + 5; + CopyAsNetwork32(packet + kFrameHeaderBytes, dependsOn); // depends on + packet[kFrameHeaderBytes + 4] = weight; // weight + + LOG3(("Http2Session %p generate Priority Frame 0x%X depends on 0x%X " + "weight %d for %s class\n", this, streamID, dependsOn, weight, label)); + LogIO(this, nullptr, "Priority dep node", packet, kFrameHeaderBytes + 5); +} + // perform a bunch of integrity checks on the stream. // returns true if passed, false (plus LOG and ABORT) if failed. bool diff --git a/netwerk/protocol/http/Http2Session.h b/netwerk/protocol/http/Http2Session.h index 88c59bcf2ac5..b4a98799d45c 100644 --- a/netwerk/protocol/http/Http2Session.h +++ b/netwerk/protocol/http/Http2Session.h @@ -161,6 +161,14 @@ public: const static uint8_t kFrameHeaderBytes = kFrameLengthBytes + kFrameFlagBytes + kFrameTypeBytes + kFrameStreamIDBytes; + enum { + kLeaderGroupID = 0x3, + kOtherGroupID = 0x5, + kBackgroundGroupID = 0x7, + kSpeculativeGroupID = 0x9, + kFollowerGroupID = 0xB + }; + static nsresult RecvHeaders(Http2Session *); static nsresult RecvPriority(Http2Session *); static nsresult RecvRstStream(Http2Session *); @@ -218,6 +226,8 @@ public: void SendPing() MOZ_OVERRIDE; + bool UseH2Deps() { return mUseH2Deps; } + private: // These internal states do not correspond to the states of the HTTP/2 specification @@ -260,6 +270,7 @@ private: void ActivateStream(Http2Stream *); void ProcessPending(); nsresult SetInputFrameDataStream(uint32_t); + void CreatePriorityNode(uint32_t, uint32_t, uint8_t, const char *); bool VerifyStream(Http2Stream *, uint32_t); void SetNeedsCleanup(); @@ -469,6 +480,8 @@ private: // For caching whether we negotiated "h2" or "h2-" nsCString mNegotiatedToken; + bool mUseH2Deps; + private: /// connect tunnels void DispatchOnTunnel(nsAHttpTransaction *, nsIInterfaceRequestor *); diff --git a/netwerk/protocol/http/Http2Stream.cpp b/netwerk/protocol/http/Http2Stream.cpp index b21368fed8a7..334d86935b2e 100644 --- a/netwerk/protocol/http/Http2Stream.cpp +++ b/netwerk/protocol/http/Http2Stream.cpp @@ -26,6 +26,7 @@ #include "nsHttp.h" #include "nsHttpHandler.h" #include "nsHttpRequestHead.h" +#include "nsIClassOfService.h" #include "nsISocketTransport.h" #include "nsStandardURL.h" #include "prnetdb.h" @@ -504,8 +505,11 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf, mTxInlineFrameUsed, mTxInlineFrameSize); mTxInlineFrameUsed += messageSize; - LOG3(("%p Generating %d bytes of HEADERS for stream 0x%X with priority weight %u frames %u\n", - this, mTxInlineFrameUsed, mStreamID, mPriorityWeight, numFrames)); + UpdatePriorityDependency(); + LOG3(("Http2Stream %p Generating %d bytes of HEADERS for stream 0x%X with " + "priority weight %u dep 0x%X frames %u uri=%s\n", + this, mTxInlineFrameUsed, mStreamID, mPriorityWeight, + mPriorityDependency, numFrames, nsCString(head->RequestURI()).get())); uint32_t outputOffset = 0; uint32_t compressedDataOffset = 0; @@ -534,9 +538,7 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf, outputOffset += Http2Session::kFrameHeaderBytes; if (!idx) { - // Priority - Dependency is 0, weight is our gecko-calculated weight, - // non-exclusive dependency - memset(mTxInlineFrame.get() + outputOffset, 0, 4); + memcpy(mTxInlineFrame.get() + outputOffset, &mPriorityDependency, 4); memcpy(mTxInlineFrame.get() + outputOffset + 4, &mPriorityWeight, 1); outputOffset += 5; } @@ -1063,18 +1065,67 @@ Http2Stream::SetPriority(uint32_t newPriority) mPriority = static_cast(httpPriority); mPriorityWeight = (nsISupportsPriority::PRIORITY_LOWEST + 1) - (httpPriority - kNormalPriority); + + mPriorityDependency = 0; // maybe adjusted later } void Http2Stream::SetPriorityDependency(uint32_t newDependency, uint8_t newWeight, bool exclusive) { - // XXX - we ignore this for now... why is the server sending priority frames?! + // undefined what it means when the server sends a priority frame. ignore it. LOG3(("Http2Stream::SetPriorityDependency %p 0x%X received dependency=0x%X " "weight=%u exclusive=%d", this, mStreamID, newDependency, newWeight, exclusive)); } +void +Http2Stream::UpdatePriorityDependency() +{ + if (!mSession->UseH2Deps()) { + return; + } + + nsHttpTransaction *trans = mTransaction->QueryHttpTransaction(); + if (!trans) { + return; + } + + // we create 5 fake dependency streams per session, + // these streams are never opened with HEADERS. our first opened stream is 0xd + // 3 depends 0, weight 200, leader class (kLeaderGroupID) + // 5 depends 0, weight 100, other (kOtherGroupID) + // 7 depends 0, weight 0, background (kBackgroundGroupID) + // 9 depends 7, weight 0, speculative (kSpeculativeGroupID) + // b depends 3, weight 0, follower class (kFollowerGroupID) + // + // streams for leaders (html, js, css) depend on 3 + // streams for folowers (images) depend on b + // default streams (xhr, async js) depend on 5 + // explicit bg streams (beacon, etc..) depend on 7 + // spculative bg streams depend on 9 + + uint32_t classFlags = trans->ClassOfService(); + + if (classFlags & nsIClassOfService::Leader) { + mPriorityDependency = Http2Session::kLeaderGroupID; + } else if (classFlags & nsIClassOfService::Follower) { + mPriorityDependency = Http2Session::kFollowerGroupID; + } else if (classFlags & nsIClassOfService::Speculative) { + mPriorityDependency = Http2Session::kSpeculativeGroupID; + } else if (classFlags & nsIClassOfService::Background) { + mPriorityDependency = Http2Session::kBackgroundGroupID; + } else if (classFlags & nsIClassOfService::Unblocked) { + mPriorityDependency = Http2Session::kOtherGroupID; + } else { + mPriorityDependency = Http2Session::kFollowerGroupID; // unmarked followers + } + + LOG3(("Http2Stream::UpdatePriorityDependency %p " + "classFlags %X depends on stream 0x%X\n", + this, classFlags, mPriorityDependency)); +} + void Http2Stream::SetRecvdFin(bool aStatus) { diff --git a/netwerk/protocol/http/Http2Stream.h b/netwerk/protocol/http/Http2Stream.h index 18734d63a210..b4d6487d06ce 100644 --- a/netwerk/protocol/http/Http2Stream.h +++ b/netwerk/protocol/http/Http2Stream.h @@ -126,6 +126,7 @@ public: uint32_t Priority() { return mPriority; } void SetPriority(uint32_t); void SetPriorityDependency(uint32_t, uint8_t, bool); + void UpdatePriorityDependency(); // A pull stream has an implicit sink, a pushed stream has a sink // once it is matched to a pull stream. @@ -264,8 +265,9 @@ private: // close by setting this to the max value. int64_t mRequestBodyLenRemaining; - uint32_t mPriority; - uint8_t mPriorityWeight; + uint32_t mPriority; // geckoish weight + uint8_t mPriorityWeight; // h2 weight + uint8_t mPriorityDependency; // h2 stream id 3 - 0xb // mClientReceiveWindow, mServerReceiveWindow, and mLocalUnacked are for flow control. // *window are signed because the race conditions in asynchronous SETTINGS diff --git a/netwerk/protocol/http/HttpBaseChannel.cpp b/netwerk/protocol/http/HttpBaseChannel.cpp index e4006ab79c7c..d4af0d3e35c6 100644 --- a/netwerk/protocol/http/HttpBaseChannel.cpp +++ b/netwerk/protocol/http/HttpBaseChannel.cpp @@ -47,6 +47,7 @@ HttpBaseChannel::HttpBaseChannel() , mStatus(NS_OK) , mLoadFlags(LOAD_NORMAL) , mCaps(0) + , mClassOfService(0) , mPriority(PRIORITY_NORMAL) , mRedirectionLimit(gHttpHandler->RedirectionLimit()) , mApplyConversion(true) @@ -66,8 +67,6 @@ HttpBaseChannel::HttpBaseChannel() , mTracingEnabled(true) , mTimingEnabled(false) , mAllowSpdy(true) - , mLoadAsBlocking(false) - , mLoadUnblocked(false) , mResponseTimeoutEnabled(true) , mAllRedirectsSameOrigin(true) , mAllRedirectsPassTimingAllowCheck(true) @@ -1713,36 +1712,6 @@ HttpBaseChannel::SetAllowSpdy(bool aAllowSpdy) return NS_OK; } -NS_IMETHODIMP -HttpBaseChannel::GetLoadAsBlocking(bool *aLoadAsBlocking) -{ - NS_ENSURE_ARG_POINTER(aLoadAsBlocking); - *aLoadAsBlocking = mLoadAsBlocking; - return NS_OK; -} - -NS_IMETHODIMP -HttpBaseChannel::SetLoadAsBlocking(bool aLoadAsBlocking) -{ - mLoadAsBlocking = aLoadAsBlocking; - return NS_OK; -} - -NS_IMETHODIMP -HttpBaseChannel::GetLoadUnblocked(bool *aLoadUnblocked) -{ - NS_ENSURE_ARG_POINTER(aLoadUnblocked); - *aLoadUnblocked = mLoadUnblocked; - return NS_OK; -} - -NS_IMETHODIMP -HttpBaseChannel::SetLoadUnblocked(bool aLoadUnblocked) -{ - mLoadUnblocked = aLoadUnblocked; - return NS_OK; -} - NS_IMETHODIMP HttpBaseChannel::GetApiRedirectToURI(nsIURI ** aResult) { diff --git a/netwerk/protocol/http/HttpBaseChannel.h b/netwerk/protocol/http/HttpBaseChannel.h index c9f6b6e6eed6..eb25cb4847b7 100644 --- a/netwerk/protocol/http/HttpBaseChannel.h +++ b/netwerk/protocol/http/HttpBaseChannel.h @@ -28,6 +28,7 @@ #include "nsIEffectiveTLDService.h" #include "nsIStringEnumerator.h" #include "nsISupportsPriority.h" +#include "nsIClassOfService.h" #include "nsIApplicationCache.h" #include "nsIResumableChannel.h" #include "nsITraceableChannel.h" @@ -65,6 +66,7 @@ class HttpBaseChannel : public nsHashPropertyBag , public nsIUploadChannel , public nsIUploadChannel2 , public nsISupportsPriority + , public nsIClassOfService , public nsIResumableChannel , public nsITraceableChannel , public PrivateBrowsingChannel @@ -176,10 +178,6 @@ public: NS_IMETHOD GetRemotePort(int32_t* port); NS_IMETHOD GetAllowSpdy(bool *aAllowSpdy); NS_IMETHOD SetAllowSpdy(bool aAllowSpdy); - NS_IMETHOD GetLoadAsBlocking(bool *aLoadAsBlocking); - NS_IMETHOD SetLoadAsBlocking(bool aLoadAsBlocking); - NS_IMETHOD GetLoadUnblocked(bool *aLoadUnblocked); - NS_IMETHOD SetLoadUnblocked(bool aLoadUnblocked); NS_IMETHOD GetApiRedirectToURI(nsIURI * *aApiRedirectToURI); NS_IMETHOD AddSecurityMessage(const nsAString &aMessageTag, const nsAString &aMessageCategory); NS_IMETHOD TakeAllSecurityMessages(nsCOMArray &aMessages); @@ -202,6 +200,9 @@ public: NS_IMETHOD GetPriority(int32_t *value); NS_IMETHOD AdjustPriority(int32_t delta); + // nsIClassOfService + NS_IMETHOD GetClassFlags(uint32_t *outFlags) { *outFlags = mClassOfService; return NS_OK; } + // nsIResumableChannel NS_IMETHOD GetEntityID(nsACString& aEntityID); @@ -334,6 +335,7 @@ protected: nsresult mStatus; uint32_t mLoadFlags; uint32_t mCaps; + uint32_t mClassOfService; int16_t mPriority; uint8_t mRedirectionLimit; @@ -356,8 +358,6 @@ protected: // True if timing collection is enabled uint32_t mTimingEnabled : 1; uint32_t mAllowSpdy : 1; - uint32_t mLoadAsBlocking : 1; - uint32_t mLoadUnblocked : 1; uint32_t mResponseTimeoutEnabled : 1; // A flag that should be false only if a cross-domain redirect occurred uint32_t mAllRedirectsSameOrigin : 1; diff --git a/netwerk/protocol/http/HttpChannelChild.cpp b/netwerk/protocol/http/HttpChannelChild.cpp index b85f8cb6d0da..a1828b4f59db 100644 --- a/netwerk/protocol/http/HttpChannelChild.cpp +++ b/netwerk/protocol/http/HttpChannelChild.cpp @@ -127,6 +127,7 @@ NS_INTERFACE_MAP_BEGIN(HttpChannelChild) NS_INTERFACE_MAP_ENTRY(nsICacheInfoChannel) NS_INTERFACE_MAP_ENTRY(nsIResumableChannel) NS_INTERFACE_MAP_ENTRY(nsISupportsPriority) + NS_INTERFACE_MAP_ENTRY(nsIClassOfService) NS_INTERFACE_MAP_ENTRY(nsIProxiedChannel) NS_INTERFACE_MAP_ENTRY(nsITraceableChannel) NS_INTERFACE_MAP_ENTRY(nsIApplicationCacheContainer) @@ -1541,6 +1542,7 @@ HttpChannelChild::ContinueAsyncOpen() openArgs.uploadStreamHasHeaders() = mUploadStreamHasHeaders; openArgs.priority() = mPriority; + openArgs.classOfService() = mClassOfService; openArgs.redirectionLimit() = mRedirectionLimit; openArgs.allowPipelining() = mAllowPipelining; openArgs.allowSTS() = mAllowSTS; @@ -1725,6 +1727,43 @@ HttpChannelChild::SetPriority(int32_t aPriority) return NS_OK; } +//----------------------------------------------------------------------------- +// HttpChannelChild::nsIClassOfService +//----------------------------------------------------------------------------- +NS_IMETHODIMP +HttpChannelChild::SetClassFlags(uint32_t inFlags) +{ + if (mClassOfService == inFlags) { + return NS_OK; + } + + mClassOfService = inFlags; + if (RemoteChannelExists()) { + SendSetClassOfService(mClassOfService); + } + return NS_OK; +} + +NS_IMETHODIMP +HttpChannelChild::AddClassFlags(uint32_t inFlags) +{ + mClassOfService |= inFlags; + if (RemoteChannelExists()) { + SendSetClassOfService(mClassOfService); + } + return NS_OK; +} + +NS_IMETHODIMP +HttpChannelChild::ClearClassFlags(uint32_t inFlags) +{ + mClassOfService &= ~inFlags; + if (RemoteChannelExists()) { + SendSetClassOfService(mClassOfService); + } + return NS_OK; +} + //----------------------------------------------------------------------------- // HttpChannelChild::nsIProxiedChannel //----------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/HttpChannelChild.h b/netwerk/protocol/http/HttpChannelChild.h index 7c062940d8b0..06c0eb958ae4 100644 --- a/netwerk/protocol/http/HttpChannelChild.h +++ b/netwerk/protocol/http/HttpChannelChild.h @@ -87,6 +87,10 @@ public: NS_IMETHOD GetRemotePort(int32_t* port); // nsISupportsPriority NS_IMETHOD SetPriority(int32_t value); + // nsIClassOfService + NS_IMETHOD SetClassFlags(uint32_t inFlags); + NS_IMETHOD AddClassFlags(uint32_t inFlags); + NS_IMETHOD ClearClassFlags(uint32_t inFlags); // nsIResumableChannel NS_IMETHOD ResumeAt(uint64_t startPos, const nsACString& entityID); diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp index 19f9b13438b0..352cec741f48 100644 --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -100,7 +100,7 @@ HttpChannelParent::Init(const HttpChannelCreationArgs& aArgs) a.referrerPolicy(), a.apiRedirectTo(), a.topWindowURI(), a.loadFlags(), a.requestHeaders(), a.requestMethod(), a.uploadStream(), - a.uploadStreamHasHeaders(), a.priority(), + a.uploadStreamHasHeaders(), a.priority(), a.classOfService(), a.redirectionLimit(), a.allowPipelining(), a.allowSTS(), a.thirdPartyFlags(), a.resumeAt(), a.startPos(), a.entityID(), a.chooseApplicationCache(), @@ -181,6 +181,7 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI, const OptionalInputStreamParams& uploadStream, const bool& uploadStreamHasHeaders, const uint16_t& priority, + const uint32_t& classOfService, const uint8_t& redirectionLimit, const bool& allowPipelining, const bool& allowSTS, @@ -315,8 +316,12 @@ HttpChannelParent::DoAsyncOpen( const URIParams& aURI, mChannel->SetUploadStreamHasHeaders(uploadStreamHasHeaders); } - if (priority != nsISupportsPriority::PRIORITY_NORMAL) + if (priority != nsISupportsPriority::PRIORITY_NORMAL) { mChannel->SetPriority(priority); + } + if (classOfService) { + mChannel->SetClassFlags(classOfService); + } mChannel->SetRedirectionLimit(redirectionLimit); mChannel->SetAllowPipelining(allowPipelining); mChannel->SetAllowSTS(allowSTS); @@ -426,6 +431,15 @@ HttpChannelParent::RecvSetPriority(const uint16_t& priority) return true; } +bool +HttpChannelParent::RecvSetClassOfService(const uint32_t& cos) +{ + if (mChannel) { + mChannel->SetClassFlags(cos); + } + return true; +} + bool HttpChannelParent::RecvSuspend() { diff --git a/netwerk/protocol/http/HttpChannelParent.h b/netwerk/protocol/http/HttpChannelParent.h index 737d576e70a2..27e974a1849b 100644 --- a/netwerk/protocol/http/HttpChannelParent.h +++ b/netwerk/protocol/http/HttpChannelParent.h @@ -99,6 +99,7 @@ protected: const OptionalInputStreamParams& uploadStream, const bool& uploadStreamHasHeaders, const uint16_t& priority, + const uint32_t& classOfService, const uint8_t& redirectionLimit, const bool& allowPipelining, const bool& allowSTS, @@ -116,6 +117,7 @@ protected: const uint32_t& aContentPolicyType); virtual bool RecvSetPriority(const uint16_t& priority) MOZ_OVERRIDE; + virtual bool RecvSetClassOfService(const uint32_t& cos) MOZ_OVERRIDE; virtual bool RecvSetCacheTokenCachedCharset(const nsCString& charset) MOZ_OVERRIDE; virtual bool RecvSuspend() MOZ_OVERRIDE; virtual bool RecvResume() MOZ_OVERRIDE; diff --git a/netwerk/protocol/http/PHttpChannel.ipdl b/netwerk/protocol/http/PHttpChannel.ipdl index d8ce81f76b30..7f2c6e5eb5c8 100644 --- a/netwerk/protocol/http/PHttpChannel.ipdl +++ b/netwerk/protocol/http/PHttpChannel.ipdl @@ -33,6 +33,7 @@ parent: // see PNecko.ipdl SetPriority(uint16_t priority); + SetClassOfService(uint32_t cos); SetCacheTokenCachedCharset(nsCString charset); diff --git a/netwerk/protocol/http/nsHttpChannel.cpp b/netwerk/protocol/http/nsHttpChannel.cpp index f9b42ea6f8f2..0506edc8d896 100644 --- a/netwerk/protocol/http/nsHttpChannel.cpp +++ b/netwerk/protocol/http/nsHttpChannel.cpp @@ -43,6 +43,7 @@ #include "nsISSLSocketControl.h" #include "sslt.h" #include "nsContentUtils.h" +#include "nsIClassOfService.h" #include "nsIPermissionManager.h" #include "nsIPrincipal.h" #include "nsIScriptSecurityManager.h" @@ -835,6 +836,7 @@ nsHttpChannel::SetupTransaction() return rv; } + mTransaction->SetClassOfService(mClassOfService); SetupTransactionLoadGroupInfo(); rv = nsInputStreamPump::Create(getter_AddRefs(mTransactionPump), @@ -2784,10 +2786,8 @@ nsHttpChannel::OpenCacheEntry(bool isHttps) } NS_ENSURE_SUCCESS(rv, rv); - // Don't consider mLoadUnblocked here, since it's not indication of a demand - // to load prioritly. It's mostly used to load XHR requests, but those should - // not be considered as influencing the page load performance. - if (mLoadAsBlocking || (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI)) + if ((mClassOfService & nsIClassOfService::Leader) || + (mLoadFlags & LOAD_INITIAL_DOCUMENT_URI)) cacheEntryOpenFlags |= nsICacheStorage::OPEN_PRIORITY; // Only for backward compatibility with the old cache back end. @@ -4594,6 +4594,7 @@ NS_INTERFACE_MAP_BEGIN(nsHttpChannel) NS_INTERFACE_MAP_ENTRY(nsIHttpChannel) NS_INTERFACE_MAP_ENTRY(nsICacheInfoChannel) NS_INTERFACE_MAP_ENTRY(nsICachingChannel) + NS_INTERFACE_MAP_ENTRY(nsIClassOfService) NS_INTERFACE_MAP_ENTRY(nsIUploadChannel) NS_INTERFACE_MAP_ENTRY(nsIUploadChannel2) NS_INTERFACE_MAP_ENTRY(nsICacheEntryOpenCallback) @@ -4912,10 +4913,12 @@ nsHttpChannel::BeginConnect() mCaps &= ~(NS_HTTP_ALLOW_KEEPALIVE | NS_HTTP_ALLOW_PIPELINING); if (gHttpHandler->CriticalRequestPrioritization()) { - if (mLoadAsBlocking) + if (mClassOfService & nsIClassOfService::Leader) { mCaps |= NS_HTTP_LOAD_AS_BLOCKING; - if (mLoadUnblocked) + } + if (mClassOfService & nsIClassOfService::Unblocked) { mCaps |= NS_HTTP_LOAD_UNBLOCKED; + } } // Force-Reload should reset the persistent connection pool for this host @@ -4983,6 +4986,30 @@ nsHttpChannel::SetPriority(int32_t value) return NS_OK; } +//----------------------------------------------------------------------------- +// HttpChannel::nsIClassOfService +//----------------------------------------------------------------------------- +NS_IMETHODIMP +nsHttpChannel::SetClassFlags(uint32_t inFlags) +{ + mClassOfService = inFlags; + return NS_OK; +} + +NS_IMETHODIMP +nsHttpChannel::AddClassFlags(uint32_t inFlags) +{ + mClassOfService |= inFlags; + return NS_OK; +} + +NS_IMETHODIMP +nsHttpChannel::ClearClassFlags(uint32_t inFlags) +{ + mClassOfService &= ~inFlags; + return NS_OK; +} + //----------------------------------------------------------------------------- // nsHttpChannel::nsIProtocolProxyCallback //----------------------------------------------------------------------------- diff --git a/netwerk/protocol/http/nsHttpChannel.h b/netwerk/protocol/http/nsHttpChannel.h index 4c79e89c01e6..ca785877b2e7 100644 --- a/netwerk/protocol/http/nsHttpChannel.h +++ b/netwerk/protocol/http/nsHttpChannel.h @@ -121,6 +121,11 @@ public: NS_IMETHOD SetupFallbackChannel(const char *aFallbackKey); // nsISupportsPriority NS_IMETHOD SetPriority(int32_t value); + // nsIClassOfService + NS_IMETHOD SetClassFlags(uint32_t inFlags); + NS_IMETHOD AddClassFlags(uint32_t inFlags); + NS_IMETHOD ClearClassFlags(uint32_t inFlags); + // nsIResumableChannel NS_IMETHOD ResumeAt(uint64_t startPos, const nsACString& entityID); diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp index 6f3b2ce02996..7a46a22448ef 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp @@ -1753,8 +1753,7 @@ nsHttpConnectionMgr::TryDispatchTransaction(nsConnectionEntry *ent, } } } - } - else { + } else { // Mark the transaction and its load group as blocking right now to prevent // other transactions from being reordered in the queue due to slow syns. trans->DispatchedAsBlocking(); diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index b71e1680c453..9719cd66c42b 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -182,6 +182,7 @@ nsHttpHandler::nsHttpHandler() , mSpdyV31(true) , mHttp2DraftEnabled(true) , mHttp2Enabled(true) + , mUseH2Deps(true) , mEnforceHttp2TlsProfile(true) , mCoalesceSpdy(true) , mSpdyPersistentSettings(false) @@ -1194,6 +1195,12 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref) mHttp2Enabled = cVar; } + if (PREF_CHANGED(HTTP_PREF("spdy.enabled.deps"))) { + rv = prefs->GetBoolPref(HTTP_PREF("spdy.enabled.deps"), &cVar); + if (NS_SUCCEEDED(rv)) + mUseH2Deps = cVar; + } + if (PREF_CHANGED(HTTP_PREF("spdy.enforce-tls-profile"))) { rv = prefs->GetBoolPref(HTTP_PREF("spdy.enforce-tls-profile"), &cVar); if (NS_SUCCEEDED(rv)) diff --git a/netwerk/protocol/http/nsHttpHandler.h b/netwerk/protocol/http/nsHttpHandler.h index 6ce31939c5a5..1414fd163df5 100644 --- a/netwerk/protocol/http/nsHttpHandler.h +++ b/netwerk/protocol/http/nsHttpHandler.h @@ -113,6 +113,7 @@ public: uint32_t ConnectTimeout() { return mConnectTimeout; } uint32_t ParallelSpeculativeConnectLimit() { return mParallelSpeculativeConnectLimit; } bool CriticalRequestPrioritization() { return mCriticalRequestPrioritization; } + bool UseH2Deps() { return mUseH2Deps; } uint32_t MaxConnectionsPerOrigin() { return mMaxPersistentConnectionsPerServer; } bool UseRequestTokenBucket() { return mRequestTokenBucketEnabled; } @@ -470,6 +471,7 @@ private: uint32_t mSpdyV31 : 1; uint32_t mHttp2DraftEnabled : 1; uint32_t mHttp2Enabled : 1; + uint32_t mUseH2Deps : 1; uint32_t mEnforceHttp2TlsProfile : 1; uint32_t mCoalesceSpdy : 1; uint32_t mSpdyPersistentSettings : 1; diff --git a/netwerk/protocol/http/nsHttpTransaction.cpp b/netwerk/protocol/http/nsHttpTransaction.cpp index b93ea80bac6f..44568554e334 100644 --- a/netwerk/protocol/http/nsHttpTransaction.cpp +++ b/netwerk/protocol/http/nsHttpTransaction.cpp @@ -136,6 +136,7 @@ nsHttpTransaction::nsHttpTransaction() , mCountRecv(0) , mCountSent(0) , mAppId(NECKO_NO_APP_ID) + , mClassOfService(0) { LOG(("Creating nsHttpTransaction @%p\n", this)); gHttpHandler->GetMaxPipelineObjectSize(&mMaxPipelineObjectSize); @@ -1749,7 +1750,7 @@ nsHttpTransaction::CancelPipeline(uint32_t reason) } // Called when the transaction marked for blocking is associated with a connection -// (i.e. added to a spdy session, an idle http connection, or placed into +// (i.e. added to a new h1 conn, an idle http connection, or placed into // a http pipeline). It is safe to call this multiple times with it only // having an effect once. void diff --git a/netwerk/protocol/http/nsHttpTransaction.h b/netwerk/protocol/http/nsHttpTransaction.h index 122bdd6a5f54..4fa73fe695bb 100644 --- a/netwerk/protocol/http/nsHttpTransaction.h +++ b/netwerk/protocol/http/nsHttpTransaction.h @@ -405,6 +405,11 @@ private: mCountSent += sentBytes; SaveNetworkStats(false); } +public: + void SetClassOfService(uint32_t cos) { mClassOfService = cos; } + uint32_t ClassOfService() { return mClassOfService; } +private: + uint32_t mClassOfService; }; }} // namespace mozilla::net diff --git a/netwerk/protocol/http/nsIHttpChannelInternal.idl b/netwerk/protocol/http/nsIHttpChannelInternal.idl index 6f850d211800..f7df197d53cb 100644 --- a/netwerk/protocol/http/nsIHttpChannelInternal.idl +++ b/netwerk/protocol/http/nsIHttpChannelInternal.idl @@ -38,7 +38,7 @@ interface nsIHttpUpgradeListener : nsISupports * using any feature exposed by this interface, be aware that this interface * will change and you will be broken. You have been warned. */ -[scriptable, uuid(62a8d6e2-3418-4c6f-9d90-88573838f6dd)] +[scriptable, uuid(bbf9d5bb-8daf-4909-88bc-f3b2f6a886d0)] interface nsIHttpChannelInternal : nsISupports { /** @@ -194,22 +194,6 @@ interface nsIHttpChannelInternal : nsISupports */ attribute boolean allowSpdy; - /** - * Set (e.g., by the docshell) to indicate whether or not the channel - * corresponds to content that should be given a degree of network exclusivity - * with respect to other members of its load group. - * Examples are js from the HTML head and css which are latency - * sensitive and should not compete with images for bandwidth. Default false. - */ - attribute boolean loadAsBlocking; - - /** - * If set, this channel will load in parallel with the rest of the load - * group even if a blocking subset of the group would normally be given - * exclusivity. Default false. - */ - attribute boolean loadUnblocked; - /** * This attribute en/disables the timeout for the first byte of an HTTP * response. Enabled by default. diff --git a/netwerk/protocol/websocket/WebSocketChannel.cpp b/netwerk/protocol/websocket/WebSocketChannel.cpp index 48432d6b4113..632703567f16 100644 --- a/netwerk/protocol/websocket/WebSocketChannel.cpp +++ b/netwerk/protocol/websocket/WebSocketChannel.cpp @@ -19,6 +19,7 @@ #include "nsIPrefBranch.h" #include "nsIPrefService.h" #include "nsICancelable.h" +#include "nsIClassOfService.h" #include "nsIDNSRecord.h" #include "nsIDNSService.h" #include "nsIStreamConverterService.h" @@ -2293,8 +2294,10 @@ WebSocketChannel::SetupRequest() // we never let websockets be blocked by head CSS/JS loads to avoid // potential deadlock where server generation of CSS/JS requires // an XHR signal. - rv = mChannel->SetLoadUnblocked(true); - NS_ENSURE_SUCCESS(rv, rv); + nsCOMPtr cos(do_QueryInterface(mChannel)); + if (cos) { + cos->AddClassFlags(nsIClassOfService::Unblocked); + } // draft-ietf-hybi-thewebsocketprotocol-07 illustrates Upgrade: websocket // in lower case, so go with that. It is technically case insensitive. diff --git a/netwerk/test/unit/test_http2.js b/netwerk/test/unit/test_http2.js index 155c60e75add..b700a77350ac 100644 --- a/netwerk/test/unit/test_http2.js +++ b/netwerk/test/unit/test_http2.js @@ -203,6 +203,14 @@ function test_http2_basic() { chan.asyncOpen(listener, null); } +function test_http2_basic_unblocked_dep() { + var chan = makeChan("https://localhost:6944/basic_unblocked_dep"); + var cos = chan.QueryInterface(Ci.nsIClassOfService); + cos.addClassFlags(Ci.nsIClassOfService.Unblocked); + var listener = new Http2CheckListener(); + chan.asyncOpen(listener, null); +} + // make sure we don't use h2 when disallowed function test_http2_nospdy() { var chan = makeChan("https://localhost:6944/"); @@ -521,6 +529,7 @@ function test_complete() { // a stalled stream when a SETTINGS frame arrives var tests = [ test_http2_post_big , test_http2_basic + , test_http2_basic_unblocked_dep , test_http2_nospdy , test_http2_push1 , test_http2_push2 From bbf86bc8fcd615d1430b923c4f0650b6935556fe Mon Sep 17 00:00:00 2001 From: Patrick McManus Date: Thu, 11 Dec 2014 17:00:19 -0500 Subject: [PATCH 28/64] bug 1003450 - [3/3] Group Dependency Nodes require >= h2-16 r=hurley --- netwerk/base/src/Dashboard.cpp | 7 ++++--- netwerk/protocol/http/ASpdySession.cpp | 16 +++++++++------- netwerk/protocol/http/Http2Session.cpp | 13 +++++++++---- netwerk/protocol/http/Http2Session.h | 3 ++- netwerk/protocol/http/nsHttp.h | 9 +++++---- 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/netwerk/base/src/Dashboard.cpp b/netwerk/base/src/Dashboard.cpp index 2f9dd020a149..8348ef3b8fff 100644 --- a/netwerk/base/src/Dashboard.cpp +++ b/netwerk/base/src/Dashboard.cpp @@ -780,9 +780,10 @@ HttpConnInfo::SetHTTP2ProtocolVersion(uint8_t pv) { if (pv == SPDY_VERSION_31) { protocolVersion.AssignLiteral(MOZ_UTF16("spdy/3.1")); - } else if (pv == NS_HTTP2_DRAFT_VERSION) { - MOZ_ASSERT (pv == NS_HTTP2_DRAFT_VERSION); - protocolVersion.Assign(NS_LITERAL_STRING(NS_HTTP2_DRAFT_TOKEN)); + } else if (pv == HTTP_VERSION_2_DRAFT_15) { + protocolVersion.AssignLiteral(MOZ_UTF16("h2-14/15")); + } else if (pv == HTTP_VERSION_2_DRAFT_LATEST) { + protocolVersion.Assign(NS_LITERAL_STRING(HTTP2_DRAFT_LATEST_TOKEN)); } else { MOZ_ASSERT (pv == HTTP_VERSION_2); protocolVersion.Assign(MOZ_UTF16("h2")); diff --git a/netwerk/protocol/http/ASpdySession.cpp b/netwerk/protocol/http/ASpdySession.cpp index 6371faf771ba..aed5d5478e98 100644 --- a/netwerk/protocol/http/ASpdySession.cpp +++ b/netwerk/protocol/http/ASpdySession.cpp @@ -42,7 +42,8 @@ ASpdySession::NewSpdySession(uint32_t version, // requests as a precondition MOZ_ASSERT(version == SPDY_VERSION_31 || version == HTTP_VERSION_2 || - version == NS_HTTP2_DRAFT_VERSION, + version == HTTP_VERSION_2_DRAFT_LATEST || + version == HTTP_VERSION_2_DRAFT_15, "Unsupported spdy version"); // Don't do a runtime check of IsSpdyV?Enabled() here because pref value @@ -54,8 +55,9 @@ ASpdySession::NewSpdySession(uint32_t version, if (version == SPDY_VERSION_31) { return new SpdySession31(aTransport); - } else if (version == NS_HTTP2_DRAFT_VERSION || version == HTTP_VERSION_2) { - return new Http2Session(aTransport); + } else if (version == HTTP_VERSION_2_DRAFT_LATEST || version == HTTP_VERSION_2 || + version == HTTP_VERSION_2_DRAFT_15) { + return new Http2Session(aTransport, version); } return nullptr; @@ -77,16 +79,16 @@ SpdyInformation::SpdyInformation() VersionString[1] = NS_LITERAL_CSTRING("h2"); ALPNCallbacks[1] = Http2Session::ALPNCallback; - Version[2] = NS_HTTP2_DRAFT_VERSION; + Version[2] = HTTP_VERSION_2_DRAFT_15; // 14 and 15 are aliased VersionString[2] = NS_LITERAL_CSTRING("h2-14"); ALPNCallbacks[2] = Http2Session::ALPNCallback; - Version[3] = NS_HTTP2_DRAFT_VERSION; + Version[3] = HTTP_VERSION_2_DRAFT_15; // 14 and 15 are aliased VersionString[3] = NS_LITERAL_CSTRING("h2-15"); ALPNCallbacks[3] = Http2Session::ALPNCallback; - Version[4] = NS_HTTP2_DRAFT_VERSION; - VersionString[4] = NS_LITERAL_CSTRING(NS_HTTP2_DRAFT_TOKEN); + Version[4] = HTTP_VERSION_2_DRAFT_LATEST; + VersionString[4] = NS_LITERAL_CSTRING(HTTP2_DRAFT_LATEST_TOKEN); ALPNCallbacks[4] = Http2Session::ALPNCallback; } diff --git a/netwerk/protocol/http/Http2Session.cpp b/netwerk/protocol/http/Http2Session.cpp index 9d0c480bf65b..ac5332cbf9ba 100644 --- a/netwerk/protocol/http/Http2Session.cpp +++ b/netwerk/protocol/http/Http2Session.cpp @@ -66,7 +66,7 @@ do { \ return NS_ERROR_ILLEGAL_VALUE; \ } while (0) -Http2Session::Http2Session(nsISocketTransport *aSocketTransport) +Http2Session::Http2Session(nsISocketTransport *aSocketTransport, uint32_t version) : mSocketTransport(aSocketTransport) , mSegmentReader(nullptr) , mSegmentWriter(nullptr) @@ -104,6 +104,7 @@ Http2Session::Http2Session(nsISocketTransport *aSocketTransport) , mWaitingForSettingsAck(false) , mGoAwayOnPush(false) , mUseH2Deps(false) + , mVersion(version) { MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread); @@ -126,7 +127,7 @@ Http2Session::Http2Session(nsISocketTransport *aSocketTransport) mPingThreshold = gHttpHandler->SpdyPingThreshold(); - mNegotiatedToken.AssignLiteral(NS_HTTP2_DRAFT_TOKEN); + mNegotiatedToken.AssignLiteral(HTTP2_DRAFT_LATEST_TOKEN); } // Copy the 32 bit number into the destination, using network byte order @@ -876,7 +877,11 @@ Http2Session::SendHello() LogIO(this, nullptr, "Session Window Bump ", packet, kFrameHeaderBytes + 4); } - if (gHttpHandler->UseH2Deps() && gHttpHandler->CriticalRequestPrioritization()) { + // draft-14 and draft-15 are the only versions we support that do not + // allow our priority scheme. Blacklist them here - they are aliased + // as draft-15 + if ((mVersion != HTTP_VERSION_2_DRAFT_15) && + gHttpHandler->UseH2Deps() && gHttpHandler->CriticalRequestPrioritization()) { mUseH2Deps = true; MOZ_ASSERT(mNextStreamID == kLeaderGroupID); CreatePriorityNode(kLeaderGroupID, 0, 200, "leader"); @@ -3361,7 +3366,7 @@ Http2Session::ConfirmTLSProfile() // Fallback to showing the draft version, just in case LOG3(("Http2Session::ConfirmTLSProfile %p could not get negotiated token. " "Falling back to draft token.", this)); - mNegotiatedToken.AssignLiteral(NS_HTTP2_DRAFT_TOKEN); + mNegotiatedToken.AssignLiteral(HTTP2_DRAFT_LATEST_TOKEN); } mTLSProfileConfirmed = true; diff --git a/netwerk/protocol/http/Http2Session.h b/netwerk/protocol/http/Http2Session.h index b4a98799d45c..4726b732896d 100644 --- a/netwerk/protocol/http/Http2Session.h +++ b/netwerk/protocol/http/Http2Session.h @@ -41,7 +41,7 @@ public: NS_DECL_NSAHTTPSEGMENTREADER NS_DECL_NSAHTTPSEGMENTWRITER - explicit Http2Session(nsISocketTransport *); + Http2Session(nsISocketTransport *, uint32_t version); bool AddStream(nsAHttpTransaction *, int32_t, bool, nsIInterfaceRequestor *); @@ -481,6 +481,7 @@ private: nsCString mNegotiatedToken; bool mUseH2Deps; + uint32_t mVersion; // HTTP2_VERSION_ from nsHttp.h remove when draft support removed private: /// connect tunnels diff --git a/netwerk/protocol/http/nsHttp.h b/netwerk/protocol/http/nsHttp.h index 67104755ad3c..0a14e4931a26 100644 --- a/netwerk/protocol/http/nsHttp.h +++ b/netwerk/protocol/http/nsHttp.h @@ -39,15 +39,16 @@ namespace net { // 27 was http/2-draft09, h2-10, and h2-11 // 28 was http/2-draft12 // 29 was http/2-draft13 - // 30 was also h2-14 and -15. They're effectively the same, -15 added an + // 30 was also h2-14. They're effectively the same, -15 added an // error code. So, we advertise all, but our "default position" is -16. - HTTP2_VERSION_DRAFT16 = 30 + HTTP_VERSION_2_DRAFT_15 = 30, + HTTP_VERSION_2_DRAFT_16 = 31 }; typedef uint8_t nsHttpVersion; -#define NS_HTTP2_DRAFT_VERSION HTTP2_VERSION_DRAFT16 -#define NS_HTTP2_DRAFT_TOKEN "h2-16" +#define HTTP_VERSION_2_DRAFT_LATEST HTTP_VERSION_2_DRAFT_16 +#define HTTP2_DRAFT_LATEST_TOKEN "h2-16" //----------------------------------------------------------------------------- // http connection capabilities From 9f54572427050ae19cdb9c81a123c6538e0001f5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 01:42:19 -0800 Subject: [PATCH 29/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/5942decc9c2d Author: Florin Strugariu Desc: Merge pull request #26873 from viorelaioia/bug_1113047 Bug 1113047 - Update test name in manifest.ini file of dialer ======== https://hg.mozilla.org/integration/gaia-central/rev/4ea98a47ba12 Author: Viorela Ioia Desc: Bug 1113047 - Update test name in manifest.ini file of dialer --- 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 5af8e2676039..8cb71b5a5566 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "d937413f736efd995436c211649f930191429b66", + "revision": "5942decc9c2d27169eb08723be482ee43f122864", "repo_path": "integration/gaia-central" } From f0e50888f2c4617bf2631294b76f34f9ca4ef5e9 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 01:51:59 -0800 Subject: [PATCH 30/64] 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 6cd659195bbe..e80e1bec3b6b 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 6da5394b5bc9..b86f31d83c85 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 45d2a89e0d71..206fa8faddcb 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 3a5e9ec6c16f..7f057139e16f 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 6da5394b5bc9..b86f31d83c85 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 e01be221d120..5dee10539d5e 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 8424a252d2cb..8c0c0ebe8964 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 e3d808149c27..1538aa80c6ac 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 5a0b9532b9a4..d8354d057df9 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 69c6c7e8f262..f09b96744021 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 b56a038d308b..a4f0bfcf8f9b 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 0a539830ca562137e44a49130f9e564f0699144b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 02:12:19 -0800 Subject: [PATCH 31/64] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/6452986b4d70 Author: EragonJ (E.J.) Desc: Merge pull request #26756 from EragonJ/bug-1103805 Bug 1103805 - [Settings][Dialog] wifi_join_hidden should be shown as a d... ======== https://hg.mozilla.org/integration/gaia-central/rev/16d991a667b5 Author: EragonJ Desc: Bug 1103805 - [Settings][Dialog] wifi_join_hidden should be shown as a dialog ======== https://hg.mozilla.org/integration/gaia-central/rev/ab5cc56052f8 Author: Sean Lee Desc: Merge pull request #26871 from weilonge/seanlee/STK/master/Bug1106450 Bug 1106450 - Fix the issue of multi-sim and missing cell object of connection. r=frsela ======== https://hg.mozilla.org/integration/gaia-central/rev/88ef19118772 Author: Sean Lee Desc: Bug 1106450 1. Use icc.getConnection to get a connection for multi-sim cases. 2. Send STK_RESULT_PRFRMD_LIMITED_SERVICE when there is no cell object of connection during handling STK_CMD_PROVIDE_LOCAL_INFO command. --- 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 8cb71b5a5566..2ae579069e51 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "5942decc9c2d27169eb08723be482ee43f122864", + "revision": "6452986b4d704d2ab0d6e2151f31fd15a1b8d358", "repo_path": "integration/gaia-central" } From 7e127fa4e956366332d44a9751e2c0f0fc7a305d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 02:21:59 -0800 Subject: [PATCH 32/64] 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 e80e1bec3b6b..5a1addd0f73a 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 b86f31d83c85..5987970faa40 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 206fa8faddcb..5bb871a49ac3 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 7f057139e16f..9ff4ca877e46 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 b86f31d83c85..5987970faa40 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 5dee10539d5e..5a3e0821e3c4 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 8c0c0ebe8964..5cdb6bf7aec5 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 1538aa80c6ac..9625c528a979 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 d8354d057df9..968a555aeef6 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 f09b96744021..73ba255d87b0 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 a4f0bfcf8f9b..8f277df03b6e 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 36f3e2f3b7ba15c1bf2bc25ebc782ff23c9a01fc Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 02:47:25 -0800 Subject: [PATCH 33/64] Bumping gaia.json for 1 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/0d8505fd0bb7 Author: EragonJ Desc: Revert "Bug 1111903 - [Settings] Refactor Dialog Service with l10n best practices" This reverts commit d9aac6b9d0e2ba15942bdccd8acf0e06cedb6bc1. --- 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 2ae579069e51..ef2e86f99654 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "6452986b4d704d2ab0d6e2151f31fd15a1b8d358", + "revision": "0d8505fd0bb7b9b4b38712aad2bec0687e9fecda", "repo_path": "integration/gaia-central" } From ae0ad8b9a588c24c305de646cbc73c544dc09f9f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 02:52:03 -0800 Subject: [PATCH 34/64] 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 5a1addd0f73a..2b4be76f7dec 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 5987970faa40..4a8cf95ab0b6 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 5bb871a49ac3..d7131455125a 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 9ff4ca877e46..8cb74acf6310 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 5987970faa40..4a8cf95ab0b6 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 5a3e0821e3c4..e13ed8fa5881 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 5cdb6bf7aec5..58f7c1bbc895 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 9625c528a979..f573bbf68fc8 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 968a555aeef6..9082ea03b48c 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 73ba255d87b0..faa35eb5afb9 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 8f277df03b6e..e3ca2146ea09 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 54c5841e53198ddeaae2753c9624978cc7efb43d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 04:02:17 -0800 Subject: [PATCH 35/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/1ec19fae52f3 Author: Chris Lord Desc: Merge pull request #26856 from Cwiiis/bug1112594-fix-cut-off-neterror Bug 1112594 - Fix sometimes cut-off net-error page. r=alive ======== https://hg.mozilla.org/integration/gaia-central/rev/1a565e588473 Author: Chris Lord Desc: Bug 1112594 - Fix sometimes cut-off net-error page. r=alive --- 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 ef2e86f99654..a4d8e11080fd 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "0d8505fd0bb7b9b4b38712aad2bec0687e9fecda", + "revision": "1ec19fae52f37368e0b0a04ac3cebc35b3e6b1b1", "repo_path": "integration/gaia-central" } From d13c0aa0bf0cefc2563807faca2ef05da47bb4b7 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 04:06:56 -0800 Subject: [PATCH 36/64] 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 2b4be76f7dec..5e121622b299 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 4a8cf95ab0b6..b17b64710d29 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 d7131455125a..9b844a2614bc 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 8cb74acf6310..2d354b1ed739 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 4a8cf95ab0b6..b17b64710d29 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 e13ed8fa5881..4cd057236d06 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 58f7c1bbc895..db9059b3b5e3 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 f573bbf68fc8..aaef4bebb15c 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 9082ea03b48c..d04757bd547c 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 faa35eb5afb9..a68bacd39952 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 e3ca2146ea09..88626f082052 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 4a640c2e2ace179f57267c872b2eaa26a7e59cf3 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 04:17:22 -0800 Subject: [PATCH 37/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/5fee499e1de7 Author: Luke Chang Desc: Merge pull request #26515 from luke-chang/1102789_import_vcard_freeze Bug 1102789 - [Contacts] MS freeze when import contacts from memory card to phone, r=sergi ======== https://hg.mozilla.org/integration/gaia-central/rev/cce6a03891de Author: Luke Chang Desc: Bug 1102789 - [Contacts] MS freeze when import contacts from memory card to phone --- 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 a4d8e11080fd..d7ad521d29d5 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "1ec19fae52f37368e0b0a04ac3cebc35b3e6b1b1", + "revision": "5fee499e1de78b467101a4f60cb4dd14085eed44", "repo_path": "integration/gaia-central" } From c95f57cd3fc4ddb8fd00c09eacdbafbed22032ad Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 04:27:01 -0800 Subject: [PATCH 38/64] 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 5e121622b299..ca899031ac6f 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 b17b64710d29..958c5a7b2803 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 9b844a2614bc..f78f6fca31a6 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 2d354b1ed739..96011cbd9093 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 b17b64710d29..958c5a7b2803 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 4cd057236d06..90f7a3594c6e 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 db9059b3b5e3..f1af51001c31 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 aaef4bebb15c..f67e62e8e134 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 d04757bd547c..631dcb534f7d 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 a68bacd39952..f69a99cecba3 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 88626f082052..d9885a293cc3 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From ef327beec4ae23783508e38eb2f1f7a68b71f821 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 04:47:21 -0800 Subject: [PATCH 39/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/e0025c43429e Author: albertopq Desc: Merge pull request #26823 from albertopq/1074332-icons-toggle-2 Bug 1074332 - Utility tray improved transtion r=mhenretty ======== https://hg.mozilla.org/integration/gaia-central/rev/ffc3d8a7c597 Author: albertopq Desc: Bug 1074332 - Utility tray improved transtion --- 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 d7ad521d29d5..f9ef14fa73af 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "5fee499e1de78b467101a4f60cb4dd14085eed44", + "revision": "e0025c43429e0df3cf4cfb652d97615ef548d719", "repo_path": "integration/gaia-central" } From bcef095fcbe1df5f187be52712c8588b0764e5f6 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 04:57:00 -0800 Subject: [PATCH 40/64] 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 ca899031ac6f..d9d46334f548 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 958c5a7b2803..ff2c97f60b90 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 f78f6fca31a6..8fd1a7244434 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 96011cbd9093..f58e3d746356 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 958c5a7b2803..ff2c97f60b90 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 90f7a3594c6e..66ff43238a1e 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 f1af51001c31..2c5207103195 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 f67e62e8e134..aae08e5e4662 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 631dcb534f7d..8b474fd57921 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 f69a99cecba3..b4907538e880 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 d9885a293cc3..977d7be043e7 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 02039114d4280bdef275e99f04988ae8ab1b9521 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 06:37:17 -0800 Subject: [PATCH 41/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/b9dd9fa57603 Author: Ryan VanderMeulen Desc: Merge pull request #26816 from mancas/bug1111658 Bug 1111658 - SIM Toolkit dialog are improperly placed with software hom... ======== https://hg.mozilla.org/integration/gaia-central/rev/99b0b1bb9fb9 Author: Manuel Desc: Bug 1111658 - SIM Toolkit dialog are improperly placed with software home button --- 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 f9ef14fa73af..4a29073550d2 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "e0025c43429e0df3cf4cfb652d97615ef548d719", + "revision": "b9dd9fa57603f9c61a89e173db890ab281baeb4b", "repo_path": "integration/gaia-central" } From e7da837e8f5c2f31bed0d26dc06552ac5e7d0b07 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 06:41:56 -0800 Subject: [PATCH 42/64] 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 d9d46334f548..32809abe923f 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 ff2c97f60b90..ba1fa1052c2c 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 8fd1a7244434..c57bd5749ec0 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 f58e3d746356..eaecbdfe63b3 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 ff2c97f60b90..ba1fa1052c2c 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 66ff43238a1e..c9f08871ab88 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 2c5207103195..0ffa9a284758 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 aae08e5e4662..3e963aedefd1 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 8b474fd57921..5efcd82c0564 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 b4907538e880..3d91af429138 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 977d7be043e7..10aa2ee3612b 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 06d363a381c29ec7393964d11069542fb57d0672 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 06:52:17 -0800 Subject: [PATCH 43/64] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4e76ef50441e Author: George Desc: Merge pull request #26804 from cctuan/1049367 Bug 1049367 - [Text Selection] We should remove fake pressing function from js marionette ======== https://hg.mozilla.org/integration/gaia-central/rev/c21ed60fa79e Author: cctuan Desc: Bug 1049367 - [Text Selection] We should remove fake pressing function from js marionette ======== https://hg.mozilla.org/integration/gaia-central/rev/156a591ca28a Author: Florin Strugariu Desc: Merge pull request #26796 from npark-mozilla/1111637 Bug 1111637 - Create a new test case for the switching to camera from gallery and back ======== https://hg.mozilla.org/integration/gaia-central/rev/c08ede3e2bc8 Author: Viorela Ioia Desc: Bug 1111637: Create a new test case for the switching to camera from gallery and back --- 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 4a29073550d2..5ac1930f46ad 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "b9dd9fa57603f9c61a89e173db890ab281baeb4b", + "revision": "4e76ef50441e17f5176ab1db9d024ad407ed7665", "repo_path": "integration/gaia-central" } From adf67fa4ff2f68a0a7d3f8db21ba77f0639bde93 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 06:56:55 -0800 Subject: [PATCH 44/64] 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 32809abe923f..00a88b6bce57 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 ba1fa1052c2c..bbb9750fe1be 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 c57bd5749ec0..bc8bb6bf1b67 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 eaecbdfe63b3..c4ffe9ab666b 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 ba1fa1052c2c..bbb9750fe1be 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 c9f08871ab88..7c029497765a 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 0ffa9a284758..9c42ee5d73d1 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 3e963aedefd1..11abf662435d 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 5efcd82c0564..6adecf8c6930 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 3d91af429138..2ba934ef88fa 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 10aa2ee3612b..af2cb7f8ed12 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 48746df80b14c47d11063336a54cd1f76f9820c1 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 08:42:19 -0800 Subject: [PATCH 45/64] Bumping gaia.json for 4 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/b2b5bbd2111f Author: Marina Desc: Merge pull request #26099 from gitmai/bug-1091648-usage-show-error-note-on-datalimit-screen Bug 1091648 - Follow up 1089829 - [Usage] Show a note to notice user wha... r=salva ======== https://hg.mozilla.org/integration/gaia-central/rev/e3c71bfbec70 Author: mai Desc: Bug 1091648 - Follow up 1089829 - [Usage] Show a note to notice user what are the format constrains for data limit ======== https://hg.mozilla.org/integration/gaia-central/rev/37cb7f0789cf Author: Marina Desc: Merge pull request #26717 from gitmai/bug-1105170-settings-sim-change Bug 1105170 - [FFOS2.0][Woodduck][costcontrol] data usage does not consi... r=salva ======== https://hg.mozilla.org/integration/gaia-central/rev/e0b5b784c6d9 Author: mai Desc: Bug 1105170 - [FFOS2.0][Woodduck][costcontrol] data usage does not consider dual SIM scenario while switch sim card --- 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 5ac1930f46ad..86e3ced0aa03 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "4e76ef50441e17f5176ab1db9d024ad407ed7665", + "revision": "b2b5bbd2111f73290c5cb675a3109c616f9eb38f", "repo_path": "integration/gaia-central" } From a1a3eb50c2c86f3b378e8337941b42fde8173e9c Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 08:47:04 -0800 Subject: [PATCH 46/64] 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 00a88b6bce57..99164a695935 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 bbb9750fe1be..af4ecac41fe6 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 bc8bb6bf1b67..3e6144067066 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 c4ffe9ab666b..dc89e675d2bb 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 bbb9750fe1be..af4ecac41fe6 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 7c029497765a..18273d70be5c 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 9c42ee5d73d1..1cb56356c83c 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 11abf662435d..0d0645e95f0d 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 6adecf8c6930..4085ca88b68b 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 2ba934ef88fa..0c75444c4887 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 af2cb7f8ed12..77ab22377c2f 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 270a684d66ca6c3142f26e6bd3c84b3b3b15c8f3 Mon Sep 17 00:00:00 2001 From: Kyle Machulis Date: Thu, 18 Dec 2014 09:27:06 -0800 Subject: [PATCH 47/64] Bug 1110872 - Readd cleanup for live locks in SettingsManager; r=gerard-majax --- dom/settings/SettingsManager.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dom/settings/SettingsManager.js b/dom/settings/SettingsManager.js index 8b0bc789c932..9c291cf994cd 100644 --- a/dom/settings/SettingsManager.js +++ b/dom/settings/SettingsManager.js @@ -462,6 +462,17 @@ SettingsManager.prototype = { cleanup: function() { Services.obs.removeObserver(this, "inner-window-destroyed"); + // At this point, the window is dying, so there's nothing left + // that we could do with our lock. Go ahead and run finalize on + // it to make sure changes are commited. + for (let i = 0; i < this._locks.length; ++i) { + if (DEBUG) debug("Lock alive at destroy, finalizing: " + this._locks[i]); + // Due to bug 1105511 we should be able to send this without + // cached principals. However, this is scary because any iframe + // in the process could run this? + cpmm.sendAsyncMessage("Settings:Finalize", + {lockID: this._locks[i]}); + } cpmm.removeMessageListener("Settings:Change:Return:OK", this); mrm.unregisterStrongReporter(this); this.innerWindowID = null; From 409df463abf3e5e58a00f4836636670bc996d086 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 09:43:54 -0800 Subject: [PATCH 48/64] 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 99164a695935..c463a5f7c9d9 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index af4ecac41fe6..8b4cba45bece 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 3e6144067066..bda6023ac29a 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index dc89e675d2bb..6970498a2fa1 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index af4ecac41fe6..8b4cba45bece 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index 18273d70be5c..d13ad85f9863 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -17,7 +17,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 1cb56356c83c..4d83ad278286 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 0d0645e95f0d..55694dd776f8 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml index 4085ca88b68b..614cb2d72c7e 100644 --- a/b2g/config/helix/sources.xml +++ b/b2g/config/helix/sources.xml @@ -16,7 +16,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index 0c75444c4887..6619ad94eda9 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -18,7 +18,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 77ab22377c2f..b4f38092fdcb 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -18,7 +18,7 @@ - + From 576352c346fb0a1b6f26a2f15e4875b4b7a188d7 Mon Sep 17 00:00:00 2001 From: Chris Manchester Date: Thu, 18 Dec 2014 12:52:17 -0500 Subject: [PATCH 49/64] Bug 1100124 - Add --jsdebugger to run marionette under the jsdebugger.;r=ato --- .../client/marionette/geckoinstance.py | 9 +++++++++ .../client/marionette/runner/base.py | 9 ++++++++- testing/marionette/mach_commands.py | 2 ++ testing/marionette/marionette-server.js | 19 ++++++++++++++++++- 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/testing/marionette/client/marionette/geckoinstance.py b/testing/marionette/client/marionette/geckoinstance.py index e5185592a187..6aec94568c7f 100644 --- a/testing/marionette/client/marionette/geckoinstance.py +++ b/testing/marionette/client/marionette/geckoinstance.py @@ -52,6 +52,15 @@ class GeckoInstance(object): profile_args["preferences"]["marionette.defaultPrefs.port"] = self.marionette_port if self.prefs: profile_args["preferences"].update(self.prefs) + if '-jsdebugger' in self.app_args: + profile_args["preferences"].update({ + "devtools.browsertoolbox.panel": "jsdebugger", + "devtools.debugger.remote-enabled": True, + "devtools.debugger.chrome-enabled": True, + "devtools.chrome.enabled": True, + "devtools.debugger.prompt-connection": False, + "marionette.debugging.clicktostart": True, + }) if hasattr(self, "profile_path") and self.profile is None: if not self.profile_path: diff --git a/testing/marionette/client/marionette/runner/base.py b/testing/marionette/client/marionette/runner/base.py index 6453d0a666a7..57e8da4090d8 100644 --- a/testing/marionette/client/marionette/runner/base.py +++ b/testing/marionette/client/marionette/runner/base.py @@ -390,7 +390,11 @@ class BaseMarionetteOptions(OptionParser): action='store', default='Marionette-based Tests', help='Define the name to associate with the logger used') - + self.add_option('--jsdebugger', + dest='jsdebugger', + action='store_true', + default=False, + help='Enable the jsdebugger for marionette javascript.') def parse_args(self, args=None, values=None): options, tests = OptionParser.parse_args(self, args, values) @@ -440,6 +444,9 @@ class BaseMarionetteOptions(OptionParser): if not 1 <= options.this_chunk <= options.total_chunks: self.error('Chunk to run must be between 1 and %s.' % options.total_chunks) + if options.jsdebugger: + options.app_args.append('-jsdebugger') + for handler in self.verify_usage_handlers: handler(options, tests) diff --git a/testing/marionette/mach_commands.py b/testing/marionette/mach_commands.py index ceda3f95a1aa..6354305d5626 100644 --- a/testing/marionette/mach_commands.py +++ b/testing/marionette/mach_commands.py @@ -130,6 +130,8 @@ class MachCommands(MachCommandBase): help='Path to gecko profile to use.') @CommandArgument('--gecko-log', help='Path to gecko log file, or "-" for stdout.') + @CommandArgument('--jsdebugger', action='store_true', + help='Enable the jsdebugger for marionette javascript.') @CommandArgument('tests', nargs='*', metavar='TESTS', help='Path to test(s) to run.') def run_marionette_test(self, tests, **kwargs): diff --git a/testing/marionette/marionette-server.js b/testing/marionette/marionette-server.js index 5bb98fa334d5..575a661a9b93 100644 --- a/testing/marionette/marionette-server.js +++ b/testing/marionette/marionette-server.js @@ -611,7 +611,24 @@ MarionetteServerConnection.prototype = { win.addEventListener("load", listener, true); } else { - this.startBrowser(win, true); + let clickToStart; + try { + clickToStart = Services.prefs.getBoolPref('marionette.debugging.clicktostart'); + Services.prefs.setBoolPref('marionette.debugging.clicktostart', false); + } catch (e) { } + if (clickToStart && (appName != "B2G")) { + let nbox = win.gBrowser.getNotificationBox(); + let message = "Starting marionette tests with chrome debugging enabled..."; + let buttons = [{ + label: "Start execution of marionette tests", + accessKey: 'S', + callback: () => this.startBrowser(win, true) + }]; + nbox.appendNotification(message, null, null, + nbox.PRIORITY_WARNING_MEDIUM, buttons); + } else { + this.startBrowser(win, true); + } } } From eb40090777d8d732fb5aa76ff6bd79530974898b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 09:57:17 -0800 Subject: [PATCH 50/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/cca47d333f64 Author: viorelaioia Desc: Merge pull request #26784 from bebef1987/import/export Bug 1109587 - New test that Import's a contact from SIM, edit it and exp... ======== https://hg.mozilla.org/integration/gaia-central/rev/029302db5b17 Author: bebef1987 Desc: Bug 1109587 - New test that Import's a contact from SIM, edit it and export it again wip --- 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 86e3ced0aa03..7ae128ec22ce 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "b2b5bbd2111f73290c5cb675a3109c616f9eb38f", + "revision": "cca47d333f643652b8df9674897e54c4230ca551", "repo_path": "integration/gaia-central" } From 5fd5168d6c8acf373ad6c5fefabca8051e165ce1 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 10:06:56 -0800 Subject: [PATCH 51/64] 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 c463a5f7c9d9..1ad2d9ff5d70 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 8b4cba45bece..e983a865868b 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 bda6023ac29a..e8a197c837c3 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 6970498a2fa1..37f8b9348824 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 8b4cba45bece..e983a865868b 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 d13ad85f9863..e8f612a369cb 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 4d83ad278286..75fb8a049ea3 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 55694dd776f8..82f310d2f7d5 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 614cb2d72c7e..fa046745fe62 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 6619ad94eda9..e9f61ead5a59 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 b4f38092fdcb..58e8a8c44ce2 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 5f6bbd927d927cd867c22ba4efe284ce1e68628c Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Thu, 18 Dec 2014 19:28:16 +0100 Subject: [PATCH 52/64] Bug 1110268 - avoid crashing in canvas code when failing to allocate a frame. r=Bas. --- gfx/layers/client/CanvasClient.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index b524aa65279e..ee4a7456736b 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -373,6 +373,11 @@ CanvasClientSharedSurface::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) newTex = TexClientFromReadback(surf, forwarder, flags, layersBackend); } MOZ_ASSERT(newTex); + if (!newTex) { + // May happen in a release build in case of memory pressure. + gfxCriticalError() << "Failed to allocate a TextureClient for SharedSurface Canvas. size: " << aSize; + return; + } // Add the new TexClient. MOZ_ALWAYS_TRUE( AddTextureClient(newTex) ); From f428f8446326e53798429de6805a1d636f35f034 Mon Sep 17 00:00:00 2001 From: Terrence Cole Date: Thu, 18 Dec 2014 10:15:19 -0800 Subject: [PATCH 53/64] Bug 1109922 - Check for Intl before testing it; r=test-fix --HG-- extra : rebase_source : 84d074b0e073d5ea3b1d0c949dd593de73e26217 --- js/src/jit-test/tests/gc/bug-1109922.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/js/src/jit-test/tests/gc/bug-1109922.js b/js/src/jit-test/tests/gc/bug-1109922.js index 64067fe8d4b0..8bd5c52da79c 100644 --- a/js/src/jit-test/tests/gc/bug-1109922.js +++ b/js/src/jit-test/tests/gc/bug-1109922.js @@ -1,5 +1,6 @@ - -gczeal(14); -b = {}; -b.__proto__ = evalcx("lazy"); -(function m(b) {})(b.Intl.Collator(0)) +if (this.hasOwnProperty("Intl")) { + gczeal(14); + b = {}; + b.__proto__ = evalcx("lazy"); + (function m(b) {})(b.Intl.Collator(0)) +} From be07288a7f0c186fce0f2bc7ae2aba6d7337df9d Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 10:28:37 -0800 Subject: [PATCH 54/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/a17181ee689d Author: Florin Strugariu Desc: Merge pull request #26884 from bebef1987/marionette Bug 1113133 - Update marionette version to 0.8.6 ======== https://hg.mozilla.org/integration/gaia-central/rev/95a48b183ea3 Author: bebef1987 Desc: Bug 1113133 - Update marionette version to 0.8.6 --- 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 7ae128ec22ce..7551ed3c0630 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "cca47d333f643652b8df9674897e54c4230ca551", + "revision": "a17181ee689da02b4576f174b3284e5aef78beaf", "repo_path": "integration/gaia-central" } From 4d54483e5c36ab389d1a5b1c441b4a4749782525 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 10:36:51 -0800 Subject: [PATCH 55/64] 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 1ad2d9ff5d70..0218760c1ca8 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 e983a865868b..38e1b7266131 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 e8a197c837c3..948f30b59aa1 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 37f8b9348824..066b7e9e956e 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 e983a865868b..38e1b7266131 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 e8f612a369cb..08967aef0a8f 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 75fb8a049ea3..08d1a331bba4 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 82f310d2f7d5..59613c5e8187 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 fa046745fe62..76b4b4806910 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 e9f61ead5a59..bee11dea7208 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 58e8a8c44ce2..175fdd123354 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 2cedc043525222ae6bbd9788ef611e393972af29 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 10:47:25 -0800 Subject: [PATCH 56/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/9e676b86fff8 Author: Martijn Desc: Merge pull request #26855 from JohanLorenzo/bug-926881 Bug 926881 - Write test to enable USB storage ======== https://hg.mozilla.org/integration/gaia-central/rev/528042f4a2d6 Author: Johan Lorenzo Desc: Bug 926881 - Write test to enable USB storage --- 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 7551ed3c0630..db2fcb580465 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "a17181ee689da02b4576f174b3284e5aef78beaf", + "revision": "9e676b86fff89ed8c2f18a4898358776bbab4745", "repo_path": "integration/gaia-central" } From 3988cefc55b69113f101362ff97e737d1b110854 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 10:52:08 -0800 Subject: [PATCH 57/64] 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 0218760c1ca8..2905f167ec3b 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 38e1b7266131..8168420ceb4e 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 948f30b59aa1..38bc23a75083 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 066b7e9e956e..a7e52e976a61 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 38e1b7266131..8168420ceb4e 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 08967aef0a8f..e95db9e4bbb2 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 08d1a331bba4..d5676b8424a3 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 59613c5e8187..091f759402a8 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 76b4b4806910..ebef93c9c2dc 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 bee11dea7208..a4a1d8b758a2 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 175fdd123354..100810504193 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 47a604b301eec70aff9c925af1a6df9cc7440d4f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 11:17:24 -0800 Subject: [PATCH 58/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/4b5d0bd752f2 Author: Sam Foster Desc: Merge pull request #26859 from sfoster/ftu-selection-patterns-bug-1092965 Bug 1092965 - Disable text selection for non-editables. r=fcampo ======== https://hg.mozilla.org/integration/gaia-central/rev/3ea4d6cfb49a Author: Sam Foster Desc: Bug 1092965 - Disable text selection for non-editables. 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 db2fcb580465..89d6d4189674 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "9e676b86fff89ed8c2f18a4898358776bbab4745", + "revision": "4b5d0bd752f222ccfb5506628de2d779f6964cc6", "repo_path": "integration/gaia-central" } From 78ea674508daba1dd6a38bb7a10e130b345e27c5 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 11:22:02 -0800 Subject: [PATCH 59/64] 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 2905f167ec3b..35834b27b920 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 8168420ceb4e..f4cbc5c11f3f 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 38bc23a75083..a9111263727c 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 a7e52e976a61..7436eb82a100 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 8168420ceb4e..f4cbc5c11f3f 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 e95db9e4bbb2..5c6dfc136fc7 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 d5676b8424a3..83874eb2f9ac 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 091f759402a8..2817e44a1f5d 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 ebef93c9c2dc..b9cfbe8147c8 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 a4a1d8b758a2..ceb6d8ec08f2 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 100810504193..ded392d7c010 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From 67cda196ca3abac5177272dbecf24800d7ba3ee0 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 11:47:24 -0800 Subject: [PATCH 60/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/8af85c076ddc Author: albertopq Desc: Merge pull request #26881 from albertopq/1112520-icons-rocketbar Bug 1112520 - Checking statusbar maximized after collapse rocketbar r=etienne ======== https://hg.mozilla.org/integration/gaia-central/rev/57b806139092 Author: albertopq Desc: Bug 1112520 - Checking statusbar maximized after collapse rocketbar --- 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 89d6d4189674..f6bc5e5c1870 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "4b5d0bd752f222ccfb5506628de2d779f6964cc6", + "revision": "8af85c076ddcc1597016d09ccf3b8a54df152bec", "repo_path": "integration/gaia-central" } From bba46d8a89a2a8cbc0bcae0496c0833e280ceb7b Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 11:52:03 -0800 Subject: [PATCH 61/64] 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 35834b27b920..bc9b1d65b5f4 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 f4cbc5c11f3f..21b6c22dfc2f 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 a9111263727c..7c42ba61b801 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 7436eb82a100..0ad4a2286f7c 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 f4cbc5c11f3f..21b6c22dfc2f 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 5c6dfc136fc7..b7b1e44a20ed 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 83874eb2f9ac..7dbf1576b656 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 2817e44a1f5d..5ac7db0dee25 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 b9cfbe8147c8..30a747071f14 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 ceb6d8ec08f2..d4a3f225e61c 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 ded392d7c010..3231f1fecc0e 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - + From a0e5e3ba9fe979b600e2f67436af33f7c823a606 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 12:09:01 -0800 Subject: [PATCH 62/64] 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/nexus-4/sources.xml | 2 +- b2g/config/wasabi/sources.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/b2g/config/dolphin/sources.xml b/b2g/config/dolphin/sources.xml index bc9b1d65b5f4..440affe8cee3 100644 --- a/b2g/config/dolphin/sources.xml +++ b/b2g/config/dolphin/sources.xml @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml index 21b6c22dfc2f..0859b7ef1797 100644 --- a/b2g/config/emulator-ics/sources.xml +++ b/b2g/config/emulator-ics/sources.xml @@ -25,7 +25,7 @@ - + diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml index 7c42ba61b801..e8a5a26ba67a 100644 --- a/b2g/config/emulator-jb/sources.xml +++ b/b2g/config/emulator-jb/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml index 0ad4a2286f7c..f30644b3f387 100644 --- a/b2g/config/emulator-kk/sources.xml +++ b/b2g/config/emulator-kk/sources.xml @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml index 21b6c22dfc2f..0859b7ef1797 100644 --- a/b2g/config/emulator/sources.xml +++ b/b2g/config/emulator/sources.xml @@ -25,7 +25,7 @@ - + diff --git a/b2g/config/flame-kk/sources.xml b/b2g/config/flame-kk/sources.xml index b7b1e44a20ed..3d27f595d0de 100644 --- a/b2g/config/flame-kk/sources.xml +++ b/b2g/config/flame-kk/sources.xml @@ -23,7 +23,7 @@ - + diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml index 7dbf1576b656..8bff62ef005f 100644 --- a/b2g/config/flame/sources.xml +++ b/b2g/config/flame/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml index 5ac7db0dee25..8710984212e9 100644 --- a/b2g/config/hamachi/sources.xml +++ b/b2g/config/hamachi/sources.xml @@ -21,7 +21,7 @@ - + diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml index d4a3f225e61c..05dffdb91183 100644 --- a/b2g/config/nexus-4/sources.xml +++ b/b2g/config/nexus-4/sources.xml @@ -20,7 +20,7 @@ - + diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml index 3231f1fecc0e..2ed6748bfc9f 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -22,7 +22,7 @@ - + From 4d6b459f22e3e592b772966cd111c98042ea826f Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 12:22:21 -0800 Subject: [PATCH 63/64] Bumping gaia.json for 2 gaia revision(s) a=gaia-bump ======== https://hg.mozilla.org/integration/gaia-central/rev/9e971d42c915 Author: Eli Perelman Desc: Merge pull request #26887 from eliperelman/bug-1088118 Bug 1088118 - Adding User Timing markers to applications ======== https://hg.mozilla.org/integration/gaia-central/rev/319db3c787ff Author: Eli Perelman Desc: Bug 1088118 - Adding User Timing markers to applications --- 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 f6bc5e5c1870..80771b5f22e0 100644 --- a/b2g/config/gaia.json +++ b/b2g/config/gaia.json @@ -4,6 +4,6 @@ "remote": "", "branch": "" }, - "revision": "8af85c076ddcc1597016d09ccf3b8a54df152bec", + "revision": "9e971d42c915f999f3e352fe43fca7ba0a5245b4", "repo_path": "integration/gaia-central" } From b5e8741d014fc9450fdd04572612c4f3bfb8c661 Mon Sep 17 00:00:00 2001 From: B2G Bumper Bot Date: Thu, 18 Dec 2014 12:27:00 -0800 Subject: [PATCH 64/64] 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 440affe8cee3..9a86bd510c31 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 0859b7ef1797..63e5fc174d3e 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 e8a5a26ba67a..df313f49a0ee 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 f30644b3f387..310fe85e02b9 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 0859b7ef1797..63e5fc174d3e 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 3d27f595d0de..b33c35956211 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 8bff62ef005f..0b7787e40148 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 8710984212e9..eae0673590e2 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 30a747071f14..b1c629d019b5 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 05dffdb91183..938025589249 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 2ed6748bfc9f..4a726ab83a20 100644 --- a/b2g/config/wasabi/sources.xml +++ b/b2g/config/wasabi/sources.xml @@ -17,7 +17,7 @@ - +