lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Threads by month
  • ----- 2026 -----
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 20633 discussions
[tor-browser/esr24] Bug 1024765 - Part 2: Make refcounting logic around PostTimerEvent more explicit. r=bz, a=sledru
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 24b9acce7908ed422611abb09b77ae5ae222ce0a Author: Byron Campen [:bwc] <docfaraday(a)gmail.com> Date: Mon Jun 16 14:13:04 2014 -0700 Bug 1024765 - Part 2: Make refcounting logic around PostTimerEvent more explicit. r=bz, a=sledru --- xpcom/threads/TimerThread.cpp | 17 +++++++---- xpcom/threads/nsTimerImpl.cpp | 67 +++++++++++++++++++++++++++-------------- xpcom/threads/nsTimerImpl.h | 4 ++- 3 files changed, 59 insertions(+), 29 deletions(-) diff --git a/xpcom/threads/TimerThread.cpp b/xpcom/threads/TimerThread.cpp index f8a7cb7..ebf5751 100644 --- a/xpcom/threads/TimerThread.cpp +++ b/xpcom/threads/TimerThread.cpp @@ -211,8 +211,9 @@ NS_IMETHODIMP TimerThread::Run() // must be racing with us, blocked in gThread->RemoveTimer waiting // for TimerThread::mMonitor, under nsTimerImpl::Release. - NS_ADDREF(timer); + nsRefPtr<nsTimerImpl> timerRef(timer); RemoveTimerInternal(timer); + timer = nullptr; { // We release mMonitor around the Fire call to avoid deadlock. @@ -222,16 +223,21 @@ NS_IMETHODIMP TimerThread::Run() if (PR_LOG_TEST(GetTimerLog(), PR_LOG_DEBUG)) { PR_LOG(GetTimerLog(), PR_LOG_DEBUG, ("Timer thread woke up %fms from when it was supposed to\n", - fabs((now - timer->mTimeout).ToMilliseconds()))); + fabs((now - timerRef->mTimeout).ToMilliseconds()))); } #endif // We are going to let the call to PostTimerEvent here handle the // release of the timer so that we don't end up releasing the timer // on the TimerThread instead of on the thread it targets. - if (NS_FAILED(timer->PostTimerEvent())) { - nsrefcnt rc; - NS_RELEASE2(timer, rc); + timerRef = nsTimerImpl::PostTimerEvent(timerRef.forget()); + + if (timerRef) { + // We got our reference back due to an error. + // Unhook the nsRefPtr, and release manually so we can get the + // refcount. + nsrefcnt rc = timerRef.forget().get()->Release(); + (void)rc; // The nsITimer interface requires that its users keep a reference // to the timers they use while those timers are initialized but @@ -246,7 +252,6 @@ NS_IMETHODIMP TimerThread::Run() // preventing this situation from occurring. MOZ_ASSERT(rc != 0, "destroyed timer off its target thread!"); } - timer = nullptr; } if (mShutdown) diff --git a/xpcom/threads/nsTimerImpl.cpp b/xpcom/threads/nsTimerImpl.cpp index fd4b391..717f280 100644 --- a/xpcom/threads/nsTimerImpl.cpp +++ b/xpcom/threads/nsTimerImpl.cpp @@ -105,9 +105,10 @@ class nsTimerEvent : public nsRunnable { public: NS_IMETHOD Run(); - nsTimerEvent(nsTimerImpl *timer, int32_t generation) - : mTimer(dont_AddRef(timer)), mGeneration(generation) { - // timer is already addref'd for us + nsTimerEvent() + : mTimer() + , mGeneration(0) + { MOZ_COUNT_CTOR(nsTimerEvent); MOZ_ASSERT(gThread->IsOnTimerThread(), @@ -132,8 +133,18 @@ public: DeleteAllocatorIfNeeded(); } + already_AddRefed<nsTimerImpl> ForgetTimer() + { + return mTimer.forget(); + } + + void SetTimer(already_AddRefed<nsTimerImpl> aTimer) + { + mTimer = aTimer; + mGeneration = mTimer->GetGeneration(); + } + private: - nsTimerEvent(); // Not implemented ~nsTimerEvent() { MOZ_COUNT_DTOR(nsTimerEvent); @@ -629,23 +640,27 @@ NS_IMETHODIMP nsTimerEvent::Run() return NS_OK; } -nsresult nsTimerImpl::PostTimerEvent() +already_AddRefed<nsTimerImpl> nsTimerImpl::PostTimerEvent(already_AddRefed<nsTimerImpl> aTimerRef) { - if (!mEventTarget) { + nsRefPtr<nsTimerImpl> timer(aTimerRef); + if (!timer->mEventTarget) { NS_ERROR("Attempt to post timer event to NULL event target"); - return NS_ERROR_NOT_INITIALIZED; + return timer.forget(); } // XXX we may want to reuse this nsTimerEvent in the case of repeating timers. - // Since TimerThread addref'd 'this' for us, we don't need to addref here. - // We will release in destroyMyEvent. We need to copy the generation number - // from this timer into the event, so we can avoid firing a timer that was - // re-initialized after being canceled. + // Since TimerThread addref'd 'timer' for us, we don't need to addref here. + // We will release either in ~nsTimerEvent(), or pass the reference back to + // the caller. We need to copy the generation number from this timer into the + // event, so we can avoid firing a timer that was re-initialized after being + // canceled. - nsRefPtr<nsTimerEvent> event = new nsTimerEvent(this, mGeneration); + // Note: We override operator new for this class, and the override is + // fallible! + nsRefPtr<nsTimerEvent> event = new nsTimerEvent; if (!event) - return NS_ERROR_OUT_OF_MEMORY; + return timer.forget(); #ifdef DEBUG_TIMERS if (PR_LOG_TEST(GetTimerLog(), PR_LOG_DEBUG)) { @@ -655,21 +670,29 @@ nsresult nsTimerImpl::PostTimerEvent() // If this is a repeating precise timer, we need to calculate the time for // the next timer to fire before we make the callback. - if (IsRepeatingPrecisely()) { - SetDelayInternal(mDelay); + if (timer->IsRepeatingPrecisely()) { + timer->SetDelayInternal(timer->mDelay); // But only re-arm REPEATING_PRECISE timers. - if (gThread && mType == TYPE_REPEATING_PRECISE) { - nsresult rv = gThread->AddTimer(this); + if (gThread && timer->mType == TYPE_REPEATING_PRECISE) { + nsresult rv = gThread->AddTimer(timer); if (NS_FAILED(rv)) - return rv; + return timer.forget(); } } - nsresult rv = mEventTarget->Dispatch(event, NS_DISPATCH_NORMAL); - if (NS_FAILED(rv) && gThread) - gThread->RemoveTimer(this); - return rv; + nsIEventTarget* target = timer->mEventTarget; + event->SetTimer(timer.forget()); + + nsresult rv = target->Dispatch(event, NS_DISPATCH_NORMAL); + if (NS_FAILED(rv)) { + timer = event->ForgetTimer(); + if (gThread) + gThread->RemoveTimer(timer); + } + return timer.forget(); + + return nullptr; } void nsTimerImpl::SetDelayInternal(uint32_t aDelay) diff --git a/xpcom/threads/nsTimerImpl.h b/xpcom/threads/nsTimerImpl.h index c318cf1..4a24060 100644 --- a/xpcom/threads/nsTimerImpl.h +++ b/xpcom/threads/nsTimerImpl.h @@ -54,7 +54,9 @@ public: friend struct TimerAdditionComparator; void Fire(); - nsresult PostTimerEvent(); + // If a failure is encountered, the reference is returned to the caller + static already_AddRefed<nsTimerImpl> PostTimerEvent( + already_AddRefed<nsTimerImpl> aTimerRef); void SetDelayInternal(uint32_t aDelay); NS_DECL_ISUPPORTS
1 0
0 0
[tor-browser/esr24] Bug 1024765 - Part 1: Add test-case for timers firing when the target thread is not running. r=bwc, a=sledru
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 74160028fb42bf8b86ec5b90c4fd2538f6cd2ac8 Author: Byron Campen [:bwc] <docfaraday(a)gmail.com> Date: Tue Jun 17 13:37:04 2014 -0700 Bug 1024765 - Part 1: Add test-case for timers firing when the target thread is not running. r=bwc, a=sledru --- xpcom/tests/TestTimers.cpp | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/xpcom/tests/TestTimers.cpp b/xpcom/tests/TestTimers.cpp index 8b4ac25..545a8c4 100644 --- a/xpcom/tests/TestTimers.cpp +++ b/xpcom/tests/TestTimers.cpp @@ -14,6 +14,7 @@ #include "nsThreadUtils.h" #include "prinrval.h" #include "prmon.h" +#include "prthread.h" #include "mozilla/Attributes.h" #include "mozilla/ReentrantMonitor.h" @@ -78,6 +79,7 @@ public: : mThreadPtr(aThreadPtr), mReentrantMonitor(aReentrantMonitor) { } NS_IMETHOD Notify(nsITimer* aTimer) { + NS_ASSERTION(mThreadPtr, "Callback was not supposed to be called!"); nsCOMPtr<nsIThread> current(do_GetCurrentThread()); ReentrantMonitorAutoEnter mon(*mReentrantMonitor); @@ -133,13 +135,45 @@ TestTargetedTimers() return NS_OK; } +nsresult +TestTimerWithStoppedTarget() +{ + AutoTestThread testThread; + NS_ENSURE_TRUE(testThread, NS_ERROR_OUT_OF_MEMORY); + + nsresult rv; + nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID, &rv); + NS_ENSURE_SUCCESS(rv, rv); + + nsIEventTarget* target = static_cast<nsIEventTarget*>(testThread); + + rv = timer->SetTarget(target); + NS_ENSURE_SUCCESS(rv, rv); + + // If this is called, we'll assert + nsCOMPtr<nsITimerCallback> callback = + new TimerCallback(nullptr, nullptr); + NS_ENSURE_TRUE(callback, NS_ERROR_OUT_OF_MEMORY); + + rv = timer->InitWithCallback(callback, PR_MillisecondsToInterval(100), + nsITimer::TYPE_ONE_SHOT); + NS_ENSURE_SUCCESS(rv, rv); + + testThread->Shutdown(); + + PR_Sleep(400); + + return NS_OK; +} + int main(int argc, char** argv) { ScopedXPCOM xpcom("TestTimers"); NS_ENSURE_FALSE(xpcom.failed(), 1); static TestFuncPtr testsToRun[] = { - TestTargetedTimers + TestTargetedTimers, + TestTimerWithStoppedTarget }; static uint32_t testCount = sizeof(testsToRun) / sizeof(testsToRun[0]);
1 0
0 0
[tor-browser/esr24] No bug, Automated HSTS preload list update from host b-linux64-ix-0003 - a=hsts-update
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit f2098e41efdcb4b261717475aad41d9307b91841 Author: ffxbld <none@none> Date: Sat Jun 21 03:13:20 2014 -0700 No bug, Automated HSTS preload list update from host b-linux64-ix-0003 - a=hsts-update --- security/manager/boot/src/nsSTSPreloadList.errors | 8 ++++---- security/manager/boot/src/nsSTSPreloadList.inc | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/security/manager/boot/src/nsSTSPreloadList.errors b/security/manager/boot/src/nsSTSPreloadList.errors index 7d18d22..dbd20ab 100644 --- a/security/manager/boot/src/nsSTSPreloadList.errors +++ b/security/manager/boot/src/nsSTSPreloadList.errors @@ -1,7 +1,6 @@ admin.google.com: did not receive HSTS header adsfund.org: could not connect to host airbnb.com: did not receive HSTS header -alpha.irccloud.com: did not receive HSTS header anycoin.me: did not receive HSTS header api.lookout.com: could not connect to host api.mega.co.nz: could not connect to host @@ -11,7 +10,7 @@ app.lookout.com: could not connect to host appengine.google.com: did not receive HSTS header appseccalifornia.org: did not receive HSTS header bassh.net: did not receive HSTS header -bcrook.com: max-age too low: 86400 +bccx.com: could not connect to host betnet.fr: could not connect to host bigshinylock.minazo.net: could not connect to host blacklane.com: did not receive HSTS header @@ -47,6 +46,7 @@ errors.zenpayroll.com: could not connect to host espra.com: could not connect to host fatzebra.com.au: did not receive HSTS header get.zenpayroll.com: did not receive HSTS header +getlantern.org: did not receive HSTS header glass.google.com: did not receive HSTS header gmail.com: did not receive HSTS header googlemail.com: did not receive HSTS header @@ -59,6 +59,7 @@ history.google.com: did not receive HSTS header hostedtalkgadget.google.com: did not receive HSTS header id.atlassian.com: did not receive HSTS header in.xero.com: max-age too low: 3600 +intercom.io: did not receive HSTS header iop.intuit.com: max-age too low: 86400 irccloud.com: did not receive HSTS header jitsi.org: did not receive HSTS header @@ -109,7 +110,7 @@ spreadsheets.google.com: did not receive HSTS header square.com: did not receive HSTS header ssl.google-analytics.com: did not receive HSTS header ssl.panoramio.com: did not receive HSTS header -static.wepay.com: did not receive HSTS header +stocktrade.de: did not receive HSTS header sunshinepress.org: could not connect to host surfeasy.com: did not receive HSTS header talk.google.com: did not receive HSTS header @@ -117,7 +118,6 @@ talkgadget.google.com: did not receive HSTS header translate.googleapis.com: did not receive HSTS header uprotect.it: could not connect to host wallet.google.com: did not receive HSTS header -waveapps.com: no error webmail.mayfirst.org: did not receive HSTS header whonix.org: did not receive HSTS header www.cueup.com: did not receive HSTS header diff --git a/security/manager/boot/src/nsSTSPreloadList.inc b/security/manager/boot/src/nsSTSPreloadList.inc index 2e204ef..8e1a1aa 100644 --- a/security/manager/boot/src/nsSTSPreloadList.inc +++ b/security/manager/boot/src/nsSTSPreloadList.inc @@ -8,7 +8,7 @@ /*****************************************************************************/ #include "mozilla/StandardInteger.h" -const PRTime gPreloadListExpirationTime = INT64_C(1413626792852000); +const PRTime gPreloadListExpirationTime = INT64_C(1414231532587000); class nsSTSPreload { @@ -23,6 +23,7 @@ static const nsSTSPreload kSTSPreloadList[] = { { "activiti.alfresco.com", false }, { "adsfund.org", true }, { "aladdinschools.appspot.com", false }, + { "alpha.irccloud.com", false }, { "api.intercom.io", false }, { "api.simple.com", false }, { "api.xero.com", false }, @@ -32,6 +33,7 @@ static const nsSTSPreload kSTSPreloadList[] = { { "arivo.com.br", true }, { "bank.simple.com", false }, { "bccx.com", true }, + { "bcrook.com", false }, { "bitbucket.org", false }, { "blog.cyveillance.com", true }, { "blog.linode.com", false }, @@ -84,7 +86,6 @@ static const nsSTSPreload kSTSPreloadList[] = { { "forum.quantifiedself.com", true }, { "gernert-server.de", true }, { "getcloak.com", false }, - { "getlantern.org", false }, { "go.xero.com", false }, { "gocardless.com", true }, { "grc.com", false }, @@ -96,7 +97,6 @@ static const nsSTSPreload kSTSPreloadList[] = { { "id.mayfirst.org", false }, { "imouto.my", false }, { "inertianetworks.com", true }, - { "intercom.io", false }, { "itriskltd.com", true }, { "keeperapp.com", true }, { "keepersecurity.com", true }, @@ -182,7 +182,7 @@ static const nsSTSPreload kSTSPreloadList[] = { { "skydrive.live.com", false }, { "squareup.com", false }, { "stage.wepay.com", false }, - { "stocktrade.de", false }, + { "static.wepay.com", false }, { "stripe.com", true }, { "strongest-privacy.com", true }, { "subrosa.io", true }, @@ -224,6 +224,7 @@ static const nsSTSPreload kSTSPreloadList[] = { { "www.banking.co.at", false }, { "www.braintreepayments.com", false }, { "www.calyxinstitute.org", false }, + { "www.capitainetrain.com", false }, { "www.cyveillance.com", true }, { "www.dropcam.com", false }, { "www.entropia.de", false },
1 0
0 0
[tor-browser/esr24] No bug, Automated blocklist update from host bld-linux64-spot-118 - a=blocklist-update
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 42156affb0a4125f15e48fdc2c119cf774843b46 Author: ffxbld <none@none> Date: Sat Jun 21 03:08:52 2014 -0700 No bug, Automated blocklist update from host bld-linux64-spot-118 - a=blocklist-update --- browser/app/blocklist.xml | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/browser/app/blocklist.xml b/browser/app/blocklist.xml index 91763d3..87367d7 100644 --- a/browser/app/blocklist.xml +++ b/browser/app/blocklist.xml @@ -1,5 +1,5 @@ <?xml version="1.0"?> -<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1402612020000"> +<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1403216209000"> <emItems> <emItem blockID="i454" id="sqlmoz(a)facebook.com"> <versionRange minVersion="0" maxVersion="*" severity="3"> @@ -89,6 +89,12 @@ <prefs> </prefs> </emItem> + <emItem blockID="i626" id="{20AD702C-661E-4534-8CE9-BA4EC9AD6ECC}"> + <versionRange minVersion="0" maxVersion="*" severity="3"> + </versionRange> + <prefs> + </prefs> + </emItem> <emItem blockID="i20" id="{AB2CE124-6272-4b12-94A9-7303C7397BD1}"> <versionRange minVersion="0.1" maxVersion="5.2.0.7164" severity="1"> </versionRange> @@ -304,10 +310,8 @@ <prefs> </prefs> </emItem> - <emItem blockID="i496" id="{ACAA314B-EEBA-48e4-AD47-84E31C44796C}"> - <versionRange minVersion="0" maxVersion="*" severity="1"> - </versionRange> - <prefs> + <emItem blockID="i47" id="youtube(a)youtube2.com"> + <prefs> </prefs> </emItem> <emItem blockID="i360" id="ytd(a)mybrowserbar.com"> @@ -365,8 +369,8 @@ <prefs> </prefs> </emItem> - <emItem blockID="i584" id="{52b0f3db-f988-4788-b9dc-861d016f4487}"> - <versionRange minVersion="0" maxVersion="0.1.9999999" severity="1"> + <emItem blockID="i624" id="/^({b95faac1-a3d7-4d69-8943-ddd5a487d966}|{ecce0073-a837-45a2-95b9-600420505f7e}|{2713b394-286f-4d7c-89ea-4174eeab9f5a}|{da7a20cf-bef4-4342-ad78-0240fdf87055})$/"> + <versionRange minVersion="0" maxVersion="*" severity="1"> </versionRange> <prefs> </prefs> @@ -697,7 +701,7 @@ </prefs> </emItem> <emItem blockID="i620" id="{21EAF666-26B3-4A3C-ABD0-CA2F5A326744}"> - <versionRange minVersion="0" maxVersion="*" severity="1"> + <versionRange minVersion="0" maxVersion="*" severity="3"> </versionRange> <prefs> </prefs> @@ -714,6 +718,12 @@ <prefs> </prefs> </emItem> + <emItem blockID="i584" id="{52b0f3db-f988-4788-b9dc-861d016f4487}"> + <versionRange minVersion="0" maxVersion="0.1.9999999" severity="1"> + </versionRange> + <prefs> + </prefs> + </emItem> <emItem blockID="i370" id="happylyrics(a)hpyproductions.net"> <versionRange minVersion="0" maxVersion="*" severity="1"> </versionRange> @@ -1211,8 +1221,10 @@ <prefs> </prefs> </emItem> - <emItem blockID="i47" id="youtube(a)youtube2.com"> - <prefs> + <emItem blockID="i622" id="/^({ebd898f8-fcf6-4694-bc3b-eabc7271eeb1}|{46008e0d-47ac-4daa-a02a-5eb69044431a}|{213c8ed6-1d78-4d8f-8729-25006aa86a76}|{fa23121f-ee7c-4bd8-8c06-123d087282c5}|{19803860-b306-423c-bbb5-f60a7d82cde5})$/"> + <versionRange minVersion="0" maxVersion="*" severity="1"> + </versionRange> + <prefs> </prefs> </emItem> <emItem blockID="i518" id="/^({d6e79525-4524-4707-9b97-1d70df8e7e59}|{ddb4644d-1a37-4e6d-8b6e-8e35e2a8ea6c}|{e55007f4-80c5-418e-ac33-10c4d60db01e}|{e77d8ca6-3a60-4ae9-8461-53b22fa3125b}|{e89a62b7-248e-492f-9715-43bf8c507a2f}|{5ce3e0cb-aa83-45cb-a7da-a2684f05b8f3})$/"> @@ -1508,6 +1520,12 @@ <prefs> </prefs> </emItem> + <emItem blockID="i496" id="{ACAA314B-EEBA-48e4-AD47-84E31C44796C}"> + <versionRange minVersion="0" maxVersion="*" severity="1"> + </versionRange> + <prefs> + </prefs> + </emItem> <emItem blockID="i67" id="youtube2(a)youtube2.com"> <versionRange minVersion="0" maxVersion="*"> </versionRange>
1 0
0 0
[tor-browser/esr24] Bug 913805 - Hold a lock on the RasterImage in ScaleRequest so that the srcFrame doesn't go away if we need to discard images to free up memory. r=seth, a=abillings
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit f3f9e0f211c9c179f9f240eafd4bfcbfc903c3d4 Author: George Wright <george(a)mozilla.com> Date: Fri Jun 6 14:26:21 2014 -0400 Bug 913805 - Hold a lock on the RasterImage in ScaleRequest so that the srcFrame doesn't go away if we need to discard images to free up memory. r=seth, a=abillings --- image/src/RasterImage.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/image/src/RasterImage.cpp b/image/src/RasterImage.cpp index 42d4232..fdd9654 100644 --- a/image/src/RasterImage.cpp +++ b/image/src/RasterImage.cpp @@ -208,6 +208,9 @@ public: bool success = false; if (!dstLocked) { + // We need to hold a lock onto the RasterImage object itself so that + // it (and its associated imgFrames) aren't marked as discardable. + bool imgLocked = NS_SUCCEEDED(image->LockImage()); bool srcLocked = NS_SUCCEEDED(srcFrame->LockImageData()); dstLocked = NS_SUCCEEDED(dstFrame->LockImageData()); @@ -216,7 +219,7 @@ public: success = srcLocked && NS_SUCCEEDED(srcFrame->GetSurface(getter_AddRefs(srcASurf))); success = success && dstLocked && NS_SUCCEEDED(dstFrame->GetSurface(getter_AddRefs(dstASurf))); - success = success && srcLocked && dstLocked && srcASurf && dstASurf; + success = success && imgLocked && srcLocked && dstLocked && srcASurf && dstASurf; if (success) { srcSurface = srcASurf->GetAsImageSurface(); @@ -254,6 +257,7 @@ public: bool success = false; if (dstLocked) { success = NS_SUCCEEDED(dstFrame->UnlockImageData()); + success = success && NS_SUCCEEDED(image->UnlockImage()); dstLocked = false; srcData = nullptr;
1 0
0 0
[tor-browser/esr24] Bug 1023618 - Always call FlushRendering in the reftest harness. r=roc, a=test-only
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 9192077d0d22be236936c29a4a87a7d2246869a8 Author: Seth Fowler <seth(a)mozilla.com> Date: Wed Jun 11 20:21:08 2014 -0700 Bug 1023618 - Always call FlushRendering in the reftest harness. r=roc, a=test-only --- layout/tools/reftest/reftest-content.js | 51 +++++++++++++++++-------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/layout/tools/reftest/reftest-content.js b/layout/tools/reftest/reftest-content.js index 09ee3e2..efadf82 100644 --- a/layout/tools/reftest/reftest-content.js +++ b/layout/tools/reftest/reftest-content.js @@ -268,43 +268,45 @@ const STATE_WAITING_FOR_SPELL_CHECKS = 2; const STATE_WAITING_TO_FINISH = 3; const STATE_COMPLETED = 4; -function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) { - var stopAfterPaintReceived = false; - var currentDoc = content.document; - var state = STATE_WAITING_TO_FIRE_INVALIDATE_EVENT; - - function FlushRendering() { - var anyPendingPaintsGeneratedInDescendants = false; +function FlushRendering() { + var anyPendingPaintsGeneratedInDescendants = false; - function flushWindow(win) { - var utils = win.QueryInterface(CI.nsIInterfaceRequestor) - .getInterface(CI.nsIDOMWindowUtils); - var afterPaintWasPending = utils.isMozAfterPaintPending; + function flushWindow(win) { + var utils = win.QueryInterface(CI.nsIInterfaceRequestor) + .getInterface(CI.nsIDOMWindowUtils); + var afterPaintWasPending = utils.isMozAfterPaintPending; + if (win.document.documentElement) { try { // Flush pending restyles and reflows for this window win.document.documentElement.getBoundingClientRect(); } catch (e) { LogWarning("flushWindow failed: " + e + "\n"); } + } - if (!afterPaintWasPending && utils.isMozAfterPaintPending) { - LogInfo("FlushRendering generated paint for window " + win.location.href); - anyPendingPaintsGeneratedInDescendants = true; - } + if (!afterPaintWasPending && utils.isMozAfterPaintPending) { + LogInfo("FlushRendering generated paint for window " + win.location.href); + anyPendingPaintsGeneratedInDescendants = true; + } - for (var i = 0; i < win.frames.length; ++i) { - flushWindow(win.frames[i]); - } + for (var i = 0; i < win.frames.length; ++i) { + flushWindow(win.frames[i]); } + } - flushWindow(content); + flushWindow(content); - if (anyPendingPaintsGeneratedInDescendants && - !windowUtils().isMozAfterPaintPending) { - LogWarning("Internal error: descendant frame generated a MozAfterPaint event, but the root document doesn't have one!"); - } + if (anyPendingPaintsGeneratedInDescendants && + !windowUtils().isMozAfterPaintPending) { + LogWarning("Internal error: descendant frame generated a MozAfterPaint event, but the root document doesn't have one!"); } +} + +function WaitForTestEnd(contentRootElement, inPrintMode, spellCheckedElements) { + var stopAfterPaintReceived = false; + var currentDoc = content.document; + var state = STATE_WAITING_TO_FIRE_INVALIDATE_EVENT; function AfterPaintListener(event) { LogInfo("AfterPaintListener in " + event.target.document.location.href); @@ -541,6 +543,9 @@ function OnDocumentLoad(event) var contentRootElement = content.document ? content.document.documentElement : null; + // Flush the document in case it got modified in a load event handler. + FlushRendering(); + // Take a snapshot now. We need to do this before we check whether // we should wait, since this might trigger dispatching of // MozPaintWait events and make shouldWaitForExplicitPaintWaiters() true
1 0
0 0
[tor-browser/esr24] Bug 995603 - Ensure mouse-enter/exit events are sent to plugins as appropriate. r=mstange a=abillings
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 94b845556474e198effe7a2d6fe7e1bc0bd1f729 Author: Steven Michaud <smichaud(a)pobox.com> Date: Wed Jun 18 11:13:35 2014 -0500 Bug 995603 - Ensure mouse-enter/exit events are sent to plugins as appropriate. r=mstange a=abillings --- content/events/src/nsContentEventHandler.cpp | 25 ++++++-- content/events/src/nsContentEventHandler.h | 2 +- widget/cocoa/nsChildView.mm | 81 +++++++++----------------- widget/cocoa/nsCocoaWindow.h | 3 - widget/cocoa/nsCocoaWindow.mm | 30 ---------- 5 files changed, 48 insertions(+), 93 deletions(-) diff --git a/content/events/src/nsContentEventHandler.cpp b/content/events/src/nsContentEventHandler.cpp index 8b151cb..e989535 100644 --- a/content/events/src/nsContentEventHandler.cpp +++ b/content/events/src/nsContentEventHandler.cpp @@ -44,11 +44,8 @@ nsContentEventHandler::nsContentEventHandler( } nsresult -nsContentEventHandler::InitCommon() +nsContentEventHandler::InitBasic() { - if (mSelection) - return NS_OK; - NS_ENSURE_TRUE(mPresShell, NS_ERROR_NOT_AVAILABLE); // If text frame which has overflowing selection underline is dirty, @@ -58,11 +55,24 @@ nsContentEventHandler::InitCommon() // Flushing notifications can cause mPresShell to be destroyed (bug 577963). NS_ENSURE_TRUE(!mPresShell->IsDestroying(), NS_ERROR_FAILURE); + return NS_OK; +} + +nsresult +nsContentEventHandler::InitCommon() +{ + if (mSelection) { + return NS_OK; + } + + nsresult rv = InitBasic(); + NS_ENSURE_SUCCESS(rv, rv); + nsCopySupport::GetSelectionForCopy(mPresShell->GetDocument(), getter_AddRefs(mSelection)); nsCOMPtr<nsIDOMRange> firstRange; - nsresult rv = mSelection->GetRangeAt(0, getter_AddRefs(firstRange)); + rv = mSelection->GetRangeAt(0, getter_AddRefs(firstRange)); // This shell doesn't support selection. if (NS_FAILED(rv)) return NS_ERROR_NOT_AVAILABLE; @@ -860,10 +870,13 @@ nsContentEventHandler::OnQueryCharacterAtPoint(nsQueryContentEvent* aEvent) nsresult nsContentEventHandler::OnQueryDOMWidgetHittest(nsQueryContentEvent* aEvent) { - nsresult rv = Init(aEvent); + NS_ASSERTION(aEvent, "aEvent must not be null"); + + nsresult rv = InitBasic(); if (NS_FAILED(rv)) return rv; + aEvent->mSucceeded = false; aEvent->mReply.mWidgetIsHit = false; NS_ENSURE_TRUE(aEvent->widget, NS_ERROR_FAILURE); diff --git a/content/events/src/nsContentEventHandler.h b/content/events/src/nsContentEventHandler.h index 4c4f492..1624d35 100644 --- a/content/events/src/nsContentEventHandler.h +++ b/content/events/src/nsContentEventHandler.h @@ -66,7 +66,7 @@ protected: nsresult Init(nsQueryContentEvent* aEvent); nsresult Init(nsSelectionEvent* aEvent); - // InitCommon() is called from each Init(). + nsresult InitBasic(); nsresult InitCommon(); public: diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm index aef01c7..9d99be9 100644 --- a/widget/cocoa/nsChildView.mm +++ b/widget/cocoa/nsChildView.mm @@ -2790,6 +2790,34 @@ NSEvent* gLastDragMouseDownEvent = nil; return mIsPluginView; } +- (NSView *)hitTest:(NSPoint)aPoint +{ + NSView* target = [super hitTest:aPoint]; + NSWindow *window = [self window]; + if (window && (target == self) && [self isPluginView] && mGeckoChild) { + nsAutoRetainCocoaObject kungFuDeathGrip(self); + + NSPoint windowLoc = [[self superview] convertPoint:aPoint toView:nil]; + NSPoint screenLoc = [window convertBaseToScreen:windowLoc]; + screenLoc.y = nsCocoaUtils::FlippedScreenY(screenLoc.y); + nsIntPoint widgetLoc = mGeckoChild->CocoaPointsToDevPixels(screenLoc) - + mGeckoChild->WidgetToScreenOffset(); + + nsQueryContentEvent hitTest(true, NS_QUERY_DOM_WIDGET_HITTEST, + mGeckoChild); + hitTest.InitForQueryDOMWidgetHittest(widgetLoc); + // This might destroy our widget. + mGeckoChild->DispatchWindowEvent(hitTest); + if (!mGeckoChild) { + return nil; + } + if (hitTest.mSucceeded && !hitTest.mReply.mWidgetIsHit) { + return nil; + } + } + return target; +} + // Are we processing an NSLeftMouseDown event that will fail to click through? // If so, we shouldn't focus or unfocus a plugin. - (BOOL)isInFailingLeftClickThrough @@ -4913,65 +4941,12 @@ static int32_t RoundUp(double aDouble) return !mGeckoChild->DispatchWindowEvent(geckoEvent); } -// Don't focus a plugin if the user has clicked on a DOM element above it. -// In this case the user has actually clicked on the plugin's ChildView -// (underneath the non-plugin DOM element). But we shouldn't allow the -// ChildView to be focused. See bug 627649. -- (BOOL)currentEventShouldFocusPlugin -{ - if (!mGeckoChild) - return NO; - - NSEvent* currentEvent = [NSApp currentEvent]; - if ([currentEvent type] != NSLeftMouseDown) - return YES; - - nsAutoRetainCocoaObject kungFuDeathGrip(self); - - // hitTest needs coordinates in device pixels - NSPoint eventLoc = nsCocoaUtils::ScreenLocationForEvent(currentEvent); - eventLoc.y = nsCocoaUtils::FlippedScreenY(eventLoc.y); - nsIntPoint widgetLoc = mGeckoChild->CocoaPointsToDevPixels(eventLoc) - - mGeckoChild->WidgetToScreenOffset(); - - nsQueryContentEvent hitTest(true, NS_QUERY_DOM_WIDGET_HITTEST, mGeckoChild); - hitTest.InitForQueryDOMWidgetHittest(widgetLoc); - // This might destroy our widget (and null out mGeckoChild). - mGeckoChild->DispatchWindowEvent(hitTest); - if (!mGeckoChild) - return NO; - if (hitTest.mSucceeded && !hitTest.mReply.mWidgetIsHit) - return NO; - - return YES; -} - -// Don't focus a plugin if we're in a left click-through that will fail (see -// [ChildView isInFailingLeftClickThrough] above). -- (BOOL)shouldFocusPlugin:(BOOL)getFocus -{ - if (!mGeckoChild) - return NO; - - nsCocoaWindow* windowWidget = mGeckoChild->GetXULWindowWidget(); - if (windowWidget && !windowWidget->ShouldFocusPlugin()) - return NO; - - if (getFocus && ![self currentEventShouldFocusPlugin]) - return NO; - - return YES; -} - // Returns NO if the plugin shouldn't be focused/unfocused. - (BOOL)updatePluginFocusStatus:(BOOL)getFocus { if (!mGeckoChild) return NO; - if (![self shouldFocusPlugin:getFocus]) - return NO; - if (mPluginEventModel == NPEventModelCocoa) { nsPluginEvent pluginEvent(true, NS_PLUGIN_FOCUS_EVENT, mGeckoChild); NPCocoaEvent cocoaEvent; diff --git a/widget/cocoa/nsCocoaWindow.h b/widget/cocoa/nsCocoaWindow.h index ac434e0..dc5994671 100644 --- a/widget/cocoa/nsCocoaWindow.h +++ b/widget/cocoa/nsCocoaWindow.h @@ -316,9 +316,6 @@ public: void SetPopupWindowLevel(); - bool IsChildInFailingLeftClickThrough(NSView *aChild); - bool ShouldFocusPlugin(); - NS_IMETHOD ReparentNativeWidget(nsIWidget* aNewParent); protected: diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm index b95c072..b435155 100644 --- a/widget/cocoa/nsCocoaWindow.mm +++ b/widget/cocoa/nsCocoaWindow.mm @@ -2051,36 +2051,6 @@ void nsCocoaWindow::SetPopupWindowLevel() } } -bool nsCocoaWindow::IsChildInFailingLeftClickThrough(NSView *aChild) -{ - if ([aChild isKindOfClass:[ChildView class]]) { - ChildView* childView = (ChildView*) aChild; - if ([childView isInFailingLeftClickThrough]) - return true; - } - NSArray* subviews = [aChild subviews]; - if (subviews) { - NSUInteger count = [subviews count]; - for (NSUInteger i = 0; i < count; ++i) { - NSView* aView = (NSView*) [subviews objectAtIndex:i]; - if (IsChildInFailingLeftClickThrough(aView)) - return true; - } - } - return false; -} - -// Don't focus a plugin if we're in a left click-through that will -// fail (see [ChildView isInFailingLeftClickThrough]). Called from -// [ChildView shouldFocusPlugin]. -bool nsCocoaWindow::ShouldFocusPlugin() -{ - if (!mWindow || IsChildInFailingLeftClickThrough([mWindow contentView])) - return false; - - return true; -} - NS_IMETHODIMP nsCocoaWindow::NotifyIME(NotificationToIME aNotification) {
1 0
0 0
[tor-browser/esr24] Bug 1019684 - Appease the style checker gods. r=jandem, a=orange
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 64e0c800366410debf70f1a9cf9f7ccc6c2490f0 Author: Ryan VanderMeulen <ryanvm(a)gmail.com> Date: Tue Jun 17 15:35:16 2014 -0400 Bug 1019684 - Appease the style checker gods. r=jandem, a=orange --- js/src/jit/arm/Assembler-arm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/src/jit/arm/Assembler-arm.h b/js/src/jit/arm/Assembler-arm.h index 1bc314a..e8a4442 100644 --- a/js/src/jit/arm/Assembler-arm.h +++ b/js/src/jit/arm/Assembler-arm.h @@ -11,6 +11,8 @@ #include "mozilla/MathAlgorithms.h" #include "mozilla/Util.h" +#include "jsprf.h" + #include "jit/shared/Assembler-shared.h" #include "assembler/assembler/AssemblerBufferWithConstantPool.h" #include "jit/CompactBuffer.h" @@ -18,8 +20,6 @@ #include "jit/arm/Architecture-arm.h" #include "jit/shared/IonAssemblerBufferWithConstantPools.h" -#include "jsprf.h" - namespace js { namespace jit {
1 0
0 0
[tor-browser/esr24] Bug 991981 - Followup fix for ESR24 to properly init TypedArray structs using the provided obj in the constructor, rather than requiring Init to be called after construction. r=bz, a=bustage
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit f7c724ad36208605421c24caac2ef8eef7b0860e Author: Jeff Walden <jwalden(a)mit.edu> Date: Mon Jun 2 17:45:05 2014 -0700 Bug 991981 - Followup fix for ESR24 to properly init TypedArray structs using the provided obj in the constructor, rather than requiring Init to be called after construction. r=bz, a=bustage --- dom/bindings/TypedArray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dom/bindings/TypedArray.h b/dom/bindings/TypedArray.h index c7c2bbd..62343c2 100644 --- a/dom/bindings/TypedArray.h +++ b/dom/bindings/TypedArray.h @@ -24,12 +24,12 @@ template<typename T, void GetLengthAndData(JSObject*, uint32_t*, T**)> struct TypedArray_base { TypedArray_base(JSObject* obj) - : mObj(obj), + : mObj(NULL), mData(NULL), mLength(0), mComputed(false) { - MOZ_ASSERT(obj != NULL); + Init(obj); } private:
1 0
0 0
[tor-browser/esr24] No bug, Automated HSTS preload list update from host bld-linux64-spot-326 - a=hsts-update
by mikeperry@torproject.org 29 Aug '14

29 Aug '14
commit 9fca388d6ff39694480dbb2f356fd6f3f97d190d Author: ffxbld <none@none> Date: Sat May 31 03:13:45 2014 -0700 No bug, Automated HSTS preload list update from host bld-linux64-spot-326 - a=hsts-update --- security/manager/boot/src/nsSTSPreloadList.errors | 7 ++++--- security/manager/boot/src/nsSTSPreloadList.inc | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/security/manager/boot/src/nsSTSPreloadList.errors b/security/manager/boot/src/nsSTSPreloadList.errors index 831c969..f04dcfb 100644 --- a/security/manager/boot/src/nsSTSPreloadList.errors +++ b/security/manager/boot/src/nsSTSPreloadList.errors @@ -10,6 +10,7 @@ api.simple.com: did not receive HSTS header apis.google.com: did not receive HSTS header app.lookout.com: could not connect to host appengine.google.com: did not receive HSTS header +appseccalifornia.org: could not connect to host bassh.net: did not receive HSTS header bcrook.com: max-age too low: 86400 betnet.fr: could not connect to host @@ -24,10 +25,10 @@ checkout.google.com: did not receive HSTS header chrome-devtools-frontend.appspot.com: did not receive HSTS header chrome.google.com: did not receive HSTS header cloud.google.com: did not receive HSTS header -cloudns.com.au: could not connect to host code.google.com: did not receive HSTS header codereview.chromium.org: did not receive HSTS header crate.io: did not receive HSTS header +crbug.com: did not receive HSTS header crowdcurity.com: did not receive HSTS header crypto.is: did not receive HSTS header csawctf.poly.edu: did not receive HSTS header @@ -101,7 +102,7 @@ simon.butcher.name: max-age too low: 2629743 sites.google.com: did not receive HSTS header sol.io: could not connect to host souyar.de: could not connect to host -souyar.net: did not receive HSTS header +souyar.net: could not connect to host souyar.us: could not connect to host spreadsheets.google.com: did not receive HSTS header square.com: did not receive HSTS header @@ -115,7 +116,6 @@ talk.google.com: did not receive HSTS header talkgadget.google.com: did not receive HSTS header translate.googleapis.com: did not receive HSTS header uprotect.it: could not connect to host -usaa.com: did not receive HSTS header wallet.google.com: did not receive HSTS header webmail.mayfirst.org: did not receive HSTS header wepay.com: max-age too low: 2592000 @@ -126,6 +126,7 @@ www.elanex.biz: did not receive HSTS header www.gmail.com: did not receive HSTS header www.googlemail.com: did not receive HSTS header www.greplin.com: could not connect to host +www.intercom.io: did not receive HSTS header www.jitsi.org: did not receive HSTS header www.lastpass.com: did not receive HSTS header www.ledgerscope.net: did not receive HSTS header diff --git a/security/manager/boot/src/nsSTSPreloadList.inc b/security/manager/boot/src/nsSTSPreloadList.inc index 8266427..d2f42c6 100644 --- a/security/manager/boot/src/nsSTSPreloadList.inc +++ b/security/manager/boot/src/nsSTSPreloadList.inc @@ -8,7 +8,7 @@ /*****************************************************************************/ #include "mozilla/StandardInteger.h" -const PRTime gPreloadListExpirationTime = INT64_C(1411812354538000); +const PRTime gPreloadListExpirationTime = INT64_C(1412417180147000); class nsSTSPreload { @@ -122,6 +122,7 @@ static const nsSTSPreload kSTSPreloadList[] = { { "mailbox.org", false }, { "makeyourlaws.org", true }, { "manage.zenpayroll.com", false }, + { "manageprojects.com", true }, { "manager.linode.com", false }, { "matteomarescotti.name", true }, { "mattmccutchen.net", true }, @@ -187,11 +188,14 @@ static const nsSTSPreload kSTSPreloadList[] = { { "surkatty.org", true }, { "tent.io", true }, { "therapynotes.com", false }, + { "tinfoilsecurity.com", false }, { "torproject.org", false }, { "twitter.com", false }, { "ubertt.org", true }, + { "usaa.com", false }, { "vmoagents.com", false }, { "w-spotlight.appspot.com", true }, + { "waveapps.com", true }, { "webfilings-eu-mirror.appspot.com", true }, { "webfilings-eu.appspot.com", true }, { "webfilings-mirror-hrd.appspot.com", true }, @@ -225,7 +229,6 @@ static const nsSTSPreload kSTSPreloadList[] = { { "www.gov.uk", false }, { "www.grc.com", false }, { "www.heliosnet.com", true }, - { "www.intercom.io", false }, { "www.irccloud.com", false }, { "www.linode.com", false }, { "www.lookout.com", false }, @@ -238,6 +241,7 @@ static const nsSTSPreload kSTSPreloadList[] = { { "www.simbolo.co.uk", false }, { "www.simple.com", false }, { "www.therapynotes.com", false }, + { "www.tinfoilsecurity.com", false }, { "www.torproject.org", false }, { "www.twitter.com", false }, { "www.usaa.com", false },
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 2005
  • 2006
  • 2007
  • 2008
  • 2009
  • 2010
  • 2011
  • ...
  • 2064
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.