diff -Nru thunderbird-45.2.0+build1/debian/changelog thunderbird-45.3.0+build1/debian/changelog --- thunderbird-45.2.0+build1/debian/changelog 2016-07-04 14:33:06.000000000 +0000 +++ thunderbird-45.3.0+build1/debian/changelog 2016-09-14 13:28:49.000000000 +0000 @@ -1,3 +1,10 @@ +thunderbird (1:45.3.0+build1-0ubuntu1) yakkety; urgency=medium + + * New upstream stable release (THUNDERBIRD_45_3_0_BUILD1) + - see USN-3073-1 + + -- Chris Coulson Wed, 31 Aug 2016 17:07:07 +0100 + thunderbird (1:45.2.0+build1-0ubuntu1) yakkety; urgency=medium * New upstream stable release (THUNDERBIRD_45_2_0_BUILD1) diff -Nru thunderbird-45.2.0+build1/l10n/changesets thunderbird-45.3.0+build1/l10n/changesets --- thunderbird-45.2.0+build1/l10n/changesets 2016-07-04 14:17:38.000000000 +0000 +++ thunderbird-45.3.0+build1/l10n/changesets 2016-08-31 15:53:28.000000000 +0000 @@ -1,58 +1,58 @@ -ar 2115:c41ee8a3a8eb -ast 1599:ba0d91940172 -be 2105:720e2784aaed -bg 1421:acf530e3bb68 -bn-BD 1344:ffbe15b2f4b6 -br 1715:ede2fc48fe13 -ca 2861:1b45ef56665e -cs 4588:62857ba441c2 -cy 1492:949033ee4c8a -da 2610:c09569c88302 -de 5344:e5e8bf7d4c0e -dsb 730:ecc692d8c14c -el 1569:5bec4595d615 -en-GB 2351:41fc2ecd1502 -es-AR 2957:2e73dc66bfef -es-ES 4627:a5a84450c2bf -et 2139:492db25f0977 -eu 1990:b7deea879fe1 -fi 2602:bfb45fd6df75 -fr 7605:6ed780a99b9b -fy-NL 2987:f6a8ce1463fd -ga-IE 2192:88732afdddf7 -gd 2058:4d06a5ca00d1 -gl 3405:3f71b4140573 -he 1733:4904053598a1 -hr 2120:ad483399e96e -hsb 883:f2487bc0e157 -hu 2917:1ed7dd27400d -hy-AM 1633:ac0eb6b89b00 -id 2051:1e90f798642a -is 1761:f170de67fa88 -it 6786:c1b4b22a7cdf -ja 2800:19d1bc23e809 -ja-JP-mac 2307:5b730c977b9a -ko 2365:0a2af0d26667 -lt 3438:ea03829146e7 -nb-NO 3086:c911052f454a -nl 5978:a931f614ca78 -nn-NO 1771:e932c1c6d3d8 -pa-IN 2169:2819262c1fa7 -pl 8770:da33534a7078 -pt-BR 2685:e9962d8ce331 -pt-PT 5446:6b6156a8a0e9 -rm 1682:b230226dbb58 -ro 2331:bb56e19bc195 -ru 4543:262fee1c6948 -si 1507:89ca74955226 -sk 4313:8f3b608ae7bf -sl 2802:b58b03ef4a5a -sq 2309:7d3cc6bc3e80 -sr 1493:127e0b68beea -sv-SE 5150:e3a3f67dfcb6 -ta-LK 699:757b030c0b2a -tr 2658:cfbed1353e05 -uk 3487:510702f03920 -vi 1196:3a112a93429c -zh-CN 2798:9f93443283c9 -zh-TW 3034:67d152161d61 +ar 2148:a75db47456f0 +ast 1642:b22e4583c518 +be 2123:bb38a201a856 +bg 1432:b204fdaec12c +bn-BD 1354:f38e1c73d512 +br 1755:64829c521955 +ca 2897:15890d99b259 +cs 4630:d664fea3da25 +cy 1534:b2d635212b32 +da 2654:c84f0730e8a7 +de 5401:3d1feefc10f8 +dsb 778:70cd5ed53804 +el 1609:2463c30fe592 +en-GB 2376:7bbceccadcde +es-AR 3002:e699958dbcc6 +es-ES 4690:d54c79018f9d +et 2176:42326b6f4867 +eu 2029:a45a3df8de63 +fi 2643:97c20a4f2c0f +fr 7675:7f493be6fcf6 +fy-NL 3049:8f2c5b254006 +ga-IE 2232:be3779fc334e +gd 2091:5008c84879a8 +gl 3431:96dbab977b4a +he 1744:3faffb6ccf03 +hr 2146:861cf864b93a +hsb 932:432b616c7412 +hu 2970:7439012e7e9b +hy-AM 1662:9d618b36cd88 +id 2084:e659029c0334 +is 1802:5f609dbaefb0 +it 6977:864526180424 +ja 2833:e9cc70a32c31 +ja-JP-mac 2331:697098b135dd +ko 2396:6abc03c7a7eb +lt 3492:fef7ebc0de40 +nb-NO 3131:a8c2237513e1 +nl 6023:229da0cb9efd +nn-NO 1876:417c51a869c8 +pa-IN 2201:f13da5f99cc0 +pl 8975:6d312c370a6c +pt-BR 2740:df193ae347bb +pt-PT 5544:f6fc435457ff +rm 1707:d96e9634c091 +ro 2376:b2da443deacb +ru 4596:a87310e1d529 +si 1521:405c8bc94a23 +sk 4365:b39d66d2ebc2 +sl 2842:b53d46f32e56 +sq 2325:61dd71831c46 +sr 1539:83be71881f66 +sv-SE 5195:6703f931de53 +ta-LK 700:3741b1142815 +tr 2700:2fc8d638ccce +uk 3539:a08266a8ecbc +vi 1209:f122b4e58082 +zh-CN 2843:64fe3e72b3e8 +zh-TW 3059:61c81c40be7e diff -Nru thunderbird-45.2.0+build1/mail/app/blocklist.xml thunderbird-45.3.0+build1/mail/app/blocklist.xml --- thunderbird-45.2.0+build1/mail/app/blocklist.xml 2016-07-04 14:02:34.000000000 +0000 +++ thunderbird-45.3.0+build1/mail/app/blocklist.xml 2016-08-31 15:38:16.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -73,8 +73,8 @@ - - + + @@ -150,6 +150,12 @@ + + + + + + @@ -467,12 +473,6 @@ - - - - - - @@ -735,6 +735,12 @@ + + + + + + @@ -928,7 +934,7 @@ - + @@ -1588,6 +1594,12 @@ + + + + + + @@ -2140,7 +2152,7 @@ - + @@ -2160,6 +2172,12 @@ + + + + + + @@ -3000,33 +3018,69 @@ https://get.adobe.com/flashplayer/ + + + https://get.adobe.com/flashplayer/ + + + + https://get.adobe.com/flashplayer/ + + + + https://get.adobe.com/flashplayer/ + + + + https://get.adobe.com/reader + + + + https://get.adobe.com/reader + + + + https://get.adobe.com/reader + + + + https://get.adobe.com/flashplayer/ + + + + https://get.adobe.com/flashplayer/ + + + + https://get.adobe.com/flashplayer/ + WINNT 6.1 0x10de 0x0a6c - DIRECT2D BLOCKED_DRIVER_VERSION 8.17.12.5896 LESS_THAN_OR_EQUAL + DIRECT2D BLOCKED_DRIVER_VERSION 8.17.12.5896 LESS_THAN_OR_EQUAL WINNT 6.1 0x10de 0x0a6c - DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 8.17.12.5896 LESS_THAN_OR_EQUAL - WINNT 5.1 0x10de DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 7.0.0.0 GREATER_THAN_OR_EQUAL - All 0x1002 DIRECT2D BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL - All 0x1022 DIRECT2D BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL - All 0x1022 DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL - All 0x1002 DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL - WINNT 6.2 0x1002 DIRECT2D BLOCKED_DRIVER_VERSION 9.10.8.0 LESS_THAN_OR_EQUAL - WINNT 6.2 0x1022 DIRECT2D BLOCKED_DRIVER_VERSION 9.10.8.0 LESS_THAN_OR_EQUAL - Darwin 10 0x10de WEBGL_MSAA BLOCKED_DEVICE - Darwin 11 0x10de WEBGL_MSAA BLOCKED_DEVICE - Darwin 12 0x10de WEBGL_MSAA BLOCKED_DEVICE - Darwin 10 0x8086 WEBGL_MSAA BLOCKED_DEVICE - Darwin 11 0x8086 WEBGL_MSAA BLOCKED_DEVICE - Darwin 12 0x8086 WEBGL_MSAA BLOCKED_DEVICE - Darwin 10 0x1002 WEBGL_MSAA BLOCKED_DEVICE - Darwin 11 0x1002 WEBGL_MSAA BLOCKED_DEVICE - Darwin 12 0x1002 WEBGL_MSAA BLOCKED_DEVICE + DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 8.17.12.5896 LESS_THAN_OR_EQUAL + WINNT 5.1 0x10de DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 7.0.0.0 GREATER_THAN_OR_EQUAL + All 0x1002 DIRECT2D BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL + All 0x1022 DIRECT2D BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL + All 0x1022 DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL + All 0x1002 DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 8.982.0.0 EQUAL + WINNT 6.2 0x1002 DIRECT2D BLOCKED_DRIVER_VERSION 9.10.8.0 LESS_THAN_OR_EQUAL + WINNT 6.2 0x1022 DIRECT2D BLOCKED_DRIVER_VERSION 9.10.8.0 LESS_THAN_OR_EQUAL + Darwin 10 0x10de WEBGL_MSAA BLOCKED_DEVICE + Darwin 11 0x10de WEBGL_MSAA BLOCKED_DEVICE + Darwin 12 0x10de WEBGL_MSAA BLOCKED_DEVICE + Darwin 10 0x8086 WEBGL_MSAA BLOCKED_DEVICE + Darwin 11 0x8086 WEBGL_MSAA BLOCKED_DEVICE + Darwin 12 0x8086 WEBGL_MSAA BLOCKED_DEVICE + Darwin 10 0x1002 WEBGL_MSAA BLOCKED_DEVICE + Darwin 11 0x1002 WEBGL_MSAA BLOCKED_DEVICE + Darwin 12 0x1002 WEBGL_MSAA BLOCKED_DEVICE WINNT 6.1 0x1002 0x9802 0x9803 @@ -3036,7 +3090,7 @@ 0x9806 0x9807 - DIRECT2D BLOCKED_DEVICE + DIRECT2D BLOCKED_DEVICE WINNT 6.1 0x1002 0x9802 0x9803 @@ -3046,8 +3100,8 @@ 0x9806 0x9807 - DIRECT3D_9_LAYERS BLOCKED_DEVICE - WINNT 5.1 0x8086 DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 6.14.10.5218 LESS_THAN + DIRECT3D_9_LAYERS BLOCKED_DEVICE + WINNT 5.1 0x8086 DIRECT3D_9_LAYERS BLOCKED_DRIVER_VERSION 6.14.10.5218 LESS_THAN WINNT 10.0 0x1002 0x6920 0x6921 @@ -3070,8 +3124,8 @@ 0x9876 0x9877 - DIRECT2D BLOCKED_DRIVER_VERSION 15.201.1151.0 LESS_THAN - All 0x8086 DIRECT2D BLOCKED_DRIVER_VERSION 8.15.10.2413 LESS_THAN_OR_EQUAL + DIRECT2D BLOCKED_DRIVER_VERSION 15.201.1151.0 LESS_THAN + All 0x8086 DIRECT2D BLOCKED_DRIVER_VERSION 8.15.10.2413 LESS_THAN_OR_EQUAL WINNT 8.1 0x1002 0x6920 0x6921 @@ -3094,8 +3148,7 @@ 0x9876 0x9877 - DIRECT2D BLOCKED_DRIVER_VERSION 15.201.1151.0 LESS_THAN - WINNT 5.1 0x8086 WEBGL_ANGLE BLOCKED_DRIVER_VERSION 6.14.10.5218 LESS_THAN + DIRECT2D BLOCKED_DRIVER_VERSION 15.201.1151.0 LESS_THAN All 0x8086 0x2a42 0x2e22 @@ -3103,7 +3156,7 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.1851 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.1851 EQUAL All 0x8086 0x2a42 0x2e22 @@ -3111,7 +3164,7 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.1855 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.1855 EQUAL All 0x8086 0x2a42 0x2e22 @@ -3119,7 +3172,7 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.1872 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.1872 EQUAL All 0x8086 0x2a42 0x2e22 @@ -3127,7 +3180,7 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.1883 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.1883 EQUAL All 0x8086 0x2a42 0x2e22 @@ -3135,7 +3188,7 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.1892 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.1892 EQUAL All 0x8086 0x2a42 0x2e22 @@ -3143,7 +3196,7 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.1994 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.1994 EQUAL All 0x8086 0x2a42 0x2e22 @@ -3151,14 +3204,15 @@ 0x2e32 0x0046 - BLOCKED_DRIVER_VERSION 8.15.10.2086 EQUAL - WINNT 5.1 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL - WINNT 5.2 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL - WINNT 6.0 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL - WINNT 6.1 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL - WINNT 6.2 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL - WINNT 6.3 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL - WINNT 10.0 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + BLOCKED_DRIVER_VERSION 8.15.10.2086 EQUAL + WINNT 5.1 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 5.2 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 6.0 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 6.1 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 6.2 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 6.3 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 10.0 0x8086 HARDWARE_VIDEO_DECODING BLOCKED_DRIVER_VERSION 10.18.10.3947 EQUAL + WINNT 5.1 0x8086 WEBGL_ANGLE BLOCKED_DRIVER_VERSION 6.14.10.5218 LESS_THAN @@ -3180,10 +3234,10 @@ ATE0vw== - + ATFpsA== - + ATFEdg== @@ -3501,6 +3555,54 @@ NvEJoRYL2yvAZrAjbDIipQ== + + fWK0j/Vi8vNWg3VAGjc02w== + + + UUFV3S2cUidOOv7ESN65Ng== + + + bzTw0uq05TUYEGS98bh0Ww== + + + GtXUVojhwOTkaQ4bTKblEQ== + + + BYyEX2b5+K+myAIR7eXaRQ== + + + VN2yeFexyXjPf34fHGmbhg== + + + A9GPKQ8jv9oIxfwiOy7qxQ== + + + J2La+q+JOURNWkX60OP2lQ== + + + Ermwxw== + + + cXXMzbWDHMIdCotb3h64yw== + + + BA== + + + BQ== + + + Bg== + + + EA== + + + EQ== + + + Eg== + diff -Nru thunderbird-45.2.0+build1/mail/base/content/SearchDialog.js thunderbird-45.3.0+build1/mail/base/content/SearchDialog.js --- thunderbird-45.2.0+build1/mail/base/content/SearchDialog.js 2016-07-04 14:02:33.000000000 +0000 +++ thunderbird-45.3.0+build1/mail/base/content/SearchDialog.js 2016-08-31 15:38:14.000000000 +0000 @@ -243,7 +243,8 @@ gFolderDisplay.setColumnStates({ subjectCol: { visible: true }, - correspondentCol: { visible: true }, + correspondentCol: { visible: Services.prefs.getBoolPref("mail.threadpane.use_correspondents") }, + senderCol: { visible: !Services.prefs.getBoolPref("mail.threadpane.use_correspondents") }, dateCol: { visible: true }, locationCol: { visible: true }, }); diff -Nru thunderbird-45.2.0+build1/mail/components/compose/content/addressingWidgetOverlay.js thunderbird-45.3.0+build1/mail/components/compose/content/addressingWidgetOverlay.js --- thunderbird-45.2.0+build1/mail/components/compose/content/addressingWidgetOverlay.js 2016-07-04 14:02:33.000000000 +0000 +++ thunderbird-45.3.0+build1/mail/components/compose/content/addressingWidgetOverlay.js 2016-08-31 15:38:14.000000000 +0000 @@ -171,7 +171,7 @@ let headerName = awGetPopupElement(i).selectedItem.getAttribute("label"); headerName = headerName.substring(0, headerName.indexOf(':')); - msgCompFields.setHeader(headerName, fieldValue); + msgCompFields.setRawHeader(headerName, fieldValue, null); break; } } diff -Nru thunderbird-45.2.0+build1/mail/components/compose/content/MsgComposeCommands.js thunderbird-45.3.0+build1/mail/components/compose/content/MsgComposeCommands.js --- thunderbird-45.2.0+build1/mail/components/compose/content/MsgComposeCommands.js 2016-07-04 14:02:33.000000000 +0000 +++ thunderbird-45.3.0+build1/mail/components/compose/content/MsgComposeCommands.js 2016-08-31 15:38:14.000000000 +0000 @@ -2295,7 +2295,10 @@ identityList.selectedItem = identityList.getElementsByAttribute("identitykey", params.identity.key)[0]; - if (params.composeFields.from) + + // Here we set the From from the original message, be it a draft or another + // message we want to "edit as new". Only do this for drafts. + if (gComposeType == nsIMsgCompType.Draft && params.composeFields.from) { let from = MailServices.headerParser.parseEncodedHeader(params.composeFields.from, null).join(", "); if (from != identityList.value) diff -Nru thunderbird-45.2.0+build1/mail/config/version.txt thunderbird-45.3.0+build1/mail/config/version.txt --- thunderbird-45.2.0+build1/mail/config/version.txt 2016-07-04 14:02:34.000000000 +0000 +++ thunderbird-45.3.0+build1/mail/config/version.txt 2016-08-31 15:38:16.000000000 +0000 @@ -1 +1 @@ -45.2.0 +45.3.0 diff -Nru thunderbird-45.2.0+build1/mailnews/compose/src/nsMsgCompose.cpp thunderbird-45.3.0+build1/mailnews/compose/src/nsMsgCompose.cpp --- thunderbird-45.2.0+build1/mailnews/compose/src/nsMsgCompose.cpp 2016-07-04 14:02:33.000000000 +0000 +++ thunderbird-45.3.0+build1/mailnews/compose/src/nsMsgCompose.cpp 2016-08-31 15:38:15.000000000 +0000 @@ -80,6 +80,7 @@ #include "nsISelection.h" #include "nsJSEnvironment.h" #include "nsIObserverService.h" +#include "nsIProtocolHandler.h" using namespace mozilla::mailnews; @@ -382,6 +383,24 @@ // do we care about anything besides images? nsAutoString objURL; image->GetSrc(objURL); + + // First we need to make sure that the URL is associated with a message + // protocol so we don't accidentally manipulate a URL like: + // http://www.site.com/retrieve.html?C=image.jpg. + nsCOMPtr ioService = do_GetService(NS_IOSERVICE_CONTRACTID, &rv); + NS_ENSURE_SUCCESS(rv, rv); + nsAutoCString scheme; + ioService->ExtractScheme(NS_ConvertUTF16toUTF8(objURL), scheme); + + // Detect message protocols where attachments can occur. + nsCOMPtr handler; + ioService->GetProtocolHandler(scheme.get(), getter_AddRefs(handler)); + if (!handler) + continue; + nsCOMPtr mailHandler = do_QueryInterface(handler); + if (!mailHandler) + continue; + // the objURL is the full path to the embedded content. We need // to update it with uri for the folder we just saved to, and the new // msg key. diff -Nru thunderbird-45.2.0+build1/mailnews/db/msgdb/src/nsMailDatabase.cpp thunderbird-45.3.0+build1/mailnews/db/msgdb/src/nsMailDatabase.cpp --- thunderbird-45.2.0+build1/mailnews/db/msgdb/src/nsMailDatabase.cpp 2016-07-04 14:02:33.000000000 +0000 +++ thunderbird-45.3.0+build1/mailnews/db/msgdb/src/nsMailDatabase.cpp 2016-08-31 15:38:15.000000000 +0000 @@ -109,8 +109,17 @@ return NS_OK; } nsCOMPtr msgStore; - if (!m_folder) - return NS_ERROR_NULL_POINTER; + if (!m_folder) { + // If the folder is not set, we just return without checking the validity + // of the summary file. For now, this is an expected condition when the + // message database is being opened from a URL in + // nsMailboxUrl::GetMsgHdrForKey() which calls + // nsMsgDBService::OpenMailDBFromFile() without a folder. + // Returning an error here would lead to the deletion of the MSF in the + // caller nsMsgDatabase::CheckForErrors(). + *aResult = true; + return NS_OK; + } nsresult rv = m_folder->GetMsgStore(getter_AddRefs(msgStore)); NS_ENSURE_SUCCESS(rv, rv); return msgStore->IsSummaryFileValid(m_folder, this, aResult); diff -Nru thunderbird-45.2.0+build1/mozilla/browser/base/content/tabbrowser.xml thunderbird-45.3.0+build1/mozilla/browser/base/content/tabbrowser.xml --- thunderbird-45.2.0+build1/mozilla/browser/base/content/tabbrowser.xml 2016-07-04 14:08:25.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/browser/base/content/tabbrowser.xml 2016-08-31 15:44:37.000000000 +0000 @@ -63,10 +63,6 @@ Components.classes["@mozilla.org/docshell/urifixup;1"] .getService(Components.interfaces.nsIURIFixup); - - Components.classes["@mozilla.org/browser/favicon-service;1"] - .getService(Components.interfaces.nsIFaviconService); - Components.classes["@mozilla.org/autocomplete/search;1?name=history"] .getService(Components.interfaces.mozIPlacesAutoComplete); @@ -75,9 +71,6 @@ Components.classes["@mozilla.org/autocomplete/search;1?name=unifiedcomplete"] .getService(Components.interfaces.mozIPlacesAutoComplete); - - (Components.utils.import("resource://gre/modules/PlacesUtils.jsm", {})).PlacesUtils; - (Components.utils.import("resource://gre/modules/AppConstants.jsm", {})).AppConstants; @@ -864,7 +857,7 @@ let browser = this.getBrowserForTab(aTab); browser.mIconURL = aURI instanceof Ci.nsIURI ? aURI.spec : aURI; - if (aURI && this.mFaviconService) { + if (aURI) { if (!(aURI instanceof Ci.nsIURI)) { aURI = makeURI(aURI); } @@ -874,12 +867,7 @@ let loadingPrincipal = aLoadingPrincipal ? aLoadingPrincipal : Services.scriptSecurityManager.getSystemPrincipal(); - let loadType = PrivateBrowsingUtils.isWindowPrivate(window) - ? this.mFaviconService.FAVICON_LOAD_PRIVATE - : this.mFaviconService.FAVICON_LOAD_NON_PRIVATE; - - this.mFaviconService.setAndFetchFaviconForPage( - browser.currentURI, aURI, false, loadType, null, loadingPrincipal); + PlacesUIUtils.loadFavicon(browser, loadingPrincipal, aURI); } let sizedIconUrl = browser.mIconURL || ""; @@ -952,12 +940,9 @@ diff -Nru thunderbird-45.2.0+build1/mozilla/browser/components/feeds/FeedWriter.js thunderbird-45.3.0+build1/mozilla/browser/components/feeds/FeedWriter.js --- thunderbird-45.2.0+build1/mozilla/browser/components/feeds/FeedWriter.js 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/browser/components/feeds/FeedWriter.js 2016-08-31 15:44:38.000000000 +0000 @@ -214,15 +214,6 @@ element.setAttribute(attribute, uri); }, - __faviconService: null, - get _faviconService() { - if (!this.__faviconService) - this.__faviconService = Cc["@mozilla.org/browser/favicon-service;1"]. - getService(Ci.nsIFaviconService); - - return this.__faviconService; - }, - __bundle: null, get _bundle() { if (!this.__bundle) { @@ -1023,7 +1014,6 @@ prefs.removeObserver(PREF_AUDIO_SELECTED_APP, this); this._removeFeedFromCache(); - this.__faviconService = null; this.__bundle = null; this._feedURI = null; @@ -1164,46 +1154,6 @@ } }, - /** - * Sets the icon for the given web-reader item in the readers menu. - * The icon is fetched and stored through the favicon service. - * - * @param aReaderUrl - * the reader url. - * @param aMenuItem - * the reader item in the readers menulist. - * - * @note For privacy reasons we cannot set the image attribute directly - * to the icon url. See Bug 358878 for details. - */ - _setFaviconForWebReader: - function FW__setFaviconForWebReader(aReaderUrl, aMenuItem) { - let readerURI = makeURI(aReaderUrl); - if (!/^https?$/.test(readerURI.scheme)) { - // Don't try to get a favicon for non http(s) URIs. - return; - } - let faviconURI = makeURI(readerURI.prePath + "/favicon.ico"); - let self = this; - let usePrivateBrowsing = this._window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShell) - .QueryInterface(Ci.nsILoadContext) - .usePrivateBrowsing; - let nullPrincipal = Cc["@mozilla.org/nullprincipal;1"] - .createInstance(Ci.nsIPrincipal); - this._faviconService.setAndFetchFaviconForPage(readerURI, faviconURI, false, - usePrivateBrowsing ? this._faviconService.FAVICON_LOAD_PRIVATE - : this._faviconService.FAVICON_LOAD_NON_PRIVATE, - function (aURI, aDataLen, aData, aMimeType) { - if (aDataLen > 0) { - let dataURL = "data:" + aMimeType + ";base64," + - btoa(String.fromCharCode.apply(null, aData)); - aMenuItem.setAttribute('image', dataURL); - } - }, nullPrincipal); - }, - get _mm() { let mm = this._window.QueryInterface(Ci.nsIInterfaceRequestor). getInterface(Ci.nsIDocShell). diff -Nru thunderbird-45.2.0+build1/mozilla/browser/components/places/PlacesUIUtils.jsm thunderbird-45.3.0+build1/mozilla/browser/components/places/PlacesUIUtils.jsm --- thunderbird-45.2.0+build1/mozilla/browser/components/places/PlacesUIUtils.jsm 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/browser/components/places/PlacesUIUtils.jsm 2016-08-31 15:44:38.000000000 +0000 @@ -12,6 +12,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); +Cu.import("resource://gre/modules/Timer.jsm"); Cu.import("resource://gre/modules/PlacesUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", @@ -37,6 +38,11 @@ XPCOMUtils.defineLazyModuleGetter(this, "Weave", "resource://services-sync/main.js"); +const gInContentProcess = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT; +const FAVICON_REQUEST_TIMEOUT = 60 * 1000; +// Map from windows to arrays of data about pending favicon loads. +let gFaviconLoadDataMap = new Map(); + // copied from utilityOverlay.js const TAB_DROP_TYPE = "application/x-moz-tabbrowser-tab"; @@ -77,6 +83,153 @@ return self.ids.has(aItemId); } +let InternalFaviconLoader = { + /** + * This gets called for every inner window that is destroyed. + * In the parent process, we process the destruction ourselves. In the child process, + * we notify the parent which will then process it based on that message. + */ + observe(subject, topic, data) { + let innerWindowID = subject.QueryInterface(Ci.nsISupportsPRUint64).data; + this.removeRequestsForInner(innerWindowID); + }, + + /** + * Actually cancel the request, and clear the timeout for cancelling it. + */ + _cancelRequest({uri, innerWindowID, timerID, callback}, reason) { + // Break cycle + let request = callback.request; + delete callback.request; + // Ensure we don't time out. + clearTimeout(timerID); + try { + request.cancel(); + } catch (ex) { + Cu.reportError("When cancelling a request for " + uri.spec + " because " + reason + ", it was already canceled!"); + } + }, + + /** + * Called for every inner that gets destroyed, only in the parent process. + */ + removeRequestsForInner(innerID) { + for (let [window, loadDataForWindow] of gFaviconLoadDataMap) { + let newLoadDataForWindow = loadDataForWindow.filter(loadData => { + let innerWasDestroyed = loadData.innerWindowID == innerID; + if (innerWasDestroyed) { + this._cancelRequest(loadData, "the inner window was destroyed or a new favicon was loaded for it"); + } + // Keep the items whose inner is still alive. + return !innerWasDestroyed; + }); + // Map iteration with for...of is safe against modification, so + // now just replace the old value: + gFaviconLoadDataMap.set(window, newLoadDataForWindow); + } + }, + + /** + * Called when a toplevel chrome window unloads. We use this to tidy up after ourselves, + * avoid leaks, and cancel any remaining requests. The last part should in theory be + * handled by the inner-window-destroyed handlers. We clean up just to be on the safe side. + */ + onUnload(win) { + let loadDataForWindow = gFaviconLoadDataMap.get(win); + if (loadDataForWindow) { + for (let loadData of loadDataForWindow) { + this._cancelRequest(loadData, "the chrome window went away"); + } + } + gFaviconLoadDataMap.delete(win); + }, + + /** + * Create a function to use as a nsIFaviconDataCallback, so we can remove cancelling + * information when the request succeeds. Note that right now there are some edge-cases, + * such as about: URIs with chrome:// favicons where the success callback is not invoked. + * This is OK: we will 'cancel' the request after the timeout (or when the window goes + * away) but that will be a no-op in such cases. + */ + _makeCompletionCallback(win, id) { + return { + onComplete(uri) { + let loadDataForWindow = gFaviconLoadDataMap.get(win); + if (loadDataForWindow) { + let itemIndex = loadDataForWindow.findIndex(loadData => { + return loadData.innerWindowID == id && + loadData.uri.equals(uri) && + loadData.callback.request == this.request; + }); + if (itemIndex != -1) { + let loadData = loadDataForWindow[itemIndex]; + clearTimeout(loadData.timerID); + loadDataForWindow.splice(itemIndex, 1); + } + } + delete this.request; + }, + }; + }, + + ensureInitialized() { + if (this._initialized) { + return; + } + this._initialized = true; + + Services.obs.addObserver(this, "inner-window-destroyed", false); + Services.ppmm.addMessageListener("Toolkit:inner-window-destroyed", msg => { + this.removeRequestsForInner(msg.data); + }); + }, + + loadFavicon(browser, principal, uri) { + this.ensureInitialized(); + let win = browser.ownerDocument.defaultView; + if (!gFaviconLoadDataMap.has(win)) { + gFaviconLoadDataMap.set(win, []); + let unloadHandler = event => { + let doc = event.target; + let eventWin = doc.defaultView; + if (eventWin == win) { + win.removeEventListener("unload", unloadHandler); + this.onUnload(win); + } + }; + win.addEventListener("unload", unloadHandler, true); + } + + let {innerWindowID, currentURI} = browser; + + // Immediately cancel any earlier requests + this.removeRequestsForInner(innerWindowID); + + // First we do the actual setAndFetch call: + let loadType = PrivateBrowsingUtils.isWindowPrivate(win) + ? PlacesUtils.favicons.FAVICON_LOAD_PRIVATE + : PlacesUtils.favicons.FAVICON_LOAD_NON_PRIVATE; + let callback = this._makeCompletionCallback(win, innerWindowID); + let request = PlacesUtils.favicons.setAndFetchFaviconForPage(currentURI, uri, false, + loadType, callback, principal); + + // Now register the result so we can cancel it if/when necessary. + if (!request) { + // The favicon service can return with success but no-op (and leave request + // as null) if the icon is the same as the page (e.g. for images) or if it is + // the favicon for an error page. In this case, we do not need to do anything else. + return; + } + callback.request = request; + let loadData = {innerWindowID, uri, callback}; + loadData.timerID = setTimeout(() => { + this._cancelRequest(loadData, "it timed out"); + }, FAVICON_REQUEST_TIMEOUT); + let loadDataForWindow = gFaviconLoadDataMap.get(win); + loadDataForWindow.push(loadData); + }, +}; + this.PlacesUIUtils = { ORGANIZER_LEFTPANE_VERSION: 7, ORGANIZER_FOLDER_ANNO: "PlacesOrganizer/OrganizerFolder", @@ -482,6 +635,19 @@ }, /** + * set and fetch a favicon. Can only be used from the parent process. + * @param browser {Browser} The XUL browser element for which we're fetching a favicon. + * @param principal {Principal} The loading principal to use for the fetch. + * @param uri {URI} The URI to fetch. + */ + loadFavicon(browser, principal, uri) { + if (gInContentProcess) { + throw new Error("Can't track loads from within the child process!"); + } + InternalFaviconLoader.loadFavicon(browser, principal, uri); + }, + + /** * Returns the closet ancestor places view for the given DOM node * @param aNode * a DOM node diff -Nru thunderbird-45.2.0+build1/mozilla/browser/config/version_display.txt thunderbird-45.3.0+build1/mozilla/browser/config/version_display.txt --- thunderbird-45.2.0+build1/mozilla/browser/config/version_display.txt 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/browser/config/version_display.txt 2016-08-31 15:44:38.000000000 +0000 @@ -1 +1 @@ -45.2.1esr +45.3.1 diff -Nru thunderbird-45.2.0+build1/mozilla/browser/config/version.txt thunderbird-45.3.0+build1/mozilla/browser/config/version.txt --- thunderbird-45.2.0+build1/mozilla/browser/config/version.txt 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/browser/config/version.txt 2016-08-31 15:44:38.000000000 +0000 @@ -1 +1 @@ -45.2.1esr +45.3.1 diff -Nru thunderbird-45.2.0+build1/mozilla/browser/modules/WindowsPreviewPerTab.jsm thunderbird-45.3.0+build1/mozilla/browser/modules/WindowsPreviewPerTab.jsm --- thunderbird-45.2.0+build1/mozilla/browser/modules/WindowsPreviewPerTab.jsm 2016-07-04 14:08:27.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/browser/modules/WindowsPreviewPerTab.jsm 2016-08-31 15:44:39.000000000 +0000 @@ -47,9 +47,11 @@ const Ci = Components.interfaces; const Cu = Components.utils; -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/NetUtil.jsm"); +Cu.import("resource://gre/modules/PlacesUtils.jsm"); Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm"); +Cu.import("resource://gre/modules/Services.jsm"); +Cu.import("resource://gre/modules/XPCOMUtils.jsm"); // Pref to enable/disable preview-per-tab const TOGGLE_PREF_NAME = "browser.taskbar.previews.enable"; @@ -68,9 +70,6 @@ XPCOMUtils.defineLazyServiceGetter(this, "imgTools", "@mozilla.org/image/tools;1", "imgITools"); -XPCOMUtils.defineLazyServiceGetter(this, "faviconSvc", - "@mozilla.org/browser/favicon-service;1", - "nsIFaviconService"); // nsIURI -> imgIContainer function _imageFromURI(doc, uri, privateMode, callback) { @@ -96,7 +95,7 @@ } catch (e) { // We failed, so use the default favicon (only if this wasn't the default // favicon). - let defaultURI = faviconSvc.defaultFavicon; + let defaultURI = PlacesUtils.favicons.defaultFavicon; if (!defaultURI.equals(uri)) _imageFromURI(doc, defaultURI, privateMode, callback); } @@ -105,10 +104,11 @@ // string? -> imgIContainer function getFaviconAsImage(doc, iconurl, privateMode, callback) { - if (iconurl) + if (iconurl) { _imageFromURI(doc, NetUtil.newURI(iconurl), privateMode, callback); - else - _imageFromURI(doc, faviconSvc.defaultFavicon, privateMode, callback); + } else { + _imageFromURI(doc, PlacesUtils.favicons.defaultFavicon, privateMode, callback); + } } // Snaps the given rectangle to be pixel-aligned at the given scale @@ -575,20 +575,43 @@ } }, + directRequestProtocols: new Set([ + "file", "chrome", "resource", "about" + ]), //// Browser progress listener onLinkIconAvailable: function (aBrowser, aIconURL) { - let self = this; + if (!aIconURL) { + return; + } + let tab = this.tabbrowser.getTabForBrowser(aBrowser); + let shouldRequestFaviconURL = true; + try { + urlObject = NetUtil.newURI(aIconURL); + shouldRequestFaviconURL = + !this.directRequestProtocols.has(urlObject.scheme); + } catch (ex) {} + + let requestURL = shouldRequestFaviconURL ? + "moz-anno:favicon:" + aIconURL : + aIconURL; + getFaviconAsImage( aBrowser.contentWindow.document, - aIconURL,PrivateBrowsingUtils.isWindowPrivate(this.win), - function (img) { - let index = self.tabbrowser.browsers.indexOf(aBrowser); - // Only add it if we've found the index. The tab could have closed! + requestURL, + PrivateBrowsingUtils.isWindowPrivate(this.win), + img => { + let index = this.tabbrowser.browsers.indexOf(aBrowser); + // Only add it if we've found the index and the URI is still the same. + // The tab could have closed, and there's no guarantee the icons + // will have finished fetching 'in order'. if (index != -1) { - let tab = self.tabbrowser.tabs[index]; - self.previews.get(tab).icon = img; + let tab = this.tabbrowser.tabs[index]; + if (tab.getAttribute("image") == aIconURL) { + this.previews.get(tab).icon = img; + } } - }); + } + ); } } @@ -632,6 +655,7 @@ this.prefs.addObserver(TOGGLE_PREF_NAME, this, false); this.prefs.addObserver(DISABLE_THRESHOLD_PREF_NAME, this, false); this.prefs.addObserver(CACHE_EXPIRATION_TIME_PREF_NAME, this, false); + PlacesUtils.history.addObserver(this, true); this.cacheLifespan = this.prefs.getIntPref(CACHE_EXPIRATION_TIME_PREF_NAME); @@ -730,7 +754,31 @@ }); break; } - } + }, + + /* nsINavHistoryObserver implementation */ + onBeginUpdateBatch() {}, + onEndUpdateBatch() {}, + onVisit() {}, + onTitleChanged() {}, + onFrecencyChanged() {}, + onManyFrecenciesChanged() {}, + onDeleteURI() {}, + onClearHistory() {}, + onDeleteVisits() {}, + onPageChanged(uri, changedConst, newValue) { + if (this._enabled && changedConst == Ci.nsINavHistoryObserver.ATTRIBUTE_FAVICON) { + for (let win of this.windows) { + for (let [tab, preview] of win.previews) { + if (tab.getAttribute("image") == newValue) { + win.onLinkIconAvailable(tab.linkedBrowser, newValue); + } + } + } + } + }, + + QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsINavHistoryObserver]), }; XPCOMUtils.defineLazyGetter(AeroPeek, "cacheTimer", () => diff -Nru thunderbird-45.2.0+build1/mozilla/config/milestone.txt thunderbird-45.3.0+build1/mozilla/config/milestone.txt --- thunderbird-45.2.0+build1/mozilla/config/milestone.txt 2016-07-04 14:08:46.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/config/milestone.txt 2016-08-31 15:45:00.000000000 +0000 @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -45.2.0 +45.3.0 diff -Nru thunderbird-45.2.0+build1/mozilla/configure.in thunderbird-45.3.0+build1/mozilla/configure.in --- thunderbird-45.2.0+build1/mozilla/configure.in 2016-07-04 14:08:28.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/configure.in 2016-08-31 15:44:40.000000000 +0000 @@ -2618,7 +2618,7 @@ dnl ======================================================== AC_HEADER_DIRENT case "$target_os" in -freebsd*|openbsd*) +bitrig*|dragonfly*|freebsd*|openbsd*) # for stuff like -lXshm CPPFLAGS="${CPPFLAGS} ${X_CFLAGS}" ;; diff -Nru thunderbird-45.2.0+build1/mozilla/devtools/shared/webconsole/test/common.js thunderbird-45.3.0+build1/mozilla/devtools/shared/webconsole/test/common.js --- thunderbird-45.2.0+build1/mozilla/devtools/shared/webconsole/test/common.js 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/devtools/shared/webconsole/test/common.js 2016-08-31 15:44:42.000000000 +0000 @@ -94,6 +94,9 @@ aState.dbgClient.attachTab(tab.actor, function (response, tabClient) { if (aAttachToWorker) { var worker = new Worker("console-test-worker.js"); + // Keep a strong reference to the Worker to avoid it being + // GCd during the test (bug 1237492). + aState._worker_ref = worker; worker.addEventListener("message", function listener() { worker.removeEventListener("message", listener); tabClient.listWorkers(function (response) { diff -Nru thunderbird-45.2.0+build1/mozilla/docshell/base/nsDocShell.cpp thunderbird-45.3.0+build1/mozilla/docshell/base/nsDocShell.cpp --- thunderbird-45.2.0+build1/mozilla/docshell/base/nsDocShell.cpp 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/docshell/base/nsDocShell.cpp 2016-08-31 15:44:42.000000000 +0000 @@ -132,6 +132,7 @@ #include "nsIStructuredCloneContainer.h" #ifdef MOZ_PLACES #include "nsIFaviconService.h" +#include "mozIPlacesPendingOperation.h" #include "mozIAsyncFavicons.h" #endif #include "nsINetworkPredictor.h" @@ -9325,11 +9326,12 @@ MOZ_ASSERT(aDataLen == 0, "We weren't expecting the callback to deliver data."); + nsCOMPtr po; return mSvc->SetAndFetchFaviconForPage( mNewURI, aFaviconURI, false, mInPrivateBrowsing ? nsIFaviconService::FAVICON_LOAD_PRIVATE : nsIFaviconService::FAVICON_LOAD_NON_PRIVATE, - nullptr, mLoadingPrincipal); + nullptr, mLoadingPrincipal, getter_AddRefs(po)); } private: diff -Nru thunderbird-45.2.0+build1/mozilla/dom/animation/DocumentTimeline.cpp thunderbird-45.3.0+build1/mozilla/dom/animation/DocumentTimeline.cpp --- thunderbird-45.2.0+build1/mozilla/dom/animation/DocumentTimeline.cpp 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/animation/DocumentTimeline.cpp 2016-08-31 15:44:42.000000000 +0000 @@ -17,8 +17,16 @@ namespace mozilla { namespace dom { -NS_IMPL_CYCLE_COLLECTION_INHERITED(DocumentTimeline, AnimationTimeline, - mDocument) +NS_IMPL_CYCLE_COLLECTION_CLASS(DocumentTimeline) +NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DocumentTimeline, + AnimationTimeline) + tmp->UnregisterFromRefreshDriver(); + NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocument) +NS_IMPL_CYCLE_COLLECTION_UNLINK_END +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(DocumentTimeline, + AnimationTimeline) + NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocument) +NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(DocumentTimeline, AnimationTimeline) @@ -152,8 +160,7 @@ // of mDocument's PresShell. MOZ_ASSERT(GetRefreshDriver(), "Refresh driver should still be valid at end of WillRefresh"); - GetRefreshDriver()->RemoveRefreshObserver(this, Flush_Style); - mIsObservingRefreshDriver = false; + UnregisterFromRefreshDriver(); } } @@ -210,5 +217,21 @@ return presContext->RefreshDriver(); } +void +DocumentTimeline::UnregisterFromRefreshDriver() +{ + if (!mIsObservingRefreshDriver) { + return; + } + + nsRefreshDriver* refreshDriver = GetRefreshDriver(); + if (!refreshDriver) { + return; + } + + refreshDriver->RemoveRefreshObserver(this, Flush_Style); + mIsObservingRefreshDriver = false; +} + } // namespace dom } // namespace mozilla diff -Nru thunderbird-45.2.0+build1/mozilla/dom/animation/DocumentTimeline.h thunderbird-45.3.0+build1/mozilla/dom/animation/DocumentTimeline.h --- thunderbird-45.2.0+build1/mozilla/dom/animation/DocumentTimeline.h 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/animation/DocumentTimeline.h 2016-08-31 15:44:42.000000000 +0000 @@ -74,6 +74,7 @@ protected: TimeStamp GetCurrentTimeStamp() const; nsRefreshDriver* GetRefreshDriver() const; + void UnregisterFromRefreshDriver(); nsCOMPtr mDocument; diff -Nru thunderbird-45.2.0+build1/mozilla/dom/base/DirectionalityUtils.cpp thunderbird-45.3.0+build1/mozilla/dom/base/DirectionalityUtils.cpp --- thunderbird-45.2.0+build1/mozilla/dom/base/DirectionalityUtils.cpp 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/base/DirectionalityUtils.cpp 2016-08-31 15:44:42.000000000 +0000 @@ -511,6 +511,12 @@ oldTextNode); } if (newTextNode) { + nsINode* oldDirAutoSetBy = + static_cast(rootNode->GetProperty(nsGkAtoms::dirAutoSetBy)); + if (oldDirAutoSetBy == newTextNode) { + // We're already registered. + return OpNext; + } nsTextNodeDirectionalityMap::AddEntryToMap(newTextNode, rootNode); } else { rootNode->ClearHasDirAutoSet(); @@ -683,7 +689,9 @@ if (child->HasTextNodeDirectionalityMap()) { nsTextNodeDirectionalityMap::ResetTextNodeDirection(child, nullptr); - nsTextNodeDirectionalityMap::EnsureMapIsClearFor(child); + // Don't call nsTextNodeDirectionalityMap::EnsureMapIsClearFor(child) + // since ResetTextNodeDirection may have kept elements in child's + // DirectionalityMap. } child = child->GetNextNode(aElement); } diff -Nru thunderbird-45.2.0+build1/mozilla/dom/base/nsNodeUtils.cpp thunderbird-45.3.0+build1/mozilla/dom/base/nsNodeUtils.cpp --- thunderbird-45.2.0+build1/mozilla/dom/base/nsNodeUtils.cpp 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/base/nsNodeUtils.cpp 2016-08-31 15:44:44.000000000 +0000 @@ -577,7 +577,7 @@ JSAutoCompartment ac(cx, wrapper); rv = ReparentWrapper(cx, wrapper); if (NS_FAILED(rv)) { - aNode->mNodeInfo.swap(nodeInfo); + aNode->mNodeInfo.swap(newNodeInfo); return rv; } diff -Nru thunderbird-45.2.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp thunderbird-45.3.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp --- thunderbird-45.2.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegDataDecoder.cpp 2016-08-31 15:44:38.000000000 +0000 @@ -214,8 +214,7 @@ #elif LIBAVCODEC_VERSION_MAJOR == 54 avcodec_free_frame(&mFrame); #else - delete mFrame; - mFrame = nullptr; + av_freep(&mFrame); #endif } } @@ -237,9 +236,8 @@ mFrame = avcodec_alloc_frame(); } #else - delete mFrame; - mFrame = new AVFrame; - avcodec_get_frame_defaults(mFrame); + av_freep(&mFrame); + mFrame = avcodec_alloc_frame(); #endif return mFrame; } diff -Nru thunderbird-45.2.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegFunctionList.h thunderbird-45.3.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegFunctionList.h --- thunderbird-45.2.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegFunctionList.h 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegFunctionList.h 2016-08-31 15:44:38.000000000 +0000 @@ -17,6 +17,10 @@ AV_FUNC(av_parser_parse2, AV_FUNC_AVCODEC_ALL) #if LIBAVCODEC_VERSION_MAJOR <= 54 || defined(LIBAVCODEC_ALLVERSION) AV_FUNC(avcodec_get_frame_defaults, (AV_FUNC_53 | AV_FUNC_54)) +AV_FUNC(avcodec_alloc_frame, (AV_FUNC_53 | AV_FUNC_54)) +#endif +#if LIBAVCODEC_VERSION_MAJOR == 54 || defined(LIBAVCODEC_ALLVERSION) +AV_FUNC(avcodec_free_frame, AV_FUNC_54) #endif /* libavutil */ @@ -25,11 +29,6 @@ AV_FUNC(av_freep, AV_FUNC_AVUTIL_ALL) #if defined(LIBAVCODEC_VERSION_MAJOR) || defined(LIBAVCODEC_ALLVERSION) -#if LIBAVCODEC_VERSION_MAJOR == 54 || defined(LIBAVCODEC_ALLVERSION) -/* libavutil v54 only */ -AV_FUNC(avcodec_alloc_frame, AV_FUNC_AVUTIL_54) -AV_FUNC(avcodec_free_frame, AV_FUNC_AVUTIL_54) -#endif #if LIBAVCODEC_VERSION_MAJOR >= 55 || defined(LIBAVCODEC_ALLVERSION) /* libavutil v55 and later only */ AV_FUNC(av_frame_alloc, (AV_FUNC_AVUTIL_55 | AV_FUNC_AVUTIL_56 | AV_FUNC_AVUTIL_57)) diff -Nru thunderbird-45.2.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp thunderbird-45.3.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp --- thunderbird-45.2.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp 2016-07-04 14:08:26.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/media/platforms/ffmpeg/FFmpegH264Decoder.cpp 2016-08-31 15:44:38.000000000 +0000 @@ -307,12 +307,6 @@ } #endif -#if LIBAVCODEC_VERSION_MAJOR >= 55 - if (aMimeType.EqualsLiteral("video/webm; codecs=vp9")) { - return AV_CODEC_ID_VP9; - } -#endif - return AV_CODEC_ID_NONE; } diff -Nru thunderbird-45.2.0+build1/mozilla/dom/svg/DOMSVGLength.cpp thunderbird-45.3.0+build1/mozilla/dom/svg/DOMSVGLength.cpp --- thunderbird-45.2.0+build1/mozilla/dom/svg/DOMSVGLength.cpp 2016-07-04 14:08:28.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/svg/DOMSVGLength.cpp 2016-08-31 15:44:40.000000000 +0000 @@ -33,10 +33,8 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(DOMSVGLength) NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(DOMSVGLength) - // We may not belong to a list, so we must null check tmp->mList. - if (tmp->mList) { - tmp->mList->mItems[tmp->mListIndex] = nullptr; - } + tmp->CleanupWeakRefs(); + tmp->mVal = nullptr; // (owned by mSVGElement, which we drop our ref to here) NS_IMPL_CYCLE_COLLECTION_UNLINK(mList) NS_IMPL_CYCLE_COLLECTION_UNLINK(mSVGElement) NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER @@ -140,21 +138,32 @@ { } -DOMSVGLength::~DOMSVGLength() +void +DOMSVGLength::CleanupWeakRefs() { - // Our mList's weak ref to us must be nulled out when we die. If GC has - // unlinked us using the cycle collector code, then that has already - // happened, and mList is null. + // Our mList's weak ref to us must be nulled out when we die (or when we're + // cycle collected), so we that don't leave behind a pointer to + // free / soon-to-be-free memory. if (mList) { + MOZ_ASSERT(mList->mItems[mListIndex] == this, + "Clearing out the wrong list index...?"); mList->mItems[mListIndex] = nullptr; } + // Similarly, we must update the tearoff table to remove its (non-owning) + // pointer to mVal. if (mVal) { - auto& table = mIsAnimValItem ? sAnimSVGLengthTearOffTable : sBaseSVGLengthTearOffTable; + auto& table = mIsAnimValItem ? + sAnimSVGLengthTearOffTable : sBaseSVGLengthTearOffTable; table.RemoveTearoff(mVal); } } +DOMSVGLength::~DOMSVGLength() +{ + CleanupWeakRefs(); +} + already_AddRefed DOMSVGLength::GetTearOff(nsSVGLength2* aVal, nsSVGElement* aSVGElement, bool aAnimVal) diff -Nru thunderbird-45.2.0+build1/mozilla/dom/svg/DOMSVGLength.h thunderbird-45.3.0+build1/mozilla/dom/svg/DOMSVGLength.h --- thunderbird-45.2.0+build1/mozilla/dom/svg/DOMSVGLength.h 2016-07-04 14:08:28.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/svg/DOMSVGLength.h 2016-08-31 15:44:40.000000000 +0000 @@ -224,6 +224,13 @@ bool IndexIsValid(); #endif + /** + * Clears soon-to-be-invalid weak references in external objects that were + * set up during the creation of this object. This should be called during + * destruction and during cycle collection. + */ + void CleanupWeakRefs(); + RefPtr mList; // Bounds for the following are checked in the ctor, so be sure to update diff -Nru thunderbird-45.2.0+build1/mozilla/dom/svg/test/mochitest.ini thunderbird-45.3.0+build1/mozilla/dom/svg/test/mochitest.ini --- thunderbird-45.2.0+build1/mozilla/dom/svg/test/mochitest.ini 2016-07-04 14:08:28.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/svg/test/mochitest.ini 2016-08-31 15:44:40.000000000 +0000 @@ -87,6 +87,8 @@ [test_SVGxxxListIndexing.xhtml] [test_SVGxxxList.xhtml] [test_switch.xhtml] +[test_tearoff_with_cc.html] +support-files = tearoff_with_cc_helper.html [test_text_2.html] [test_text_dirty.html] [test_text.html] diff -Nru thunderbird-45.2.0+build1/mozilla/dom/svg/test/tearoff_with_cc_helper.html thunderbird-45.3.0+build1/mozilla/dom/svg/test/tearoff_with_cc_helper.html --- thunderbird-45.2.0+build1/mozilla/dom/svg/test/tearoff_with_cc_helper.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/svg/test/tearoff_with_cc_helper.html 2016-08-31 15:44:40.000000000 +0000 @@ -0,0 +1,36 @@ + + + + + + + + diff -Nru thunderbird-45.2.0+build1/mozilla/dom/svg/test/test_tearoff_with_cc.html thunderbird-45.3.0+build1/mozilla/dom/svg/test/test_tearoff_with_cc.html --- thunderbird-45.2.0+build1/mozilla/dom/svg/test/test_tearoff_with_cc.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/svg/test/test_tearoff_with_cc.html 2016-08-31 15:44:40.000000000 +0000 @@ -0,0 +1,48 @@ + + + + + + Test for Bug 1288228 + + + + + + + Mozilla Bug 1288228 + +

+ +

+ + diff -Nru thunderbird-45.2.0+build1/mozilla/dom/webidl/EventTarget.webidl thunderbird-45.3.0+build1/mozilla/dom/webidl/EventTarget.webidl --- thunderbird-45.2.0+build1/mozilla/dom/webidl/EventTarget.webidl 2016-07-04 14:08:29.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/webidl/EventTarget.webidl 2016-08-31 15:44:42.000000000 +0000 @@ -16,8 +16,8 @@ }; dictionary AddEventListenerOptions : EventListenerOptions { - boolean passive = false; - boolean once = false; + // boolean passive = false; + // boolean once = false; }; [Exposed=(Window,Worker,WorkerDebugger,System)] diff -Nru thunderbird-45.2.0+build1/mozilla/dom/workers/WorkerPrivate.cpp thunderbird-45.3.0+build1/mozilla/dom/workers/WorkerPrivate.cpp --- thunderbird-45.2.0+build1/mozilla/dom/workers/WorkerPrivate.cpp 2016-07-04 14:08:30.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/dom/workers/WorkerPrivate.cpp 2016-08-31 15:44:42.000000000 +0000 @@ -5383,8 +5383,8 @@ MOZ_ALWAYS_TRUE(NS_SUCCEEDED(aThread->PopEventQueue(nestedEventTarget))); if (!mSyncLoopStack.Length() && mPendingEventQueueClearing) { - ClearMainEventQueue(WorkerRan); mPendingEventQueueClearing = false; + ClearMainEventQueue(WorkerRan); } return result; diff -Nru thunderbird-45.2.0+build1/mozilla/extensions/inspector/resources/content/jsutil/xul/inTreeBuilder.js thunderbird-45.3.0+build1/mozilla/extensions/inspector/resources/content/jsutil/xul/inTreeBuilder.js --- thunderbird-45.2.0+build1/mozilla/extensions/inspector/resources/content/jsutil/xul/inTreeBuilder.js 2016-07-04 14:08:57.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/extensions/inspector/resources/content/jsutil/xul/inTreeBuilder.js 2016-08-31 15:45:14.000000000 +0000 @@ -248,8 +248,8 @@ this.addDNDListener(this.mTree, "ondragenter"); this.addDNDListener(this.mTree, "ondragover"); this.addDNDListener(this.mTree, "ondragexit"); - this.addDNDListener(this.mTree, "ondraggesture"); - this.addDNDListener(this.mTree, "ondragdrop"); + this.addDNDListener(this.mTree, "ondragstart"); + this.addDNDListener(this.mTree, "ondrop"); } }, @@ -276,7 +276,7 @@ { }, - onDragDrop: function(aEvent) + onDrop: function(aEvent) { this.markColumnInsert(null); var dragService = XPCU.getService("@mozilla.org/widget/dragservice;1", "nsIDragService"); @@ -364,7 +364,7 @@ //// for drag-n-drop removal/arrangement of columns - onDragGesture: function(aEvent) + onDragStart: function(aEvent) { var target = aEvent.target; if (target.parentNode == this.mTree) { @@ -382,14 +382,14 @@ { aBox._treeBuilderDropTarget = this; this.addDNDListener(aBox, "ondragover", "Target"); - this.addDNDListener(aBox, "ondragdrop", "Target"); + this.addDNDListener(aBox, "ondrop", "Target"); }, removeColumnDropTarget: function(aBox) { aBox._treeBuilderDropTarget = this; this.removeDNDListener(aBox, "ondragover", "Target"); - this.removeDNDListener(aBox, "ondragdrop", "Target"); + this.removeDNDListener(aBox, "ondrop", "Target"); }, onDragOverTarget: function(aBox, aEvent) @@ -397,7 +397,7 @@ DNDUtils.checkCanDrop("TreeBuilder/column-remove"); }, - onDragDropTarget: function(aBox, aEvent) + onDropTarget: function(aBox, aEvent) { this.removeColumn(this.mColumnDragging); this.build(); @@ -600,9 +600,9 @@ }; -function inTreeBuilder_ondraggesture(aTree, aEvent) +function inTreeBuilder_ondragstart(aTree, aEvent) { - return aTree._treeBuilder.onDragGesture(aEvent); + return aTree._treeBuilder.onDragStart(aEvent); } function inTreeBuilder_ondragenter(aTree, aEvent) @@ -620,9 +620,9 @@ return aTree._treeBuilder.onDragExit(aEvent); } -function inTreeBuilder_ondragdrop(aTree, aEvent) +function inTreeBuilder_ondrop(aTree, aEvent) { - return aTree._treeBuilder.onDragDrop(aEvent); + return aTree._treeBuilder.onDrop(aEvent); } function inTreeBuilder_ondragover_Target(aBox, aEvent) @@ -630,7 +630,7 @@ return aBox._treeBuilderDropTarget.onDragOverTarget(aBox, aEvent); } -function inTreeBuilder_ondragdrop_Target(aBox, aEvent) +function inTreeBuilder_ondrop_Target(aBox, aEvent) { - return aBox._treeBuilderDropTarget.onDragDropTarget(aBox, aEvent); + return aBox._treeBuilderDropTarget.onDropTarget(aBox, aEvent); } diff -Nru thunderbird-45.2.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.js thunderbird-45.3.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.js --- thunderbird-45.2.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.js 2016-07-04 14:08:57.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.js 2016-08-31 15:45:14.000000000 +0000 @@ -61,7 +61,7 @@ // bug 56270 - dragSession.sourceDocument is null -- // causes me to code this very temporary, very nasty hack // to make sure I get notified when a column is dropped - opener.viewer.mDOMTree.onClientDrop = ColumnsDialogDragDropOut; + opener.viewer.mDOMTree.onClientDrop = ColumnsDialogDropOut; this.buildContents(); @@ -152,7 +152,7 @@ //////////////////////////////////////////////////////////////////////////// //// Drag and Drop - onDragGesture: function(aEvent) + onDragStart: function(aEvent) { var box = this.getBoxTarget(aEvent.target); this.setDraggingBox(box); @@ -166,7 +166,7 @@ return false; }, - onDragDropOut: function() + onDropOut: function() { var box = document.getElementById("bxColumns"); var value = this.mDraggingBox._ColValue; @@ -174,7 +174,7 @@ this.removeItem(value); }, - onDragDropIn: function(aEvent) + onDropIn: function(aEvent) { var data = DNDUtils.getData("TreeBuilder/column-remove", 0); var string = XPCU.QI(data, "nsISupportsString"); @@ -213,7 +213,7 @@ }; -function ColumnsDialogDragDropOut() +function ColumnsDialogDropOut() { - dialog.onDragDropOut(); + dialog.onDropOut(); } diff -Nru thunderbird-45.2.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.xul thunderbird-45.3.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.xul --- thunderbird-45.2.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.xul 2016-07-04 14:08:57.000000000 +0000 +++ thunderbird-45.3.0+build1/mozilla/extensions/inspector/resources/content/viewers/dom/columnsDialog.xul 2016-08-31 15:45:14.000000000 +0000 @@ -21,6 +21,6 @@