diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/changelog thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/changelog --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/changelog 2017-06-16 16:19:16.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/changelog 2017-06-17 06:25:43.000000000 +0000 @@ -1,9 +1,9 @@ -thunderbird-trunk (56.0~a1~hg20170616r21680.364324-0ubuntu0.16.04.1~umd1) xenial; urgency=medium +thunderbird-trunk (56.0~a1~hg20170616r21680.364430-0ubuntu0.16.04.1~umd1) xenial; urgency=medium * * New upstream snapshot - -- Rico Tzschichholz Fri, 16 Jun 2017 18:19:16 +0200 + -- Rico Tzschichholz Sat, 17 Jun 2017 08:25:43 +0200 thunderbird-trunk (55.0~a1~hg20170429r21494.355743-0ubuntu1) zesty; urgency=medium diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/config/mozconfig.in thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/config/mozconfig.in --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/config/mozconfig.in 2017-04-21 11:33:10.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/config/mozconfig.in 2017-06-17 05:40:02.000000000 +0000 @@ -60,4 +60,3 @@ ac_add_options --enable-calendar export DISABLE_LIGHTNING_INSTALL=1 #ac_add_options --enable-alsa -ac_add_options --disable-webrender diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/patches/series thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/patches/series --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/debian/patches/series 2017-04-29 07:48:17.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/debian/patches/series 2017-06-17 05:40:42.000000000 +0000 @@ -2,7 +2,7 @@ #theme-refresh-addressbook-toolbar-icons.patch #theme-refresh-compose-toolbar-icons.patch dont-override-general-useragent-locale.patch -unity-menubar.patch +#unity-menubar.patch #test-integration/automation-output-junit-xml.patch #test-integration/xpcshell-output-valid-junit-xml.patch #test-fixes/mozmill-workaround-shebang-char-limit.patch diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/ast/toolkit/chrome/global/datetimebox.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/ast/toolkit/chrome/global/datetimebox.dtd --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/ast/toolkit/chrome/global/datetimebox.dtd 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/ast/toolkit/chrome/global/datetimebox.dtd 2017-06-17 06:12:23.000000000 +0000 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/changesets thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/changesets --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/changesets 2017-06-16 16:12:23.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/changesets 2017-06-17 06:19:52.000000000 +0000 @@ -1,6 +1,6 @@ af 1093:310e873293f9 ar 2529:b8dc92d8fbe9 -ast 1960:54d893528585 +ast 1961:4a0dd2ff8933 be 2734:ab0a0061496d bg 2291:b99b3cbe5c58 bn-BD 1695:05bcb3c18003 @@ -23,7 +23,7 @@ ga-IE 2548:c460bf8dccd4 gd 2352:d7a72739f6b5 gl 3619:b010da5934a5 -he 2281:20c83ce7d7a4 +he 2283:abdd472dbeb0 hr 2383:db49953e0578 hsb 1236:5e2296ef1b58 hu 3356:7f1a47887fff @@ -35,27 +35,27 @@ ja-JP-mac 2593:74991716bbd8 ka 335:0a97b85d9ab5 kab 669:dd0378dfea8a -kk 1436:6f09747f7e25 +kk 1438:d6e2e4796b19 ko 2726:65600b403093 lt 3843:fd1163c6dbaa -nb-NO 3517:3cc392dee719 +nb-NO 3520:112052b01f49 nl 6422:410de09cf445 -nn-NO 2324:b92bffa04e5d +nn-NO 2325:f51eef1c041d pa-IN 2408:51472df7ba3f pl 10170:4ee216defb78 -pt-BR 3474:a6ebbdcb9628 -pt-PT 6164:5789193f6ffa +pt-BR 3475:a7169085a7a8 +pt-PT 6166:49ebc1c08d0c rm 1981:008096f2d677 ro 2782:6c5cdc98f45f ru 5019:0bd1a335ee69 si 1662:e807981f0305 -sk 4885:0999a9d3a388 +sk 4886:ace4ca1c7852 sl 3330:2d92e69762ca sq 2604:f5ac8e9891db sr 1931:987d40634bf4 sv-SE 5591:628182f85f06 ta-LK 891:eecac09572de -tr 3087:43efb48c07ff +tr 3088:fe1943c45477 uk 4034:331af82ef6f5 vi 1337:dcefea2a1fdf zh-CN 3441:11f66a36eaa6 diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/he/toolkit/chrome/global/aboutRights.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/he/toolkit/chrome/global/aboutRights.dtd --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/he/toolkit/chrome/global/aboutRights.dtd 2017-06-16 16:05:29.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/he/toolkit/chrome/global/aboutRights.dtd 2017-06-17 06:15:09.000000000 +0000 @@ -3,8 +3,7 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - + - - + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/inspector.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/inspector.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/inspector.properties 2017-06-16 16:08:44.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/inspector.properties 2017-06-17 06:16:59.000000000 +0000 @@ -173,6 +173,12 @@ inspectorCopyCSSPath.label=CSS Path inspectorCopyCSSPath.accesskey=P +# LOCALIZATION NOTE (inspectorCopyXPath.label): This is the label +# shown in the inspector contextual-menu for the item that lets users copy +# the XPath of the current node +inspectorCopyXPath.label=XPath +inspectorCopyXPath.accesskey=X + # LOCALIZATION NOTE (inspectorPasteOuterHTML.label): This is the label shown # in the inspector contextual-menu for the item that lets users paste outer # HTML in the current node @@ -345,6 +351,11 @@ # that corresponds to the tool displaying layout information defined in the page. inspector.sidebar.layoutViewTitle2=Layout +# LOCALIZATION NOTE (inspector.sidebar.newBadge): +# This is the text of a promotion badge showed in the inspector sidebar, next to a panel +# name. Used to promote new/recent panels such as the layout panel. +inspector.sidebar.newBadge=new! + # LOCALIZATION NOTE (inspector.sidebar.animationInspectorTitle): # This is the title shown in a tab in the side panel of the Inspector panel # that corresponds to the tool displaying animations defined in the page. diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/layout.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/layout.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/devtools/client/layout.properties 2017-06-16 16:08:44.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/devtools/client/layout.properties 2017-06-17 06:16:59.000000000 +0000 @@ -46,3 +46,11 @@ # LOCALIZATION NOTE (layout.rowColumnPositions): The row and column position of a grid # cell shown in the grid cell infobar when hovering over the CSS grid outline. layout.rowColumnPositions=Row %S / Column %S + +# LOCALIZATION NOTE (layout.promoteMessage): Text displayed in the promote bar for the +# layout panel. +layout.promoteMessage=Explore CSS Grids with the latest CSS Grid Inspector. + +# LOCALIZATION NOTE (layout.learnMore): Text for the link displayed in the promote bar +# for the layout panel. +layout.learnMore=Learn more… diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd 2017-06-16 16:08:44.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutRights.dtd 2017-06-17 06:16:59.000000000 +0000 @@ -3,9 +3,9 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - + + - @@ -22,51 +21,51 @@ - + - + - + - + - + - + + - - + - + @@ -74,14 +73,14 @@ - + - + - + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties 2017-06-16 16:08:44.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nb-NO/toolkit/chrome/global/aboutWebrtc.properties 2017-06-17 06:16:59.000000000 +0000 @@ -62,6 +62,8 @@ ice_stats_heading = ICE-statistikk ice_restart_count_label = ICE-omstarter ice_rollback_count_label = ICE-tilbakestillinger +ice_pair_bytes_sent = Byte sendt +ice_pair_bytes_received = Byte mottatt # LOCALIZATION NOTE (av_sync_label): "A/V" stands for Audio/Video. # "sync" is an abbreviation for sychronization. This is used as diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/inspector.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/inspector.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/inspector.properties 2017-06-16 16:09:04.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/inspector.properties 2017-06-17 06:17:15.000000000 +0000 @@ -173,6 +173,12 @@ inspectorCopyCSSPath.label=CSS Path inspectorCopyCSSPath.accesskey=P +# LOCALIZATION NOTE (inspectorCopyXPath.label): This is the label +# shown in the inspector contextual-menu for the item that lets users copy +# the XPath of the current node +inspectorCopyXPath.label=XPath +inspectorCopyXPath.accesskey=X + # LOCALIZATION NOTE (inspectorPasteOuterHTML.label): This is the label shown # in the inspector contextual-menu for the item that lets users paste outer # HTML in the current node @@ -345,6 +351,11 @@ # that corresponds to the tool displaying layout information defined in the page. inspector.sidebar.layoutViewTitle2=Layout +# LOCALIZATION NOTE (inspector.sidebar.newBadge): +# This is the text of a promotion badge showed in the inspector sidebar, next to a panel +# name. Used to promote new/recent panels such as the layout panel. +inspector.sidebar.newBadge=new! + # LOCALIZATION NOTE (inspector.sidebar.animationInspectorTitle): # This is the title shown in a tab in the side panel of the Inspector panel # that corresponds to the tool displaying animations defined in the page. diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/layout.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/layout.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/nn-NO/devtools/client/layout.properties 2017-06-16 16:09:04.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/nn-NO/devtools/client/layout.properties 2017-06-17 06:17:15.000000000 +0000 @@ -46,3 +46,11 @@ # LOCALIZATION NOTE (layout.rowColumnPositions): The row and column position of a grid # cell shown in the grid cell infobar when hovering over the CSS grid outline. layout.rowColumnPositions=Row %S / Column %S + +# LOCALIZATION NOTE (layout.promoteMessage): Text displayed in the promote bar for the +# layout panel. +layout.promoteMessage=Explore CSS Grids with the latest CSS Grid Inspector. + +# LOCALIZATION NOTE (layout.learnMore): Text for the link displayed in the promote bar +# for the layout panel. +layout.learnMore=Learn more… diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties 2017-06-16 16:09:47.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/pt-PT/toolkit/chrome/global/commonDialogs.properties 2017-06-17 06:17:49.000000000 +0000 @@ -5,7 +5,7 @@ Alert=Alerta Confirm=Confirmar ConfirmCheck=Confirmar -Prompt=Perguntar +Prompt=Solicitação PromptUsernameAndPassword2=Autenticação necessária PromptPassword2=Palavra-passe necessária Select=Selecionar diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/sk/devtools/client/layout.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/sk/devtools/client/layout.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/sk/devtools/client/layout.properties 2017-06-16 16:10:41.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/sk/devtools/client/layout.properties 2017-06-17 06:18:31.000000000 +0000 @@ -49,6 +49,7 @@ # LOCALIZATION NOTE (layout.promoteMessage): Text displayed in the promote bar for the # layout panel. +layout.promoteMessage=Skúmajte CSS mriežky pomocou nového prieskumníka. # LOCALIZATION NOTE (layout.learnMore): Text for the link displayed in the promote bar # for the layout panel. diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/netError.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/netError.dtd --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/netError.dtd 2017-06-16 16:11:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/netError.dtd 2017-06-17 06:19:16.000000000 +0000 @@ -68,10 +68,10 @@ Site bağlantı isteğine hiç beklenmeyen bir biçimde karşılık verdi ve tarayıcı bu girişimi daha fazla sürdürmeyecek.

"> - + Görüntülemeye çalıştığınız sayfa gösterilemiyor çünkü alınan verilerin gerçekliği doğrulanamadı.

"> - +
  • Sunucunun yapılandırmasıyla ilgili bir sorun olabilir veya birisi sunucuyu taklit etmeye çalışıyor olabilir.
  • Daha önce bu sunucuya sorunsuz bağlandıysanız sorun geçici olabilir ve daha sonra yeniden bağlanmayı deneyebilirsiniz.
  • diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/security/csp.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/security/csp.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/dom/chrome/security/csp.properties 2017-06-16 16:11:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/dom/chrome/security/csp.properties 2017-06-17 06:19:16.000000000 +0000 @@ -91,6 +91,10 @@ # LOCALIZATION NOTE (deprecatedReferrerDirective): # %1$S is the value of the deprecated Referrer Directive. deprecatedReferrerDirective = Referrer direktifi ‘%1$S’ eskimiştir. Onun yerine lütfen Referrer-Policy header’ını kullanın. +# LOCALIZATION NOTE (IgnoringSrcBecauseOfDirective): +# %1$S is the name of the src that is ignored. +# %2$S is the name of the directive that causes the src to be ignored. +IgnoringSrcBecauseOfDirective=‘%2$S’ direktifi nedeniyle ‘%1$S’ görmezden geliniyor. # CSP Errors: # LOCALIZATION NOTE (couldntParseInvalidSource): diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutRights.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutRights.dtd --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutRights.dtd 2017-06-16 16:11:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutRights.dtd 2017-06-17 06:19:16.000000000 +0000 @@ -3,9 +3,9 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - - + + - @@ -22,51 +21,51 @@ - + - + - + - + - + - + + - - + - + @@ -74,14 +73,14 @@ - + - + - + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties 2017-06-16 16:11:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/global/aboutWebrtc.properties 2017-06-17 06:19:16.000000000 +0000 @@ -62,6 +62,8 @@ ice_stats_heading = ICE istatistikleri ice_restart_count_label = ICE yeniden başlatma ice_rollback_count_label = ICE geri döndürme +ice_pair_bytes_sent = Gönderilen bayt +ice_pair_bytes_received = Alınan bayt # LOCALIZATION NOTE (av_sync_label): "A/V" stands for Audio/Video. # "sync" is an abbreviation for sychronization. This is used as diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd 2017-06-16 16:11:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/l10n/tr/toolkit/chrome/pluginproblem/pluginproblem.dtd 2017-06-17 06:19:16.000000000 +0000 @@ -3,6 +3,7 @@ - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/browser-tabsintitlebar.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/browser-tabsintitlebar.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/browser-tabsintitlebar.js 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/browser-tabsintitlebar.js 2017-06-17 06:11:12.000000000 +0000 @@ -231,9 +231,9 @@ } // Then add a negative margin to the titlebar, so that the following elements - // will overlap it by the lesser of the titlebar height or the tabstrip+menu. - let minTitlebarOrTabsHeight = Math.min(titlebarContentHeight, tabAndMenuHeight); - titlebar.style.marginBottom = "-" + minTitlebarOrTabsHeight + "px"; + // will overlap it by the greater of the titlebar height or the tabstrip+menu. + let maxTitlebarOrTabsHeight = Math.max(titlebarContentHeight, tabAndMenuHeight); + titlebar.style.marginBottom = "-" + maxTitlebarOrTabsHeight + "px"; // Finally, size the placeholders: if (AppConstants.platform == "macosx") { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/test/performance/browser_startup.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/test/performance/browser_startup.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/base/content/test/performance/browser_startup.js 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/base/content/test/performance/browser_startup.js 2017-06-17 06:11:13.000000000 +0000 @@ -47,20 +47,42 @@ // For the following phases of startup we have only a black list for now // We are at this phase after creating the first browser window (ie. after final-ui-startup). - "before opening first browser window": {}, + "before opening first browser window": {blacklist: { + components: new Set([ + "nsAsyncShutdown.js", + ]), + modules: new Set([ + "resource://gre/modules/PlacesBackups.jsm", + "resource://gre/modules/PlacesUtils.jsm", + ]) + }}, // We reach this phase right after showing the first browser window. // This means that anything already loaded at this point has been loaded // before first paint and delayed it. "before first paint": {blacklist: { components: new Set([ - "nsSearchService.js", + "PageIconProtocolHandler.js", + "PlacesCategoriesStarter.js", "UnifiedComplete.js", + "nsPlacesExpiration.js", + "nsSearchService.js", ]), modules: new Set([ - "resource://gre/modules/ContextualIdentityService.jsm" + "resource:///modules/AboutNewTab.jsm", + "resource:///modules/DirectoryLinksProvider.jsm", + "resource://gre/modules/BookmarkHTMLUtils.jsm", + "resource://gre/modules/Bookmarks.jsm", + "resource://gre/modules/ContextualIdentityService.jsm", + "resource://gre/modules/NewTabUtils.jsm", + "resource://gre/modules/PageThumbs.jsm", + "resource://gre/modules/PlacesSyncUtils.jsm", + "resource://gre/modules/Sqlite.jsm", ]), services: new Set([ + "@mozilla.org/browser/annotation-service;1", + "@mozilla.org/browser/favicon-service;1", + "@mozilla.org/browser/nav-bookmarks-service;1", "@mozilla.org/browser/search-service;1", ]) }}, diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/content/panelUI.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/content/panelUI.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/content/panelUI.js 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/content/panelUI.js 2017-06-17 06:11:13.000000000 +0000 @@ -515,12 +515,14 @@ multiView.setAttribute("nosubviews", "true"); multiView.setAttribute("viewCacheId", "appMenu-viewCache"); if (gPhotonStructure) { + tempPanel.setAttribute("photon", true); multiView.setAttribute("mainViewId", viewNode.id); multiView.appendChild(viewNode); } tempPanel.appendChild(multiView); - multiView.setAttribute("mainViewIsSubView", "true"); - multiView.setMainView(viewNode); + if (!gPhotonStructure) { + multiView.setMainView(viewNode); + } viewNode.classList.add("cui-widget-panelview"); let viewShown = false; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/PanelMultiView.jsm thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/PanelMultiView.jsm --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/PanelMultiView.jsm 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/PanelMultiView.jsm 2017-06-17 06:11:13.000000000 +0000 @@ -167,9 +167,6 @@ get _mainView() { return this._mainViewId ? this.document.getElementById(this._mainViewId) : null; } - get showingSubViewAsMainView() { - return this.node.getAttribute("mainViewIsSubView") == "true"; - } get _transitioning() { return this.__transitioning; @@ -460,6 +457,7 @@ }; // Make sure that new panels always have a title set. + let cancel = false; if (this.panelViews && aAnchor) { if (aAnchor && !viewNode.hasAttribute("title")) viewNode.setAttribute("title", aAnchor.getAttribute("label")); @@ -468,17 +466,17 @@ if (custWidget) { if (custWidget.onInit) custWidget.onInit(aAnchor); - custWidget.onViewShowing({ target: aAnchor, detail }); + custWidget.onViewShowing({ target: viewNode, preventDefault: () => cancel = true, detail }); } } - viewNode.setAttribute("current", true); if (this.panelViews && this._mainViewWidth) viewNode.style.maxWidth = viewNode.style.minWidth = this._mainViewWidth + "px"; let evt = new window.CustomEvent("ViewShowing", { bubbles: true, cancelable: true, detail }); viewNode.dispatchEvent(evt); - let cancel = evt.defaultPrevented; + if (!cancel) + cancel = evt.defaultPrevented; if (detail.blockers.size) { try { let results = await Promise.all(detail.blockers); @@ -494,6 +492,7 @@ } this._currentSubView = viewNode; + viewNode.setAttribute("current", true); if (this.panelViews) { this.node.setAttribute("viewtype", "subview"); if (!playTransition) @@ -625,8 +624,8 @@ this._viewContainer.removeAttribute("transition-reverse"); - evt = new window.CustomEvent("ViewShown", { bubbles: true, cancelable: false }); - viewNode.dispatchEvent(evt); + viewNode.dispatchEvent(new window.CustomEvent("ViewShown", + { bubbles: true, cancelable: false })); }, { once: true }); }); }, { once: true }); @@ -638,6 +637,8 @@ // Now that the subview is visible, we can check the height of the // description elements it contains. this.descriptionHeightWorkaround(viewNode); + viewNode.dispatchEvent(new window.CustomEvent("ViewShown", + { bubbles: true, cancelable: false })); }); this._shiftMainView(aAnchor); } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/test/browser_947914_button_history.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/test/browser_947914_button_history.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/customizableui/test/browser_947914_button_history.js 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/customizableui/test/browser_947914_button_history.js 2017-06-17 06:11:13.000000000 +0000 @@ -14,8 +14,10 @@ let historyButton = document.getElementById("history-panelmenu"); ok(historyButton, "History button appears in Panel Menu"); - historyButton.click(); let historyPanel = document.getElementById("PanelUI-history"); + let promise = BrowserTestUtils.waitForEvent(historyPanel, "ViewShown"); + historyButton.click(); + await promise; ok(historyPanel.getAttribute("current"), "History Panel is in view"); let panelHiddenPromise = promisePanelHidden(window); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/ext-browserAction.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/ext-browserAction.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/ext-browserAction.js 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/ext-browserAction.js 2017-06-17 06:11:13.000000000 +0000 @@ -130,6 +130,7 @@ let view = document.createElementNS(XUL_NS, "panelview"); view.id = this.viewId; view.setAttribute("flex", "1"); + view.setAttribute("extension", true); document.getElementById("PanelUI-multiView").appendChild(view); document.addEventListener("popupshowing", this); @@ -171,6 +172,10 @@ // Google Chrome onClicked extension API. if (popupURL) { try { + // FIXME: The line below needs to change eventually, but for now: + // ensure the view is _always_ visible _before_ `popup.attach()` is + // called. PanelMultiView.jsm dictates different behavior. + event.target.setAttribute("current", true); let popup = this.getPopup(document.defaultView, popupURL); event.detail.addBlocker(popup.attach(event.target)); } catch (e) { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/extensions/test/browser/browser_ext_popup_corners.js 2017-06-17 06:11:13.000000000 +0000 @@ -3,6 +3,8 @@ "use strict"; add_task(async function testPopupBorderRadius() { + await SpecialPowers.pushPrefEnv({set: [["browser.photon.structure.enabled", false]]}); + let extension = ExtensionTestUtils.loadExtension({ background() { browser.tabs.query({active: true, currentWindow: true}, tabs => { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/colors.xul thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/colors.xul --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/browser/components/preferences/colors.xul 2017-06-16 16:00:28.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/browser/components/preferences/colors.xul 2017-06-17 06:11:13.000000000 +0000 @@ -26,7 +26,7 @@ diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/tests/mochitest/test_peerConnection_stats.html 2017-06-17 06:11:16.000000000 +0000 @@ -393,21 +393,11 @@ stat.type + ".remoteCandidateId has a value. value=" + stat.remoteCandidateId); - // state - ok(stat.state == "succeeded", - stat.type + ".state is succeeded. value=" - + stat.state); - // priority ok(stat.priority, stat.type + ".priority has a value. value=" + stat.priority); - // nominated - ok(stat.nominated, - stat.type + ".nominated is true. value=" - + stat.nominated); - // readable ok(stat.readable, stat.type + ".readable is true. value=" @@ -418,31 +408,48 @@ stat.type + ".writable is true. value=" + stat.writable); - // bytesSent - ok(stat.bytesSent > 20000 && stat.bytesSent < 800000, - stat.type + ".bytesSent is a sane number (20,000<>800,000)for a short test. value=" - + stat.bytesSent); - - // bytesReceived - ok(stat.bytesReceived > 20000 && stat.bytesReceived < 800000, - stat.type + ".bytesReceived is a sane number (20,000<>800,000) for a short test. value=" - + stat.bytesReceived); - - // lastPacketSentTimestamp - ok(stat.lastPacketSentTimestamp, - stat.type + ".lastPacketSentTimestamp has a value. value=" - + stat.lastPacketSentTimestamp); - - // lastPacketReceivedTimestamp - ok(stat.lastPacketReceivedTimestamp, - stat.type + ".lastPacketReceivedTimestamp has a value. value=" - + stat.lastPacketReceivedTimestamp); + // state + if (stat.state == "succeeded") { + // nominated + ok(stat.nominated, + stat.type + ".nominated is true. value=" + + stat.nominated); + + // bytesSent + ok(stat.bytesSent > 20000 && stat.bytesSent < 800000, + stat.type + ".bytesSent is a sane number (20,000<>800,000)for a short test. value=" + + stat.bytesSent); + + // bytesReceived + ok(stat.bytesReceived > 20000 && stat.bytesReceived < 800000, + stat.type + ".bytesReceived is a sane number (20,000<>800,000) for a short test. value=" + + stat.bytesReceived); + + // lastPacketSentTimestamp + ok(stat.lastPacketSentTimestamp, + stat.type + ".lastPacketSentTimestamp has a value. value=" + + stat.lastPacketSentTimestamp); + + // lastPacketReceivedTimestamp + ok(stat.lastPacketReceivedTimestamp, + stat.type + ".lastPacketReceivedTimestamp has a value. value=" + + stat.lastPacketReceivedTimestamp); + + } else { + // nominated + ok(!stat.nominated, + stat.type + ".nominated is false. value=" + + stat.nominated); + } + // // Optional fields // // selected - ok(stat.selected === undefined || stat.selected == true, + ok(stat.selected === undefined || + ((stat.state == "succeeded" && stat.selected == true) || + (stat.selected == false)), stat.type + ".selected is undefined or true. value=" + stat.selected); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/TextTrack.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/TextTrack.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/media/TextTrack.cpp 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/media/TextTrack.cpp 2017-06-17 06:11:15.000000000 +0000 @@ -205,7 +205,7 @@ // Remove all the cues from the active cue list whose end times now occur // earlier then the current playback time. for (uint32_t i = mActiveCueList->Length(); i > 0; i--) { - if ((*mActiveCueList)[i - 1]->EndTime() < playbackTime) { + if ((*mActiveCueList)[i - 1]->EndTime() <= playbackTime) { mActiveCueList->RemoveCueAt(i - 1); } } @@ -215,7 +215,7 @@ // a valid start time as the cue list is sorted. for (; mCuePos < mCueList->Length() && (*mCueList)[mCuePos]->StartTime() <= playbackTime; mCuePos++) { - if ((*mCueList)[mCuePos]->EndTime() >= playbackTime) { + if ((*mCueList)[mCuePos]->EndTime() > playbackTime) { mActiveCueList->AddCue(*(*mCueList)[mCuePos]); } } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/Performance.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/Performance.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/Performance.cpp 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/Performance.cpp 2017-06-17 06:11:15.000000000 +0000 @@ -171,6 +171,12 @@ void Performance::GetEntries(nsTArray>& aRetval) { + // We return an empty list when 'privacy.resistFingerprinting' is on. + if (nsContentUtils::ShouldResistFingerprinting()) { + aRetval.Clear(); + return; + } + aRetval = mResourceEntries; aRetval.AppendElements(mUserEntries); aRetval.Sort(PerformanceEntryComparator()); @@ -180,6 +186,12 @@ Performance::GetEntriesByType(const nsAString& aEntryType, nsTArray>& aRetval) { + // We return an empty list when 'privacy.resistFingerprinting' is on. + if (nsContentUtils::ShouldResistFingerprinting()) { + aRetval.Clear(); + return; + } + if (aEntryType.EqualsLiteral("resource")) { aRetval = mResourceEntries; return; @@ -204,6 +216,11 @@ { aRetval.Clear(); + // We return an empty list when 'privacy.resistFingerprinting' is on. + if (nsContentUtils::ShouldResistFingerprinting()) { + return; + } + for (PerformanceEntry* entry : mResourceEntries) { if (entry->GetName().Equals(aName) && (!aEntryType.WasPassed() || @@ -261,6 +278,11 @@ void Performance::Mark(const nsAString& aName, ErrorResult& aRv) { + // We add nothing when 'privacy.resistFingerprinting' is on. + if (nsContentUtils::ShouldResistFingerprinting()) { + return; + } + // Don't add the entry if the buffer is full. XXX should be removed by bug 1159003. if (mUserEntries.Length() >= mResourceTimingBufferSize) { return; @@ -325,6 +347,11 @@ const Optional& aEndMark, ErrorResult& aRv) { + // We add nothing when 'privacy.resistFingerprinting' is on. + if (nsContentUtils::ShouldResistFingerprinting()) { + return; + } + // Don't add the entry if the buffer is full. XXX should be removed by bug // 1159003. if (mUserEntries.Length() >= mResourceTimingBufferSize) { @@ -439,6 +466,12 @@ { MOZ_ASSERT(aEntry); MOZ_ASSERT(mResourceEntries.Length() < mResourceTimingBufferSize); + + // We won't add an entry when 'privacy.resistFingerprint' is true. + if (nsContentUtils::ShouldResistFingerprinting()) { + return; + } + if (mResourceEntries.Length() >= mResourceTimingBufferSize) { return; } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.cpp 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.cpp 2017-06-17 06:11:15.000000000 +0000 @@ -35,7 +35,8 @@ { MOZ_ASSERT(aPerformance, "Parent performance object should be provided"); - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { mZeroTime = 0; } @@ -94,7 +95,8 @@ PerformanceTiming::FetchStartHighRes() { if (!mFetchStart) { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } MOZ_ASSERT(!mAsyncOpen.IsNull(), "The fetch start time stamp should always be " @@ -151,7 +153,8 @@ uint16_t PerformanceTiming::GetRedirectCount() const { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } if (!mAllRedirectsSameOrigin) { @@ -163,7 +166,8 @@ bool PerformanceTiming::ShouldReportCrossOriginRedirect() const { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return false; } @@ -186,7 +190,8 @@ DOMHighResTimeStamp PerformanceTiming::RedirectStartHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } return TimeStampToDOMHighResOrFetchStart(mRedirectStart); @@ -219,7 +224,8 @@ DOMHighResTimeStamp PerformanceTiming::RedirectEndHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } return TimeStampToDOMHighResOrFetchStart(mRedirectEnd); @@ -242,7 +248,8 @@ DOMHighResTimeStamp PerformanceTiming::DomainLookupStartHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } return TimeStampToDOMHighResOrFetchStart(mDomainLookupStart); @@ -257,7 +264,8 @@ DOMHighResTimeStamp PerformanceTiming::DomainLookupEndHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } // Bug 1155008 - nsHttpTransaction is racy. Return DomainLookupStart when null @@ -274,7 +282,8 @@ DOMHighResTimeStamp PerformanceTiming::ConnectStartHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } return mConnectStart.IsNull() ? DomainLookupEndHighRes() @@ -290,7 +299,8 @@ DOMHighResTimeStamp PerformanceTiming::ConnectEndHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } // Bug 1155008 - nsHttpTransaction is racy. Return ConnectStart when null @@ -307,7 +317,8 @@ DOMHighResTimeStamp PerformanceTiming::RequestStartHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } return TimeStampToDOMHighResOrFetchStart(mRequestStart); @@ -322,7 +333,8 @@ DOMHighResTimeStamp PerformanceTiming::ResponseStartHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } if (mResponseStart.IsNull() || @@ -341,7 +353,8 @@ DOMHighResTimeStamp PerformanceTiming::ResponseEndHighRes() { - if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || !IsInitialized() || + nsContentUtils::ShouldResistFingerprinting()) { return mZeroTime; } if (mResponseEnd.IsNull() || diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/performance/PerformanceTiming.h 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/performance/PerformanceTiming.h 2017-06-17 06:11:16.000000000 +0000 @@ -116,7 +116,8 @@ // PerformanceNavigation WebIDL methods DOMTimeMilliSec NavigationStart() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetNavigationStart(); @@ -124,7 +125,8 @@ DOMTimeMilliSec UnloadEventStart() { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetUnloadEventStart(); @@ -132,7 +134,8 @@ DOMTimeMilliSec UnloadEventEnd() { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetUnloadEventEnd(); @@ -180,7 +183,8 @@ DOMTimeMilliSec DomLoading() { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetDomLoading(); @@ -188,7 +192,8 @@ DOMTimeMilliSec DomInteractive() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetDomInteractive(); @@ -196,7 +201,8 @@ DOMTimeMilliSec DomContentLoadedEventStart() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetDomContentLoadedEventStart(); @@ -204,7 +210,8 @@ DOMTimeMilliSec DomContentLoadedEventEnd() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetDomContentLoadedEventEnd(); @@ -212,7 +219,8 @@ DOMTimeMilliSec DomComplete() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetDomComplete(); @@ -220,7 +228,8 @@ DOMTimeMilliSec LoadEventStart() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetLoadEventStart(); @@ -228,7 +237,8 @@ DOMTimeMilliSec LoadEventEnd() const { - if (!nsContentUtils::IsPerformanceTimingEnabled()) { + if (!nsContentUtils::IsPerformanceTimingEnabled() || + nsContentUtils::ShouldResistFingerprinting()) { return 0; } return GetDOMTiming()->GetLoadEventEnd(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLButtonElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLButtonElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLButtonElement.webidl 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLButtonElement.webidl 2017-06-17 06:11:16.000000000 +0000 @@ -43,6 +43,5 @@ boolean reportValidity(); void setCustomValidity(DOMString error); -// Not yet implemented: -// readonly attribute NodeList labels; + readonly attribute NodeList labels; }; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLInputElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLInputElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLInputElement.webidl 2017-06-16 16:00:32.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLInputElement.webidl 2017-06-17 06:11:15.000000000 +0000 @@ -112,7 +112,7 @@ boolean reportValidity(); void setCustomValidity(DOMString error); - // Bug 850365 readonly attribute NodeList labels; + readonly attribute NodeList? labels; void select(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLMeterElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLMeterElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLMeterElement.webidl 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLMeterElement.webidl 2017-06-17 06:11:16.000000000 +0000 @@ -26,9 +26,5 @@ attribute double high; [SetterThrows] attribute double optimum; - - /** - * The labels attribute will be done with bug 556743. - */ - //readonly attribute NodeList labels; + readonly attribute NodeList labels; }; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLOutputElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLOutputElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLOutputElement.webidl 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLOutputElement.webidl 2017-06-17 06:11:16.000000000 +0000 @@ -34,6 +34,5 @@ boolean reportValidity(); void setCustomValidity(DOMString error); -// Not yet implemented (bug 556743). -// readonly attribute NodeList labels; + readonly attribute NodeList labels; }; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLProgressElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLProgressElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLProgressElement.webidl 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLProgressElement.webidl 2017-06-17 06:11:16.000000000 +0000 @@ -18,9 +18,5 @@ [SetterThrows] attribute double max; readonly attribute double position; - - /** - * The labels attribute will be done with bug 567740. - */ - //readonly attribute NodeList labels; + readonly attribute NodeList labels; }; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLSelectElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLSelectElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLSelectElement.webidl 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLSelectElement.webidl 2017-06-17 06:11:16.000000000 +0000 @@ -54,7 +54,7 @@ boolean reportValidity(); void setCustomValidity(DOMString error); -// NYI: readonly attribute NodeList labels; + readonly attribute NodeList labels; // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720 void remove(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLTextAreaElement.webidl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLTextAreaElement.webidl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/webidl/HTMLTextAreaElement.webidl 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/webidl/HTMLTextAreaElement.webidl 2017-06-17 06:11:16.000000000 +0000 @@ -58,7 +58,7 @@ boolean reportValidity(); void setCustomValidity(DOMString error); - // readonly attribute NodeList labels; + readonly attribute NodeList labels; void select(); [Throws] diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/workers/WorkerPrefs.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/workers/WorkerPrefs.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/workers/WorkerPrefs.h 2017-06-16 16:00:31.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/workers/WorkerPrefs.h 2017-06-17 06:11:16.000000000 +0000 @@ -43,6 +43,7 @@ WORKER_SIMPLE_PREF("dom.netinfo.enabled", NetworkInformationEnabled, NETWORKINFORMATION_ENABLED) WORKER_SIMPLE_PREF("dom.fetchController.enabled", FetchControllerEnabled, FETCHCONTROLLER_ENABLED) WORKER_SIMPLE_PREF("dom.fetchObserver.enabled", FetchObserverEnabled, FETCHOBSERVER_ENABLED) +WORKER_SIMPLE_PREF("privacy.resistFingerprinting", ResistFingerprintingEnabled, RESISTFINGERPRINTING_ENABLED) WORKER_PREF("intl.accept_languages", PrefLanguagesChanged) WORKER_PREF("general.appname.override", AppNameOverrideChanged) WORKER_PREF("general.appversion.override", AppVersionOverrideChanged) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp 2017-06-16 16:00:32.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.cpp 2017-06-17 06:11:16.000000000 +0000 @@ -201,7 +201,8 @@ mResultJSON(JS::UndefinedValue()), mResultArrayBuffer(nullptr), mIsMappedArrayBuffer(false), - mXPCOMifier(nullptr) + mXPCOMifier(nullptr), + mEventDispatchingSuspended(false) { mozilla::HoldJSObjects(this); } @@ -1368,7 +1369,7 @@ event->InitEvent(kLiteralString_readystatechange, false, false); // We assume anyone who managed to call CreateReadystatechangeEvent is trusted event->SetTrusted(true); - DispatchDOMEvent(nullptr, event, nullptr, nullptr); + DispatchOrStoreEvent(this, event); return NS_OK; } @@ -1411,7 +1412,7 @@ ProgressEvent::Constructor(aTarget, typeString, init); event->SetTrusted(true); - aTarget->DispatchDOMEvent(nullptr, event, nullptr, nullptr); + DispatchOrStoreEvent(aTarget, event); if (aType == ProgressEventType::progress) { mInLoadProgressEvent = false; @@ -1434,6 +1435,45 @@ } } +void +XMLHttpRequestMainThread::DispatchOrStoreEvent(DOMEventTargetHelper* aTarget, + Event* aEvent) +{ + MOZ_ASSERT(aTarget); + MOZ_ASSERT(aEvent); + + if (mEventDispatchingSuspended) { + PendingEvent* event = mPendingEvents.AppendElement(); + event->mTarget = aTarget; + event->mEvent = aEvent; + return; + } + + aTarget->DispatchDOMEvent(nullptr, aEvent, nullptr, nullptr); +} + +void +XMLHttpRequestMainThread::SuspendEventDispatching() +{ + MOZ_ASSERT(!mEventDispatchingSuspended); + mEventDispatchingSuspended = true; +} + +void +XMLHttpRequestMainThread::ResumeEventDispatching() +{ + MOZ_ASSERT(mEventDispatchingSuspended); + mEventDispatchingSuspended = false; + + nsTArray pendingEvents; + pendingEvents.SwapElements(mPendingEvents); + + for (uint32_t i = 0; i < pendingEvents.Length(); ++i) { + pendingEvents[i].mTarget-> + DispatchDOMEvent(nullptr, pendingEvents[i].mEvent, nullptr, nullptr); + } +} + already_AddRefed XMLHttpRequestMainThread::GetCurrentHttpChannel() { @@ -2409,10 +2449,6 @@ mTimeoutTimer->Cancel(); } - if (mFlagSynchronous) { - UnsuppressEventHandlingAndResume(); - } - // Per spec, fire the last download progress event, if any, // before readystatechange=4/done. (Note that 0-sized responses // will have not sent a progress event yet, so one must be sent here). @@ -3033,6 +3069,7 @@ } } + SuspendEventDispatching(); StopProgressEventTimer(); SyncTimeoutType syncTimeoutType = MaybeStartSyncTimeoutTimer(); @@ -3056,6 +3093,7 @@ } UnsuppressEventHandlingAndResume(); + ResumeEventDispatching(); } else { // Now that we've successfully opened the channel, we can change state. Note // that this needs to come after the AsyncOpen() and rv check, because this diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/dom/xhr/XMLHttpRequestMainThread.h 2017-06-16 16:00:32.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/dom/xhr/XMLHttpRequestMainThread.h 2017-06-17 06:11:16.000000000 +0000 @@ -401,7 +401,8 @@ ErrorResult& aRv); void - Abort() { + Abort() + { ErrorResult rv; Abort(rv); MOZ_ASSERT(!rv.Failed()); @@ -607,8 +608,21 @@ nsresult DispatchToMainThread(already_AddRefed aRunnable); + void DispatchOrStoreEvent(DOMEventTargetHelper* aTarget, Event* aEvent); + already_AddRefed EnsureXPCOMifier(); + void SuspendEventDispatching(); + void ResumeEventDispatching(); + + struct PendingEvent + { + RefPtr mTarget; + RefPtr mEvent; + }; + + nsTArray mPendingEvents; + nsCOMPtr mContext; nsCOMPtr mPrincipal; nsCOMPtr mChannel; @@ -837,6 +851,10 @@ // Helper object to manage our XPCOM scriptability bits nsXMLHttpRequestXPCOMifier* mXPCOMifier; + // When this is set to true, the event dispatching is suspended. This is + // useful to change the correct state when XHR is working sync. + bool mEventDispatchingSuspended; + static bool sDontWarnAboutSyncXHR; }; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp 2017-06-16 16:00:32.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.cpp 2017-06-17 06:11:17.000000000 +0000 @@ -195,7 +195,10 @@ return IPC_OK(); } MOZ_ASSERT(mApi); + MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(aImageKey)) == mActiveImageKeys.end()); + wr::ImageDescriptor descriptor(aSize, aStride, aFormat); + mActiveImageKeys.insert(wr::AsUint64(aImageKey)); mApi->AddImage(aImageKey, descriptor, aBuffer.AsSlice()); @@ -213,7 +216,10 @@ return IPC_OK(); } MOZ_ASSERT(mApi); + MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(aImageKey)) == mActiveImageKeys.end()); + wr::ImageDescriptor descriptor(aSize, aStride, aFormat); + mActiveImageKeys.insert(wr::AsUint64(aImageKey)); mApi->AddBlobImage(aImageKey, descriptor, aBuffer.AsSlice()); @@ -229,7 +235,10 @@ return IPC_OK(); } MOZ_ASSERT(mApi); + MOZ_ASSERT(mFontKeys.find(wr::AsUint64(aFontKey)) == mFontKeys.end()); + auto slice = aBuffer.AsSlice(); + mFontKeys.insert(wr::AsUint64(aFontKey)); mApi->AddRawFont(aFontKey, slice, aFontIndex); return IPC_OK(); @@ -242,7 +251,14 @@ return IPC_OK(); } MOZ_ASSERT(mApi); - mApi->DeleteFont(aFontKey); + + if (mFontKeys.find(wr::AsUint64(aFontKey)) != mFontKeys.end()) { + mFontKeys.erase(wr::AsUint64(aFontKey)); + mApi->DeleteFont(aFontKey); + } else { + MOZ_ASSERT_UNREACHABLE("invalid FontKey"); + } + return IPC_OK(); } @@ -269,10 +285,12 @@ return IPC_OK(); } MOZ_ASSERT(mApi); - if (mActiveKeys.Get(wr::AsUint64(aImageKey), nullptr)) { - mActiveKeys.Remove(wr::AsUint64(aImageKey)); + if (mActiveImageKeys.find(wr::AsUint64(aImageKey)) != mActiveImageKeys.end()) { + mActiveImageKeys.erase(wr::AsUint64(aImageKey)); + mKeysToDelete.push_back(aImageKey); + } else { + MOZ_ASSERT_UNREACHABLE("invalid ImageKey"); } - mKeysToDelete.push_back(aImageKey); return IPC_OK(); } @@ -465,8 +483,8 @@ const OpAddExternalImage& op = cmd.get_OpAddExternalImage(); Range keys(&op.key(), 1); MOZ_ASSERT(mExternalImageIds.Get(wr::AsUint64(op.externalImageId())).get()); - MOZ_ASSERT(!mActiveKeys.Get(wr::AsUint64(keys[0]), nullptr)); - mActiveKeys.Put(wr::AsUint64(keys[0]), keys[0]); + MOZ_ASSERT(mActiveImageKeys.find(wr::AsUint64(keys[0])) == mActiveImageKeys.end()); + mActiveImageKeys.insert(wr::AsUint64(keys[0])); RefPtr host = mExternalImageIds.Get(wr::AsUint64(op.externalImageId())); if (!host) { @@ -1029,10 +1047,14 @@ mApi->ClearRootDisplayList(wr::NewEpoch(mWrEpoch), mPipelineId); // Schedule composition to clean up Pipeline mCompositorScheduler->ScheduleComposition(); - for (auto iter = mActiveKeys.Iter(); !iter.Done(); iter.Next()) { - mKeysToDelete.push_back(iter.Data()); - iter.Remove(); + for (std::unordered_set::iterator iter = mFontKeys.begin(); iter != mFontKeys.end(); iter++) { + mApi->DeleteFont(wr::AsFontKey(*iter)); + } + mFontKeys.clear(); + for (std::unordered_set::iterator iter = mActiveImageKeys.begin(); iter != mActiveImageKeys.end(); iter++) { + mKeysToDelete.push_back(wr::AsImageKey(*iter)); } + mActiveImageKeys.clear(); DeleteOldImages(); for (auto iter = mExternalImageIds.Iter(); !iter.Done(); iter.Next()) { iter.Data()->ClearWrBridge(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/layers/wr/WebRenderBridgeParent.h 2017-06-16 16:00:32.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/layers/wr/WebRenderBridgeParent.h 2017-06-17 06:11:16.000000000 +0000 @@ -247,8 +247,10 @@ RefPtr mCompositorScheduler; RefPtr mAnimStorage; std::vector mKeysToDelete; - // XXX How to handle active keys of non-ExternalImages? - nsDataHashtable mActiveKeys; + // mActiveImageKeys and mFontKeys are used to avoid leaking animations when + // WebRenderBridgeParent is destroyed abnormally and Tab move between different windows. + std::unordered_set mActiveImageKeys; + std::unordered_set mFontKeys; // mActiveAnimations is used to avoid leaking animations when WebRenderBridgeParent is // destroyed abnormally and Tab move between different windows. std::unordered_set mActiveAnimations; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/webrender_bindings/WebRenderTypes.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/webrender_bindings/WebRenderTypes.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/gfx/webrender_bindings/WebRenderTypes.h 2017-06-16 16:00:32.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/gfx/webrender_bindings/WebRenderTypes.h 2017-06-17 06:11:17.000000000 +0000 @@ -115,6 +115,26 @@ + static_cast(aId.mHandle); } +inline ImageKey AsImageKey(const uint64_t& aId) { + ImageKey imageKey; + imageKey.mNamespace = aId >> 32; + imageKey.mHandle = aId; + return imageKey; +} + +// Whenever possible, use wr::FontKey instead of manipulating uint64_t. +inline uint64_t AsUint64(const FontKey& aId) { + return (static_cast(aId.mNamespace) << 32) + + static_cast(aId.mHandle); +} + +inline FontKey AsFontKey(const uint64_t& aId) { + FontKey fontKey; + fontKey.mNamespace = aId >> 32; + fontKey.mHandle = aId; + return fontKey; +} + // Whenever possible, use wr::PipelineId instead of manipulating uint64_t. inline uint64_t AsUint64(const PipelineId& aId) { return (static_cast(aId.mNamespace) << 32) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCAPI.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCAPI.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCAPI.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCAPI.h 2017-06-17 06:11:17.000000000 +0000 @@ -554,20 +554,6 @@ }; /** - * Assert if a GC barrier is invoked while this class is live. This class does - * not disable the static rooting hazard analysis. - */ -class JS_PUBLIC_API(AutoAssertOnBarrier) -{ - JSContext* context; - bool prev; - - public: - explicit AutoAssertOnBarrier(JSContext* cx); - ~AutoAssertOnBarrier(); -}; - -/** * Disable the static rooting hazard analysis in the live region and assert if * any allocation that could potentially trigger a GC occurs while this guard * object is live. This is most useful to help the exact rooting hazard analysis @@ -645,9 +631,6 @@ namespace js { namespace gc { -extern JS_FRIEND_API(bool) -BarriersAreAllowedOnCurrentThread(); - static MOZ_ALWAYS_INLINE void ExposeGCThingToActiveJS(JS::GCCellPtr thing) { @@ -662,8 +645,6 @@ if (thing.mayBeOwnedByOtherRuntime()) return; - MOZ_DIAGNOSTIC_ASSERT(BarriersAreAllowedOnCurrentThread()); - if (IsIncrementalBarrierNeededOnTenuredGCThing(thing)) JS::IncrementalReadBarrier(thing); else if (js::gc::detail::TenuredCellIsMarkedGray(thing.asCell())) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCHashTable.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCHashTable.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCHashTable.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCHashTable.h 2017-06-17 06:11:18.000000000 +0000 @@ -69,6 +69,10 @@ } } + bool needsSweep() const { + return this->initialized() && !this->empty(); + } + void sweep() { if (!this->initialized()) return; @@ -246,6 +250,10 @@ GCPolicy::trace(trc, &e.mutableFront(), "hashset element"); } + bool needsSweep() const { + return this->initialized() && !this->empty(); + } + void sweep() { if (!this->initialized()) return; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCVector.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCVector.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/GCVector.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/GCVector.h 2017-06-17 06:11:17.000000000 +0000 @@ -135,6 +135,10 @@ GCPolicy::trace(trc, &elem, "vector element"); } + bool needsSweep() const { + return !this->empty(); + } + void sweep() { uint32_t src, dst = 0; for (src = 0; src < length(); src++) { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HashTable.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HashTable.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HashTable.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HashTable.h 2017-06-17 06:11:18.000000000 +0000 @@ -1613,6 +1613,7 @@ { METER(stats.rehashes++); removedCount = 0; + gen++; for (size_t i = 0; i < capacity(); ++i) table[i].unsetCollision(); @@ -1797,6 +1798,9 @@ if (!p.isValid()) return false; + MOZ_ASSERT(p.generation == generation()); + MOZ_ASSERT(p.mutationCount == mutationCount); + // Changing an entry from removed to live does not affect whether we // are overloaded and can be handled separately. if (p.entry_->isRemoved()) { @@ -1880,6 +1884,7 @@ MOZ_ASSERT(table); mozilla::ReentrancyGuard g(*this); MOZ_ASSERT(p.found()); + MOZ_ASSERT(p.generation == generation()); remove(*p.entry_); checkUnderloaded(); } @@ -1889,6 +1894,7 @@ MOZ_ASSERT(table); mozilla::ReentrancyGuard g(*this); MOZ_ASSERT(p.found()); + MOZ_ASSERT(p.generation == generation()); typename HashTableEntry::NonConstT t(mozilla::Move(*p)); HashPolicy::setKey(t, const_cast(k)); remove(*p.entry_); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HeapAPI.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HeapAPI.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/HeapAPI.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/HeapAPI.h 2017-06-17 06:11:17.000000000 +0000 @@ -168,6 +168,7 @@ bool isGCSweeping() const { return gcState_ == Sweep; } bool isGCFinished() const { return gcState_ == Finished; } bool isGCCompacting() const { return gcState_ == Compact; } + bool isGCMarking() const { return gcState_ == Mark || gcState_ == MarkGray; } bool isGCSweepingOrCompacting() const { return gcState_ == Sweep || gcState_ == Compact; } static MOZ_ALWAYS_INLINE JS::shadow::Zone* asShadowZone(JS::Zone* zone) { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/SweepingAPI.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/SweepingAPI.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/public/SweepingAPI.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/public/SweepingAPI.h 2017-06-17 06:11:17.000000000 +0000 @@ -38,6 +38,7 @@ virtual ~WeakCacheBase() {} virtual void sweep() = 0; + virtual bool needsSweep() = 0; }; } // namespace detail @@ -69,6 +70,10 @@ void sweep() override { GCPolicy::sweep(&cache); } + + bool needsSweep() override { + return cache.needsSweep(); + } }; } // namespace JS diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/devtools/rootAnalysis/analyzeHeapWrites.js 2017-06-17 06:11:18.000000000 +0000 @@ -246,7 +246,7 @@ return; if (/nsCOMPtr<.*?>.mRawPtr/.test(field)) return; -} + } var str = ""; for (var field of fields) @@ -322,6 +322,14 @@ { return true; } + + // AllChildrenIterator asks AppendOwnedAnonBoxes to append into an nsTArray + // local variable. + if (/nsIFrame::AppendOwnedAnonBoxes/.test(callee) && + /AllChildrenIterator::AppendNativeAnonymousChildren/.test(name)) + { + return true; + } // Runnables are created and named on one thread, then dispatched // (possibly to another). Writes on the origin thread are ok. diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/frontend/BytecodeCompiler.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/frontend/BytecodeCompiler.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/frontend/BytecodeCompiler.cpp 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/frontend/BytecodeCompiler.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -712,13 +712,6 @@ if (!NameFunctions(cx, pn)) return false; - // XDR the newly delazified function. - if (script->scriptSource()->hasEncoder() && - !script->scriptSource()->xdrEncodeFunction(cx, fun, sourceObject)) - { - return false; - } - return true; } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Barrier.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Barrier.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Barrier.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Barrier.h 2017-06-17 06:11:18.000000000 +0000 @@ -685,7 +685,7 @@ const Value& target) const; #endif - void set(NativeObject* owner, Kind kind, uint32_t slot, const Value& v) { + MOZ_ALWAYS_INLINE void set(NativeObject* owner, Kind kind, uint32_t slot, const Value& v) { MOZ_ASSERT(preconditionForSet(owner, kind, slot)); pre(); value = v; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Marking.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Marking.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Marking.cpp 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Marking.cpp 2017-06-17 06:11:17.000000000 +0000 @@ -340,26 +340,26 @@ } static void -AssertZoneIsMarking(Cell* thing) +AssertShouldMarkInZone(Cell* thing) { - MOZ_ASSERT(TenuredCell::fromPointer(thing)->zone()->isGCMarking()); + MOZ_ASSERT(thing->asTenured().zone()->shouldMarkInZone()); } static void -AssertZoneIsMarking(JSString* str) +AssertShouldMarkInZone(JSString* str) { #ifdef DEBUG - Zone* zone = TenuredCell::fromPointer(str)->zone(); - MOZ_ASSERT(zone->isGCMarking() || zone->isAtomsZone()); + Zone* zone = str->asTenured().zone(); + MOZ_ASSERT(zone->shouldMarkInZone() || zone->isAtomsZone()); #endif } static void -AssertZoneIsMarking(JS::Symbol* sym) +AssertShouldMarkInZone(JS::Symbol* sym) { #ifdef DEBUG - Zone* zone = TenuredCell::fromPointer(sym)->zone(); - MOZ_ASSERT(zone->isGCMarking() || zone->isAtomsZone()); + Zone* zone = sym->asTenured().zone(); + MOZ_ASSERT(zone->shouldMarkInZone() || zone->isAtomsZone()); #endif } @@ -771,35 +771,35 @@ template static inline bool -MustSkipMarking(GCMarker* gcmarker, T thing) +ShouldMark(GCMarker* gcmarker, T thing) { // Don't trace things that are owned by another runtime. if (IsOwnedByOtherRuntime(gcmarker->runtime(), thing)) - return true; + return false; // Don't mark things outside a zone if we are in a per-zone GC. - return !thing->zone()->isGCMarking(); + return thing->zone()->shouldMarkInZone(); } template <> bool -MustSkipMarking(GCMarker* gcmarker, JSObject* obj) +ShouldMark(GCMarker* gcmarker, JSObject* obj) { // Don't trace things that are owned by another runtime. if (IsOwnedByOtherRuntime(gcmarker->runtime(), obj)) - return true; + return false; // We may mark a Nursery thing outside the context of the // MinorCollectionTracer because of a pre-barrier. The pre-barrier is not // needed in this case because we perform a minor collection before each // incremental slice. if (IsInsideNursery(obj)) - return true; + return false; // Don't mark things outside a zone if we are in a per-zone GC. It is // faster to check our own arena, which we can do since we know that // the object is tenured. - return !TenuredCell::fromPointer(obj)->zone()->isGCMarking(); + return obj->asTenured().zone()->shouldMarkInZone(); } template @@ -807,7 +807,7 @@ DoMarking(GCMarker* gcmarker, T* thing) { // Do per-type marking precondition checks. - if (MustSkipMarking(gcmarker, thing)) + if (!ShouldMark(gcmarker, thing)) return; CheckTracedThing(gcmarker, thing); @@ -834,7 +834,7 @@ NoteWeakEdge(GCMarker* gcmarker, T** thingp) { // Do per-type marking precondition checks. - if (MustSkipMarking(gcmarker, *thingp)) + if (!ShouldMark(gcmarker, *thingp)) return; CheckTracedThing(gcmarker, *thingp); @@ -990,7 +990,7 @@ bool js::GCMarker::mark(T* thing) { - AssertZoneIsMarking(thing); + AssertShouldMarkInZone(thing); MOZ_ASSERT(!IsInsideNursery(gc::TenuredCell::fromPointer(thing))); return gc::ParticipatesInCC::value ? gc::TenuredCell::fromPointer(thing)->markIfUnmarked(markColor()) @@ -1125,7 +1125,7 @@ inline void js::GCMarker::eagerlyMarkChildren(JSLinearString* linearStr) { - AssertZoneIsMarking(linearStr); + AssertShouldMarkInZone(linearStr); MOZ_ASSERT(linearStr->isMarked()); MOZ_ASSERT(linearStr->JSString::isLinear()); @@ -1135,7 +1135,7 @@ MOZ_ASSERT(linearStr->JSString::isLinear()); if (linearStr->isPermanentAtom()) break; - AssertZoneIsMarking(linearStr); + AssertShouldMarkInZone(linearStr); if (!mark(static_cast(linearStr))) break; } @@ -1188,7 +1188,7 @@ JS_DIAGNOSTICS_ASSERT(rope->getTraceKind() == JS::TraceKind::String); JS_DIAGNOSTICS_ASSERT(rope->JSString::isRope()); - AssertZoneIsMarking(rope); + AssertShouldMarkInZone(rope); MOZ_ASSERT(rope->isMarked()); JSRope* next = nullptr; @@ -1674,7 +1674,7 @@ case MarkStack::ObjectTag: { obj = stack.popPtr().as(); - AssertZoneIsMarking(obj); + AssertShouldMarkInZone(obj); goto scan_obj; } @@ -1738,7 +1738,7 @@ scan_obj: { - AssertZoneIsMarking(obj); + AssertShouldMarkInZone(obj); budget.step(); if (budget.isOverBudget()) { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.cpp 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.cpp 2017-06-17 06:11:17.000000000 +0000 @@ -251,8 +251,8 @@ void JS::Zone::checkUniqueIdTableAfterMovingGC() { - for (UniqueIdMap::Enum e(uniqueIds()); !e.empty(); e.popFront()) - js::gc::CheckGCThingAfterMovingGC(e.front().key()); + for (auto r = uniqueIds().all(); !r.empty(); r.popFront()) + js::gc::CheckGCThingAfterMovingGC(r.front().key()); } #endif diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/gc/Zone.h 2017-06-16 16:00:33.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/gc/Zone.h 2017-06-17 06:11:18.000000000 +0000 @@ -242,11 +242,8 @@ return CurrentThreadIsHeapMajorCollecting() && !rt->gc.isHeapCompacting() && gcState_ != NoGC; } - bool isGCMarking() { - if (CurrentThreadIsHeapCollecting()) - return gcState_ == Mark || gcState_ == MarkGray; - else - return needsIncrementalBarrier(); + bool shouldMarkInZone() const { + return needsIncrementalBarrier() || isGCMarking(); } // Get a number that is incremented whenever this zone is collected, and diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm/MacroAssembler-arm-inl.h 2017-06-17 06:11:18.000000000 +0000 @@ -1457,6 +1457,12 @@ branchPtr(cond, scratch2, rhs, label); } +void +MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label) +{ + branch32(cond, lhs, Imm32(rhs.value), label); +} + template inline CodeOffsetJump MacroAssembler::branchPtrWithPatch(Condition cond, Register lhs, T rhs, RepatchLabel* label) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/arm64/MacroAssembler-arm64-inl.h 2017-06-17 06:11:19.000000000 +0000 @@ -1032,6 +1032,17 @@ branchPtr(cond, scratch, rhs, label); } +void +MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label) +{ + vixl::UseScratchRegisterScope temps(this); + const Register scratch = temps.AcquireX().asUnsized(); + MOZ_ASSERT(scratch != lhs.base); + MOZ_ASSERT(scratch != lhs.index); + loadPtr(lhs, scratch); + branchPtr(cond, scratch, rhs, label); +} + template CodeOffsetJump MacroAssembler::branchPtrWithPatch(Condition cond, Register lhs, T rhs, RepatchLabel* label) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.cpp 2017-06-17 06:11:19.000000000 +0000 @@ -1414,6 +1414,11 @@ FunctionInfo(BaselineThrowUninitializedThis, "BaselineThrowUninitializedThis"); +typedef bool (*ThrowInitializedThisFn)(JSContext*, BaselineFrame* frame); +static const VMFunction ThrowInitializedThisInfo = + FunctionInfo(BaselineThrowInitializedThis, + "BaselineThrowInitializedThis"); + bool BaselineCompiler::emit_JSOP_CHECKTHIS() { @@ -1424,18 +1429,35 @@ } bool -BaselineCompiler::emitCheckThis(ValueOperand val) +BaselineCompiler::emit_JSOP_CHECKTHISREINIT() +{ + frame.syncStack(0); + masm.loadValue(frame.addressOfStackValue(frame.peek(-1)), R0); + + return emitCheckThis(R0, /* reinit = */true); +} + +bool +BaselineCompiler::emitCheckThis(ValueOperand val, bool reinit) { Label thisOK; - masm.branchTestMagic(Assembler::NotEqual, val, &thisOK); + if (reinit) + masm.branchTestMagic(Assembler::Equal, val, &thisOK); + else + masm.branchTestMagic(Assembler::NotEqual, val, &thisOK); prepareVMCall(); masm.loadBaselineFramePtr(BaselineFrameReg, val.scratchReg()); pushArg(val.scratchReg()); - if (!callVM(ThrowUninitializedThisInfo)) - return false; + if (reinit) { + if (!callVM(ThrowInitializedThisInfo)) + return false; + } else { + if (!callVM(ThrowUninitializedThisInfo)) + return false; + } masm.bind(&thisOK); return true; @@ -4222,6 +4244,56 @@ masm.tagValue(JSVAL_TYPE_OBJECT, proto, R1); frame.push(R1); return true; +} + +typedef JSObject* (*SuperFunOperationFn)(JSContext*, HandleObject); +static const VMFunction SuperFunOperationInfo = + FunctionInfo(SuperFunOperation, "SuperFunOperation"); + +bool +BaselineCompiler::emit_JSOP_SUPERFUN() +{ + frame.syncStack(0); + + Register callee = R0.scratchReg(); + Register proto = R1.scratchReg(); + Register scratch = R2.scratchReg(); + + // Lookup callee object of environment containing [[ThisValue]] + getThisEnvironmentCallee(callee); + + // Load prototype of callee + masm.loadObjProto(callee, proto); + + // Use VMCall for missing or lazy proto + Label needVMCall; + MOZ_ASSERT(uintptr_t(TaggedProto::LazyProto) == 1); + masm.branchPtr(Assembler::BelowOrEqual, proto, ImmWord(1), &needVMCall); + + // Use VMCall for non-JSFunction objects (eg. Proxy) + masm.branchTestObjClass(Assembler::NotEqual, proto, scratch, &JSFunction::class_, &needVMCall); + + // Use VMCall if not constructor + masm.load16ZeroExtend(Address(proto, JSFunction::offsetOfFlags()), scratch); + masm.branchTest32(Assembler::Zero, scratch, Imm32(JSFunction::CONSTRUCTOR), &needVMCall); + + // Valid constructor + Label hasSuperFun; + masm.jump(&hasSuperFun); + + // Slow path VM Call + masm.bind(&needVMCall); + prepareVMCall(); + pushArg(callee); + if (!callVM(SuperFunOperationInfo)) + return false; + masm.movePtr(ReturnReg, proto); + + // Box prototype and return + masm.bind(&hasSuperFun); + masm.tagValue(JSVAL_TYPE_OBJECT, proto, R1); + frame.push(R1); + return true; } typedef bool (*NewArgumentsObjectFn)(JSContext*, BaselineFrame*, MutableHandleValue); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineCompiler.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineCompiler.h 2017-06-17 06:11:18.000000000 +0000 @@ -217,6 +217,7 @@ _(JSOP_RESUME) \ _(JSOP_CALLEE) \ _(JSOP_SUPERBASE) \ + _(JSOP_SUPERFUN) \ _(JSOP_GETRVAL) \ _(JSOP_SETRVAL) \ _(JSOP_RETRVAL) \ @@ -226,6 +227,7 @@ _(JSOP_CHECKISOBJ) \ _(JSOP_CHECKISCALLABLE) \ _(JSOP_CHECKTHIS) \ + _(JSOP_CHECKTHISREINIT) \ _(JSOP_CHECKRETURN) \ _(JSOP_NEWTARGET) \ _(JSOP_SUPERCALL) \ @@ -295,7 +297,7 @@ private: MethodStatus emitBody(); - MOZ_MUST_USE bool emitCheckThis(ValueOperand val); + MOZ_MUST_USE bool emitCheckThis(ValueOperand val, bool reinit=false); void emitLoadReturnValue(ValueOperand val); void emitInitializeLocals(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineIC.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineIC.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/BaselineIC.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/BaselineIC.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -2397,7 +2397,7 @@ FallbackICSpew(cx, stub, "Call(%s)", CodeName[op]); MOZ_ASSERT(argc == GET_ARGC(pc)); - bool constructing = (op == JSOP_NEW); + bool constructing = (op == JSOP_NEW || op == JSOP_SUPERCALL); bool ignoresReturnValue = (op == JSOP_CALL_IGNORES_RV); // Ensure vp array is rooted - we may GC in here. @@ -2432,7 +2432,7 @@ } } - if (op == JSOP_NEW) { + if (constructing) { if (!ConstructFromStack(cx, callArgs)) return false; res.set(callArgs.rval()); @@ -2506,7 +2506,7 @@ RootedScript script(cx, frame->script()); jsbytecode* pc = stub->icEntry()->pc(script); JSOp op = JSOp(*pc); - bool constructing = (op == JSOP_SPREADNEW); + bool constructing = (op == JSOP_SPREADNEW || op == JSOP_SPREADSUPERCALL); FallbackICSpew(cx, stub, "SpreadCall(%s)", CodeName[op]); // Ensure vp array is rooted - we may GC in here. diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/IonBuilder.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/IonBuilder.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/IonBuilder.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/IonBuilder.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -4860,6 +4860,9 @@ if (!target || !target->hasScript()) return nullptr; + if (target->isBoundFunction() || target->isDerivedClassConstructor()) + return nullptr; + JSObject* templateObject = inspector->getTemplateObject(pc); if (!templateObject) return nullptr; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/MacroAssembler.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/MacroAssembler.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/MacroAssembler.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/MacroAssembler.h 2017-06-17 06:11:19.000000000 +0000 @@ -1037,6 +1037,8 @@ inline void branchPtr(Condition cond, const Address& lhs, ImmGCPtr rhs, Label* label) PER_SHARED_ARCH; inline void branchPtr(Condition cond, const Address& lhs, ImmWord rhs, Label* label) PER_SHARED_ARCH; + inline void branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label) PER_SHARED_ARCH; + inline void branchPtr(Condition cond, const AbsoluteAddress& lhs, Register rhs, Label* label) DEFINED_ON(arm, arm64, mips_shared, x86, x64); inline void branchPtr(Condition cond, const AbsoluteAddress& lhs, ImmWord rhs, Label* label) @@ -1654,6 +1656,8 @@ if (type == MIRType::Value) branchTestGCThing(Assembler::NotEqual, address, &done); + else if (type == MIRType::Object || type == MIRType::String) + branchPtr(Assembler::Equal, address, ImmWord(0), &done); Push(PreBarrierReg); computeEffectiveAddress(address, PreBarrierReg); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/mips-shared/MacroAssembler-mips-shared-inl.h 2017-06-17 06:11:18.000000000 +0000 @@ -571,6 +571,13 @@ branchPtr(cond, SecondScratchReg, rhs, label); } +void +MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label) +{ + loadPtr(lhs, SecondScratchReg); + branchPtr(cond, SecondScratchReg, rhs, label); +} + template CodeOffsetJump MacroAssembler::branchPtrWithPatch(Condition cond, Register lhs, T rhs, RepatchLabel* label) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/SharedIC.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/SharedIC.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/SharedIC.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/SharedIC.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -2386,6 +2386,7 @@ MOZ_ASSERT(frame->isFunctionFrame() || frame->isEvalFrame()); MOZ_ASSERT(stub->monitorsThis() || *GetNextPc(pc) == JSOP_CHECKTHIS || + *GetNextPc(pc) == JSOP_CHECKTHISREINIT || *GetNextPc(pc) == JSOP_CHECKRETURN); if (stub->monitorsThis()) TypeScript::SetThis(cx, script, TypeSet::UnknownType()); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -1433,15 +1433,15 @@ void MarkStringFromIon(JSRuntime* rt, JSString** stringp) { - if (*stringp) - TraceManuallyBarrieredEdge(&rt->gc.marker, stringp, "write barrier"); + MOZ_ASSERT(*stringp); + TraceManuallyBarrieredEdge(&rt->gc.marker, stringp, "write barrier"); } void MarkObjectFromIon(JSRuntime* rt, JSObject** objp) { - if (*objp) - TraceManuallyBarrieredEdge(&rt->gc.marker, objp, "write barrier"); + MOZ_ASSERT(*objp); + TraceManuallyBarrieredEdge(&rt->gc.marker, objp, "write barrier"); } void @@ -1497,6 +1497,12 @@ return ThrowUninitializedThis(cx, frame); } +bool +BaselineThrowInitializedThis(JSContext* cx, BaselineFrame* frame) +{ + return ThrowInitializedThis(cx, frame); +} + bool ThrowObjectCoercible(JSContext* cx, HandleValue v) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/VMFunctions.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/VMFunctions.h 2017-06-17 06:11:18.000000000 +0000 @@ -832,6 +832,9 @@ BaselineThrowUninitializedThis(JSContext* cx, BaselineFrame* frame); MOZ_MUST_USE bool +BaselineThrowInitializedThis(JSContext* cx, BaselineFrame* frame); + +MOZ_MUST_USE bool ThrowBadDerivedReturn(JSContext* cx, HandleValue v); MOZ_MUST_USE bool diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x64/Assembler-x64.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x64/Assembler-x64.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x64/Assembler-x64.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x64/Assembler-x64.h 2017-06-17 06:11:18.000000000 +0000 @@ -871,6 +871,9 @@ case Operand::MEM_REG_DISP: masm.cmpq_im(rhs.value, lhs.disp(), lhs.base()); break; + case Operand::MEM_SCALE: + masm.cmpq_im(rhs.value, lhs.disp(), lhs.base(), lhs.index(), lhs.scale()); + break; case Operand::MEM_ADDRESS32: masm.cmpq_im(rhs.value, lhs.address()); break; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit/x86-shared/MacroAssembler-x86-shared-inl.h 2017-06-17 06:11:19.000000000 +0000 @@ -582,6 +582,12 @@ branchPtrImpl(cond, lhs, rhs, label); } +void +MacroAssembler::branchPtr(Condition cond, const BaseIndex& lhs, ImmWord rhs, Label* label) +{ + branchPtrImpl(cond, lhs, rhs, label); +} + template void MacroAssembler::branchPtrImpl(Condition cond, const T& lhs, const S& rhs, L label) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/class/bug1169746.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/class/bug1169746.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/class/bug1169746.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/class/bug1169746.js 2017-06-17 06:11:18.000000000 +0000 @@ -0,0 +1,10 @@ +class C { } +class D extends C { } + +function f() +{ + for (var i = 0; i < 2000; ++i) + new D(); +} + +f(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/xdr/relazify.js thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/xdr/relazify.js --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jit-test/tests/xdr/relazify.js 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jit-test/tests/xdr/relazify.js 2017-06-17 06:11:19.000000000 +0000 @@ -0,0 +1,29 @@ +load(libdir + 'bytecode-cache.js'); +var test = ""; +gczeal(0); + +// Check that a GC can relazify decoded functions. +// +// Generations 0 and 3 are executed from the source, thus f is not executed yet. +// Generations 1 and 2 are decoded, thus we recorded the delazified f function. +test = ` + function f() { return 1; }; + assertEq(isLazyFunction(f), generation == 0 || generation == 3); + f(); + expect = isRelazifiableFunction(f); + assertEq(isLazyFunction(f), false); +`; +evalWithCache(test, { + checkAfter: function (ctx) { + gc(ctx.global.f, "shrinking"); // relazify f, if possible. + evaluate("assertEq(isLazyFunction(f), expect);", ctx); + } +}); + +evalWithCache(test, { + incremental: true, + checkAfter: function (ctx) { + gc(ctx.global.f, "shrinking"); // relazify f, if possible. + evaluate("assertEq(isLazyFunction(f), expect);", ctx); + } +}); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -1347,7 +1347,6 @@ dtoaState(nullptr), heapState(JS::HeapState::Idle), suppressGC(0), - allowGCBarriers(true), #ifdef DEBUG ionCompiling(false), ionCompilingSafeForMinorGC(false), diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jscntxt.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jscntxt.h 2017-06-17 06:11:18.000000000 +0000 @@ -474,10 +474,6 @@ */ js::ThreadLocalData suppressGC; - // In some cases, invoking GC barriers (incremental or otherwise) will break - // things. These barriers assert if this flag is set. - js::ThreadLocalData allowGCBarriers; - #ifdef DEBUG // Whether this thread is actively Ion compiling. js::ThreadLocalData ionCompiling; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsfun.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsfun.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsfun.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsfun.cpp 2017-06-17 06:11:19.000000000 +0000 @@ -1567,6 +1567,14 @@ // Only functions without inner functions are re-lazified. script->setLazyScript(lazy); } + + // XDR the newly delazified function. + if (script->scriptSource()->hasEncoder()) { + RootedScriptSource sourceObject(cx, lazy->sourceObject()); + if (!script->scriptSource()->xdrEncodeFunction(cx, fun, sourceObject)) + return false; + } + return true; } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsgc.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsgc.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsgc.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsgc.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -5233,6 +5233,9 @@ // Build a vector of sweep tasks to run on a helper thread. WeakCacheTaskVector tasks; bool ok = IterateWeakCaches(rt, [&] (JS::detail::WeakCacheBase* cache) { + if (!cache->needsSweep()) + return true; + return tasks.emplaceBack(rt, *cache); }); @@ -6009,7 +6012,6 @@ // scheduling. return cx->heapState == JS::HeapState::Idle && !cx->suppressGC - && cx->allowGCBarriers && !cx->inUnsafeRegion && !cx->generationalDisabled && !cx->compactingDisabledCount @@ -7494,25 +7496,6 @@ cx_->inUnsafeRegion--; } -JS::AutoAssertOnBarrier::AutoAssertOnBarrier(JSContext* cx) - : context(cx), - prev(cx->allowGCBarriers) -{ - context->allowGCBarriers = false; -} - -JS::AutoAssertOnBarrier::~AutoAssertOnBarrier() -{ - MOZ_ASSERT(!context->allowGCBarriers); - context->allowGCBarriers = prev; -} - -JS_FRIEND_API(bool) -js::gc::BarriersAreAllowedOnCurrentThread() -{ - return TlsContext.get()->allowGCBarriers; -} - #ifdef DEBUG JS::AutoAssertNoAlloc::AutoAssertNoAlloc(JSContext* cx) : gc(nullptr) diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.cpp 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.cpp 2017-06-17 06:11:18.000000000 +0000 @@ -3554,6 +3554,12 @@ return is(); } +bool +JSObject::uninlinedNonProxyIsExtensible() const +{ + return nonProxyIsExtensible(); +} + void JSObject::dump(FILE* fp) const { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/jsobj.h 2017-06-16 16:00:34.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/jsobj.h 2017-06-17 06:11:18.000000000 +0000 @@ -504,6 +504,7 @@ // places that want it (JITs and the like), and it'd be a pain to mark them // all as friends. inline bool nonProxyIsExtensible() const; + bool uninlinedNonProxyIsExtensible() const; public: /* diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ArrayBufferObject.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ArrayBufferObject.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ArrayBufferObject.h 2017-06-16 16:00:36.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ArrayBufferObject.h 2017-06-17 06:11:20.000000000 +0000 @@ -599,6 +599,10 @@ void sweep(); void sweepAfterMinorGC(); + bool needsSweep() const { + return map.needsSweep(); + } + bool needsSweepAfterMinorGC() const { return !nurseryKeys.empty() || !nurseryKeysValid; } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.cpp 2017-06-17 06:11:20.000000000 +0000 @@ -2757,7 +2757,7 @@ CASE(JSOP_CHECKTHISREINIT) { if (!REGS.sp[-1].isMagic(JS_UNINITIALIZED_LEXICAL)) { - JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_REINIT_THIS); + MOZ_ALWAYS_FALSE(ThrowInitializedThis(cx, REGS.fp())); goto error; } } @@ -4226,24 +4226,10 @@ CASE(JSOP_SUPERFUN) { ReservedRooted superEnvFunc(&rootObject0, &GetSuperEnvFunction(cx, REGS)); - MOZ_ASSERT(superEnvFunc->as().isClassConstructor()); - MOZ_ASSERT(superEnvFunc->as().nonLazyScript()->isDerivedClassConstructor()); - ReservedRooted superFun(&rootObject1); - - if (!GetPrototype(cx, superEnvFunc, &superFun)) - goto error; - - ReservedRooted superFunVal(&rootValue0, UndefinedValue()); + superFun = SuperFunOperation(cx, superEnvFunc); if (!superFun) - superFunVal = NullValue(); - else if (!superFun->isConstructor()) - superFunVal = ObjectValue(*superFun); - - if (superFunVal.isObjectOrNull()) { - ReportIsNotFunction(cx, superFunVal, JSDVG_IGNORE_STACK, CONSTRUCT); goto error; - } PUSH_OBJECT(*superFun); } @@ -5241,3 +5227,35 @@ return superBase; } + +JSObject* +js::SuperFunOperation(JSContext* cx, HandleObject callee) +{ + MOZ_ASSERT(callee->as().isClassConstructor()); + MOZ_ASSERT(callee->as().nonLazyScript()->isDerivedClassConstructor()); + + RootedObject superFun(cx); + + if (!GetPrototype(cx, callee, &superFun)) + return nullptr; + + RootedValue superFunVal(cx, UndefinedValue()); + if (!superFun) + superFunVal = NullValue(); + else if (!superFun->isConstructor()) + superFunVal = ObjectValue(*superFun); + + if (superFunVal.isObjectOrNull()) { + ReportIsNotFunction(cx, superFunVal, JSDVG_IGNORE_STACK, CONSTRUCT); + return nullptr; + } + + return superFun; +} + +bool +js::ThrowInitializedThis(JSContext* cx, AbstractFramePtr frame) +{ + JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_REINIT_THIS); + return false; +} diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Interpreter.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Interpreter.h 2017-06-17 06:11:21.000000000 +0000 @@ -572,6 +572,9 @@ ThrowUninitializedThis(JSContext* cx, AbstractFramePtr frame); bool +ThrowInitializedThis(JSContext* cx, AbstractFramePtr frame); + +bool DefaultClassConstructor(JSContext* cx, unsigned argc, Value* vp); bool @@ -592,6 +595,9 @@ JSObject* HomeObjectSuperBase(JSContext* cx, HandleObject homeObj); +JSObject* +SuperFunOperation(JSContext* cx, HandleObject callee); + } /* namespace js */ #endif /* vm_Interpreter_h */ diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject.h 2017-06-17 06:11:21.000000000 +0000 @@ -795,15 +795,16 @@ void freeSlot(JSContext* cx, uint32_t slot); private: - static Shape* getChildProperty(JSContext* cx, HandleNativeObject obj, - HandleShape parent, MutableHandle child); + static MOZ_ALWAYS_INLINE Shape* getChildProperty(JSContext* cx, HandleNativeObject obj, + HandleShape parent, + MutableHandle child); public: /* Add a property whose id is not yet in this scope. */ - static Shape* addProperty(JSContext* cx, HandleNativeObject obj, HandleId id, - JSGetterOp getter, JSSetterOp setter, - uint32_t slot, unsigned attrs, unsigned flags, - bool allowDictionary = true); + static MOZ_ALWAYS_INLINE Shape* addProperty(JSContext* cx, HandleNativeObject obj, HandleId id, + JSGetterOp getter, JSSetterOp setter, + uint32_t slot, unsigned attrs, unsigned flags, + bool allowDictionary = true); /* Add a data property whose id is not yet in this scope. */ static Shape* addDataProperty(JSContext* cx, HandleNativeObject obj, @@ -901,36 +902,36 @@ return getSlotAddressUnchecked(slot); } - HeapSlot& getSlotRef(uint32_t slot) { + MOZ_ALWAYS_INLINE HeapSlot& getSlotRef(uint32_t slot) { MOZ_ASSERT(slotInRange(slot)); return *getSlotAddress(slot); } - const HeapSlot& getSlotRef(uint32_t slot) const { + MOZ_ALWAYS_INLINE const HeapSlot& getSlotRef(uint32_t slot) const { MOZ_ASSERT(slotInRange(slot)); return *getSlotAddress(slot); } // Check requirements on values stored to this object. - inline void checkStoredValue(const Value& v) { + MOZ_ALWAYS_INLINE void checkStoredValue(const Value& v) { MOZ_ASSERT(IsObjectValueInCompartment(v, compartment())); MOZ_ASSERT(AtomIsMarked(zoneFromAnyThread(), v)); } - void setSlot(uint32_t slot, const Value& value) { + MOZ_ALWAYS_INLINE void setSlot(uint32_t slot, const Value& value) { MOZ_ASSERT(slotInRange(slot)); checkStoredValue(value); getSlotRef(slot).set(this, HeapSlot::Slot, slot, value); } - void initSlot(uint32_t slot, const Value& value) { + MOZ_ALWAYS_INLINE void initSlot(uint32_t slot, const Value& value) { MOZ_ASSERT(getSlot(slot).isUndefined()); MOZ_ASSERT(slotInRange(slot)); checkStoredValue(value); initSlotUnchecked(slot, value); } - void initSlotUnchecked(uint32_t slot, const Value& value) { + MOZ_ALWAYS_INLINE void initSlotUnchecked(uint32_t slot, const Value& value) { getSlotAddressUnchecked(slot)->init(this, HeapSlot::Slot, slot, value); } @@ -964,30 +965,30 @@ static bool rollbackProperties(JSContext* cx, HandleNativeObject obj, uint32_t slotSpan); - inline void setSlotWithType(JSContext* cx, Shape* shape, - const Value& value, bool overwriting = true); + MOZ_ALWAYS_INLINE void setSlotWithType(JSContext* cx, Shape* shape, + const Value& value, bool overwriting = true); - inline const Value& getReservedSlot(uint32_t index) const { + MOZ_ALWAYS_INLINE const Value& getReservedSlot(uint32_t index) const { MOZ_ASSERT(index < JSSLOT_FREE(getClass())); return getSlot(index); } - const HeapSlot& getReservedSlotRef(uint32_t index) const { + MOZ_ALWAYS_INLINE const HeapSlot& getReservedSlotRef(uint32_t index) const { MOZ_ASSERT(index < JSSLOT_FREE(getClass())); return getSlotRef(index); } - HeapSlot& getReservedSlotRef(uint32_t index) { + MOZ_ALWAYS_INLINE HeapSlot& getReservedSlotRef(uint32_t index) { MOZ_ASSERT(index < JSSLOT_FREE(getClass())); return getSlotRef(index); } - void initReservedSlot(uint32_t index, const Value& v) { + MOZ_ALWAYS_INLINE void initReservedSlot(uint32_t index, const Value& v) { MOZ_ASSERT(index < JSSLOT_FREE(getClass())); initSlot(index, v); } - void setReservedSlot(uint32_t index, const Value& v) { + MOZ_ALWAYS_INLINE void setReservedSlot(uint32_t index, const Value& v) { MOZ_ASSERT(index < JSSLOT_FREE(getClass())); setSlot(index, v); } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/NativeObject-inl.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/NativeObject-inl.h 2017-06-17 06:11:21.000000000 +0000 @@ -420,7 +420,7 @@ return obj; } -inline void +MOZ_ALWAYS_INLINE void NativeObject::setSlotWithType(JSContext* cx, Shape* shape, const Value& value, bool overwriting) { @@ -739,8 +739,9 @@ } } - // Check for a native property. - if (Shape* shape = obj->lookup(cx, id)) { + // Check for a native property. Call Shape::search directly (instead of + // NativeObject::lookup) because it's inlined. + if (Shape* shape = obj->lastProperty()->search(cx, id)) { propp.setNativeProperty(shape); *donep = true; return true; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -1907,8 +1907,8 @@ if (!table || !table->initialized()) return; - for (NewTable::Enum e(*table); !e.empty(); e.popFront()) { - NewEntry entry = e.front(); + for (auto r = table->all(); !r.empty(); r.popFront()) { + NewEntry entry = r.front(); CheckGCThingAfterMovingGC(entry.group.unbarrieredGet()); TaggedProto proto = entry.group.unbarrieredGet()->proto(); if (proto.isObject()) @@ -1921,7 +1921,7 @@ NewEntry::Lookup lookup(clasp, proto, entry.associated); auto ptr = table->lookup(lookup); - MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front()); + MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front()); } } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/ObjectGroup.h 2017-06-16 16:00:36.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/ObjectGroup.h 2017-06-17 06:11:20.000000000 +0000 @@ -390,7 +390,7 @@ inline HeapTypeSet* getProperty(JSContext* cx, JSObject* obj, jsid id); /* Get a property only if it already exists. */ - inline HeapTypeSet* maybeGetProperty(jsid id); + MOZ_ALWAYS_INLINE HeapTypeSet* maybeGetProperty(jsid id); /* * Iterate through the group's properties. getPropertyCount overapproximates diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape.cpp 2017-06-17 06:11:20.000000000 +0000 @@ -290,7 +290,7 @@ * which must be lastProperty() if inDictionaryMode(), else parent must be * one of lastProperty() or lastProperty()->parent. */ -/* static */ Shape* +/* static */ MOZ_ALWAYS_INLINE Shape* NativeObject::getChildProperty(JSContext* cx, HandleNativeObject obj, HandleShape parent, MutableHandle child) @@ -418,30 +418,6 @@ return true; } -/* static */ Shape* -NativeObject::addProperty(JSContext* cx, HandleNativeObject obj, HandleId id, - GetterOp getter, SetterOp setter, uint32_t slot, unsigned attrs, - unsigned flags, bool allowDictionary) -{ - MOZ_ASSERT(!JSID_IS_VOID(id)); - MOZ_ASSERT(getter != JS_PropertyStub); - MOZ_ASSERT(setter != JS_StrictPropertyStub); - MOZ_ASSERT(obj->nonProxyIsExtensible()); - MOZ_ASSERT(!obj->containsPure(id)); - - AutoKeepShapeTables keep(cx); - ShapeTable::Entry* entry = nullptr; - if (obj->inDictionaryMode()) { - ShapeTable* table = obj->lastProperty()->ensureTableForDictionary(cx, keep); - if (!table) - return nullptr; - entry = &table->search(id, keep); - } - - return addPropertyInternal(cx, obj, id, getter, setter, slot, attrs, flags, entry, - allowDictionary, keep); -} - static bool ShouldConvertToDictionary(NativeObject* obj) { @@ -1288,12 +1264,12 @@ if (!baseShapes().initialized()) return; - for (BaseShapeSet::Enum e(baseShapes()); !e.empty(); e.popFront()) { - UnownedBaseShape* base = e.front().unbarrieredGet(); + for (auto r = baseShapes().all(); !r.empty(); r.popFront()) { + UnownedBaseShape* base = r.front().unbarrieredGet(); CheckGCThingAfterMovingGC(base); BaseShapeSet::Ptr ptr = baseShapes().lookup(base); - MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front()); + MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front()); } } @@ -1349,8 +1325,8 @@ * initialShapes that points into the nursery, and that the hash table * entries are discoverable. */ - for (InitialShapeSet::Enum e(initialShapes()); !e.empty(); e.popFront()) { - InitialShapeEntry entry = e.front(); + for (auto r = initialShapes().all(); !r.empty(); r.popFront()) { + InitialShapeEntry entry = r.front(); JSProtoKey protoKey = entry.proto.key(); TaggedProto proto = entry.proto.proto().unbarrieredGet(); Shape* shape = entry.shape.unbarrieredGet(); @@ -1365,7 +1341,7 @@ shape->numFixedSlots(), shape->getObjectFlags()); InitialShapeSet::Ptr ptr = initialShapes().lookup(lookup); - MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &e.front()); + MOZ_RELEASE_ASSERT(ptr.found() && &*ptr == &r.front()); } } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/Shape-inl.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/Shape-inl.h 2017-06-17 06:11:21.000000000 +0000 @@ -333,6 +333,30 @@ return start->searchLinear(id); } +/* static */ MOZ_ALWAYS_INLINE Shape* +NativeObject::addProperty(JSContext* cx, HandleNativeObject obj, HandleId id, + GetterOp getter, SetterOp setter, uint32_t slot, unsigned attrs, + unsigned flags, bool allowDictionary) +{ + MOZ_ASSERT(!JSID_IS_VOID(id)); + MOZ_ASSERT(getter != JS_PropertyStub); + MOZ_ASSERT(setter != JS_StrictPropertyStub); + MOZ_ASSERT(obj->uninlinedNonProxyIsExtensible()); + MOZ_ASSERT(!obj->containsPure(id)); + + AutoKeepShapeTables keep(cx); + ShapeTable::Entry* entry = nullptr; + if (obj->inDictionaryMode()) { + ShapeTable* table = obj->lastProperty()->ensureTableForDictionary(cx, keep); + if (!table) + return nullptr; + entry = &table->search(id, keep); + } + + return addPropertyInternal(cx, obj, id, getter, setter, slot, attrs, flags, entry, + allowDictionary, keep); +} + } /* namespace js */ #endif /* vm_Shape_inl_h */ diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/TypeInference-inl.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/TypeInference-inl.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/js/src/vm/TypeInference-inl.h 2017-06-16 16:00:36.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/js/src/vm/TypeInference-inl.h 2017-06-17 06:11:20.000000000 +0000 @@ -405,11 +405,10 @@ } MOZ_ALWAYS_INLINE bool -HasTypePropertyId(JSObject* obj, jsid id, TypeSet::Type type) +HasTrackedPropertyType(JSObject* obj, jsid id, TypeSet::Type type) { - id = IdToTypeId(id); - if (!TrackPropertyTypes(obj, id)) - return true; + MOZ_ASSERT(id == IdToTypeId(id)); + MOZ_ASSERT(TrackPropertyTypes(obj, id)); if (HeapTypeSet* types = obj->group()->maybeGetProperty(id)) { if (!types->hasType(type)) @@ -424,6 +423,16 @@ } MOZ_ALWAYS_INLINE bool +HasTypePropertyId(JSObject* obj, jsid id, TypeSet::Type type) +{ + id = IdToTypeId(id); + if (!TrackPropertyTypes(obj, id)) + return true; + + return HasTrackedPropertyType(obj, id, type); +} + +MOZ_ALWAYS_INLINE bool HasTypePropertyId(JSObject* obj, jsid id, const Value& value) { return HasTypePropertyId(obj, id, TypeSet::GetValueType(value)); @@ -433,20 +442,18 @@ void AddTypePropertyId(JSContext* cx, ObjectGroup* group, JSObject* obj, jsid id, const Value& value); /* Add a possible type for a property of obj. */ -inline void +MOZ_ALWAYS_INLINE void AddTypePropertyId(JSContext* cx, JSObject* obj, jsid id, TypeSet::Type type) { id = IdToTypeId(id); - if (TrackPropertyTypes(obj, id)) + if (TrackPropertyTypes(obj, id) && !HasTrackedPropertyType(obj, id, type)) AddTypePropertyId(cx, obj->group(), obj, id, type); } -inline void +MOZ_ALWAYS_INLINE void AddTypePropertyId(JSContext* cx, JSObject* obj, jsid id, const Value& value) { - id = IdToTypeId(id); - if (TrackPropertyTypes(obj, id)) - AddTypePropertyId(cx, obj->group(), obj, id, value); + return AddTypePropertyId(cx, obj, id, TypeSet::GetValueType(value)); } inline void @@ -830,7 +837,7 @@ // Lookup an entry in a hash set, return nullptr if it does not exist. template - static inline U* + static MOZ_ALWAYS_INLINE U* Lookup(U** values, unsigned count, T key) { if (count == 0) @@ -1126,7 +1133,7 @@ return &base->types; } -inline HeapTypeSet* +MOZ_ALWAYS_INLINE HeapTypeSet* ObjectGroup::maybeGetProperty(jsid id) { MOZ_ASSERT(JSID_IS_VOID(id) || JSID_IS_EMPTY(id) || JSID_IS_STRING(id) || JSID_IS_SYMBOL(id)); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/nsIPresShell.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/nsIPresShell.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/nsIPresShell.h 2017-06-16 16:00:36.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/nsIPresShell.h 2017-06-17 06:11:20.000000000 +0000 @@ -955,20 +955,6 @@ virtual void UnsuppressPainting() = 0; /** - * Called to disable nsITheme support in a specific presshell. - */ - void DisableThemeSupport() - { - // Doesn't have to be dynamic. Just set the bool. - mIsThemeSupportDisabled = true; - } - - /** - * Indicates whether theme support is enabled. - */ - bool IsThemeSupportEnabled() const { return !mIsThemeSupportDisabled; } - - /** * Get the set of agent style sheets for this presentation */ virtual nsresult GetAgentStyleSheets( @@ -1862,9 +1848,6 @@ // For all documents we initially lock down painting. bool mPaintingSuppressed : 1; - // Whether or not form controls should use nsITheme in this shell. - bool mIsThemeSupportDisabled : 1; - bool mIsActive : 1; bool mFrozen : 1; bool mIsFirstPaint : 1; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/PresShell.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/PresShell.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/PresShell.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/PresShell.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -786,7 +786,6 @@ , mIsDestroying(false) , mIsReflowing(false) , mPaintingSuppressed(false) - , mIsThemeSupportDisabled(false) , mIsActive(false) , mFrozen(false) , mIsFirstPaint(false) @@ -853,7 +852,6 @@ mLastOSWake = mLoadBegin = TimeStamp::Now(); mSelectionFlags = nsISelectionDisplay::DISPLAY_TEXT | nsISelectionDisplay::DISPLAY_IMAGES; - mIsThemeSupportDisabled = false; mIsActive = true; // FIXME/bug 735029: find a better solution to this problem mIsFirstPaint = true; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -182,16 +182,19 @@ bool mShouldPostHints; bool mShouldComputeHints; nsChangeHint mComputedHint; + nsChangeHint mHintsHandled; TextPostTraversalState(nsStyleContext& aParentContext, ServoStyleSet& aStyleSet, - bool aDisplayContentsParentStyleChanged) + bool aDisplayContentsParentStyleChanged, + nsChangeHint aHintsHandled) : mParentContext(aParentContext) , mStyleSet(aStyleSet) , mStyle(nullptr) , mShouldPostHints(aDisplayContentsParentStyleChanged) , mShouldComputeHints(aDisplayContentsParentStyleChanged) , mComputedHint(nsChangeHint_Empty) + , mHintsHandled(aHintsHandled) {} nsStyleContext& ComputeStyle(nsIContent* aTextNode) @@ -230,6 +233,7 @@ oldContext->CalcStyleDifference(&aNewContext, &equalStructs, &samePointerStructs); + mComputedHint = NS_RemoveSubsumedHints(mComputedHint, mHintsHandled); } if (mComputedHint) { @@ -312,12 +316,15 @@ ServoRestyleManager::ProcessPostTraversal(Element* aElement, nsStyleContext* aParentContext, ServoStyleSet* aStyleSet, - nsStyleChangeList& aChangeList) + nsStyleChangeList& aChangeList, + nsChangeHint aChangesHandled) { nsIFrame* styleFrame = nsLayoutUtils::GetStyleFrame(aElement); // Grab the change hint from Servo. nsChangeHint changeHint = Servo_TakeChangeHint(aElement); + changeHint = NS_RemoveSubsumedHints(changeHint, aChangesHandled); + aChangesHandled |= changeHint; // Handle lazy frame construction by posting a reconstruct for any lazily- // constructed roots. @@ -446,12 +453,15 @@ StyleChildrenIterator it(aElement); TextPostTraversalState textState( - *upToDateContext, *aStyleSet, displayContentsNode && recreateContext); + *upToDateContext, + *aStyleSet, + displayContentsNode && recreateContext, + aChangesHandled); for (nsIContent* n = it.GetNextChild(); n; n = it.GetNextChild()) { if (traverseElementChildren && n->IsElement()) { recreatedAnyContext |= ProcessPostTraversal(n->AsElement(), upToDateContext, - aStyleSet, aChangeList); + aStyleSet, aChangeList, aChangesHandled); } else if (traverseTextChildren && n->IsNodeOfType(nsINode::eTEXT)) { recreatedAnyContext |= ProcessPostTraversalForText(n, aChangeList, textState); @@ -616,7 +626,8 @@ bool anyStyleChanged = false; while (Element* root = iter.GetNextStyleRoot()) { anyStyleChanged |= - ProcessPostTraversal(root, nullptr, styleSet, currentChanges); + ProcessPostTraversal( + root, nullptr, styleSet, currentChanges, nsChangeHint(0)); } // Process the change hints. diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/base/ServoRestyleManager.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/base/ServoRestyleManager.h 2017-06-17 06:11:21.000000000 +0000 @@ -128,7 +128,8 @@ bool ProcessPostTraversal(Element* aElement, nsStyleContext* aParentContext, ServoStyleSet* aStyleSet, - nsStyleChangeList& aChangeList); + nsStyleChangeList& aChangeList, + nsChangeHint aChangesHandledForDescendants); struct TextPostTraversalState; bool ProcessPostTraversalForText(nsIContent* aTextNode, diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -1189,15 +1189,10 @@ } void -nsComboboxControlFrame::DoUpdateStyleOfOwnedAnonBoxes( - ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsComboboxControlFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) { - UpdateStyleOfChildAnonBox(mDropdownFrame, aStyleSet, aChangeList, - aHintForThisFrame); - UpdateStyleOfChildAnonBox(mDisplayFrame, aStyleSet, aChangeList, - aHintForThisFrame); + aResult.AppendElement(OwnedAnonBox(mDropdownFrame)); + aResult.AppendElement(OwnedAnonBox(mDisplayFrame)); } nsresult diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsComboboxControlFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsComboboxControlFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -117,10 +117,8 @@ virtual nsContainerFrame* GetContentInsertionFrame() override; - // Update the style on the block wrappers around our kids. - void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override; + // Return the dropdown and display frame. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override; // nsIFormControlFrame virtual nsresult SetFormProperty(nsIAtom* aName, const nsAString& aValue) override; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -664,13 +664,10 @@ } void -nsFieldSetFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsFieldSetFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) { - nsIFrame* kid = GetInner(); - if (kid) { - UpdateStyleOfChildAnonBox(kid, aStyleSet, aChangeList, aHintForThisFrame); + if (nsIFrame* kid = GetInner()) { + aResult.AppendElement(OwnedAnonBox(kid)); } } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsFieldSetFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsFieldSetFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -73,11 +73,8 @@ return do_QueryFrame(GetInner()); } - // Update the style on the block wrappers around our kids. - virtual void DoUpdateStyleOfOwnedAnonBoxes( - mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override; + // Return the block wrapper around our kids. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override; #ifdef ACCESSIBILITY virtual mozilla::a11y::AccType AccessibleType() override; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -396,16 +396,12 @@ } void -nsHTMLButtonControlFrame::DoUpdateStyleOfOwnedAnonBoxes( - ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsHTMLButtonControlFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) { MOZ_ASSERT(mFrames.FirstChild(), "Must have our button-content anon box"); MOZ_ASSERT(!mFrames.FirstChild()->GetNextSibling(), "Must only have our button-content anon box"); - UpdateStyleOfChildAnonBox(mFrames.FirstChild(), - aStyleSet, aChangeList, aHintForThisFrame); + aResult.AppendElement(OwnedAnonBox(mFrames.FirstChild())); } #ifdef DEBUG diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/forms/nsHTMLButtonControlFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/forms/nsHTMLButtonControlFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -98,12 +98,9 @@ ~(nsIFrame::eReplaced | nsIFrame::eReplacedContainsBlock)); } - /** - * Update the style of our ::-moz-button-content anonymous box. - */ - void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override; + // Return the ::-moz-button-content anonymous box. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override; + protected: nsHTMLButtonControlFrame(nsStyleContext* aContext, nsIFrame::ClassID aID); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/1364361-1.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/1364361-1.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/1364361-1.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/1364361-1.html 2017-06-17 06:11:21.000000000 +0000 @@ -0,0 +1,45 @@ + + +
    +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +abcde +
    diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/crashtests.list thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/crashtests.list --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/crashtests/crashtests.list 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/crashtests/crashtests.list 2017-06-17 06:11:21.000000000 +0000 @@ -652,5 +652,6 @@ load 1316649.html load 1349650.html asserts-if(browserIsRemote,0-5) load 1349816-1.html # bug 1350352 +load 1364361-1.html load 1367413-1.html load 1368617-1.html diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -1260,10 +1260,7 @@ } void -nsColumnSetFrame::DoUpdateStyleOfOwnedAnonBoxes( - mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsColumnSetFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) { // Everything in mFrames is continuations of the first thing in mFrames. nsIFrame* column = mFrames.FirstChild(); @@ -1276,7 +1273,7 @@ MOZ_ASSERT(column->StyleContext()->GetPseudo() == nsCSSAnonBoxes::columnContent, "What sort of child is this?"); - UpdateStyleOfChildAnonBox(column, aStyleSet, aChangeList, aHintForThisFrame); + aResult.AppendElement(OwnedAnonBox(column)); } #ifdef DEBUG diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsColumnSetFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsColumnSetFrame.h 2017-06-17 06:11:20.000000000 +0000 @@ -77,12 +77,8 @@ */ void DrainOverflowColumns(); - /** - * Update the style on our column-content frames. - */ - void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override; + // Return the column-content frame. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override; #ifdef DEBUG_FRAME_DUMP virtual nsresult GetFrameName(nsAString& aResult) const override { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.cpp 2017-06-17 06:11:20.000000000 +0000 @@ -46,7 +46,7 @@ #include "mozilla/GeckoRestyleManager.h" #include "mozilla/RestyleManager.h" #include "mozilla/RestyleManagerInlines.h" - +#include "nsInlineFrame.h" #include "nsIDOMNode.h" #include "nsISelection.h" #include "nsISelectionPrivate.h" @@ -10201,10 +10201,10 @@ } void -nsFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame, - ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsIFrame::UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame, + ServoStyleSet& aStyleSet, + nsStyleChangeList& aChangeList, + nsChangeHint aHintForThisFrame) { MOZ_ASSERT(aChildFrame->GetParent() == this, "This should only be used for children!"); @@ -10479,16 +10479,73 @@ return IsFrameScrolledOutOfView(this); } -/* virtual */ void nsIFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) + nsStyleChangeList& aChangeList, + nsChangeHint aHintForThisFrame) +{ + // As a special case, we check for {ib}-split block frames here, rather + // than have an nsInlineFrame::AppendDirectlyOwnedAnonBoxes implementation + // that returns them. + // + // (If we did handle them in AppendDirectlyOwnedAnonBoxes, we would have to + // return *all* of the in-flow {ib}-split block frames, not just the first + // one. For restyling, we really just need the first in flow, and the other + // user of the AppendOwnedAnonBoxes API, AllChildIterator, doesn't need to + // know about them at all, since these block frames never create NAC. So we + // avoid any unncessary hashtable lookups for the {ib}-split frames by calling + // UpdateStyleOfOwnedAnonBoxesForIBSplit directly here.) + if (IsInlineFrame()) { + if ((GetStateBits() & NS_FRAME_PART_OF_IBSPLIT)) { + static_cast(this)-> + UpdateStyleOfOwnedAnonBoxesForIBSplit(aStyleSet, aChangeList, + aHintForThisFrame); + } + return; + } + + AutoTArray frames; + AppendDirectlyOwnedAnonBoxes(frames); + for (OwnedAnonBox& box : frames) { + if (box.mUpdateStyleFn) { + box.mUpdateStyleFn(this, box.mAnonBoxFrame, + aStyleSet, aChangeList, aHintForThisFrame); + } else { + UpdateStyleOfChildAnonBox(box.mAnonBoxFrame, + aStyleSet, aChangeList, aHintForThisFrame); + } + } +} + +/* virtual */ void +nsIFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) { MOZ_ASSERT(!(GetStateBits() & NS_FRAME_OWNS_ANON_BOXES)); MOZ_ASSERT(false, "Why did this get called?"); } +void +nsIFrame::DoAppendOwnedAnonBoxes(nsTArray& aResult) +{ + size_t i = aResult.Length(); + AppendDirectlyOwnedAnonBoxes(aResult); + + // After appending the directly owned anonymous boxes of this frame to + // aResult above, we need to check each of them to see if they own + // any anonymous boxes themselves. Note that we keep progressing + // through aResult, looking for additional entries in aResult from these + // subsequent AppendDirectlyOwnedAnonBoxes calls. (Thus we can't + // use a ranged for loop here.) + + while (i < aResult.Length()) { + nsIFrame* f = aResult[i].mAnonBoxFrame; + if (f->GetStateBits() & NS_FRAME_OWNS_ANON_BOXES) { + f->AppendDirectlyOwnedAnonBoxes(aResult); + } + ++i; + } +} + nsIFrame::CaretPosition::CaretPosition() : mContentOffset(0) { diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -701,13 +701,6 @@ // Fire DOM event. If no aContent argument use frame's mContent. void FireDOMEvent(const nsAString& aDOMEventName, nsIContent *aContent = nullptr); - // A helper for implementing UpdateStyleOfOwnedAnonBoxes for the specific case - // of the owned anon box being a child of this frame. - void UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame, - mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame); - private: void BoxReflow(nsBoxLayoutState& aState, nsPresContext* aPresContext, diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsGfxScrollFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsGfxScrollFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsGfxScrollFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsGfxScrollFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -1042,12 +1042,9 @@ return mHelper.IsRootScrollFrameOfDocument(); } - // Update the style on our scrolled frame. - virtual void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override { - UpdateStyleOfChildAnonBox(mHelper.GetScrolledFrame(), aStyleSet, - aChangeList, aHintForThisFrame); + // Return the scrolled frame. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override { + aResult.AppendElement(OwnedAnonBox(mHelper.GetScrolledFrame())); } #ifdef DEBUG_FRAME_DUMP @@ -1487,11 +1484,9 @@ return mHelper.IsRootScrollFrameOfDocument(); } - virtual void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override { - UpdateStyleOfChildAnonBox(mHelper.GetScrolledFrame(), aStyleSet, - aChangeList, aHintForThisFrame); + // Return the scrolled frame. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override { + aResult.AppendElement(OwnedAnonBox(mHelper.GetScrolledFrame())); } #ifdef DEBUG_FRAME_DUMP diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.cpp 2017-06-17 06:11:20.000000000 +0000 @@ -414,15 +414,12 @@ } void -nsHTMLCanvasFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsHTMLCanvasFrame::AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) { MOZ_ASSERT(mFrames.FirstChild(), "Must have our canvas content anon box"); MOZ_ASSERT(!mFrames.FirstChild()->GetNextSibling(), "Must only have our canvas content anon box"); - UpdateStyleOfChildAnonBox(mFrames.FirstChild(), - aStyleSet, aChangeList, aHintForThisFrame); + aResult.AppendElement(OwnedAnonBox(mFrames.FirstChild())); } #ifdef ACCESSIBILITY diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsHTMLCanvasFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsHTMLCanvasFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -97,12 +97,9 @@ return PrincipalChildList().FirstChild()->GetContentInsertionFrame(); } - /** - * Update the style of our ::-moz-html-canvas-content anonymous box. - */ - void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override; + // Return the ::-moz-html-canvas-content anonymous box. + void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult) override; + protected: virtual ~nsHTMLCanvasFrame(); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsIFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsIFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsIFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsIFrame.h 2017-06-17 06:11:20.000000000 +0000 @@ -3310,6 +3310,22 @@ } } +protected: + // This does the actual work of UpdateStyleOfOwnedAnonBoxes. It calls + // AppendDirectlyOwnedAnonBoxes to find all of the anonymous boxes + // owned by this frame, and then updates styles on each of them. + void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, + nsStyleChangeList& aChangeList, + nsChangeHint aHintForThisFrame); + + // A helper for DoUpdateStyleOfOwnedAnonBoxes for the specific case + // of the owned anon box being a child of this frame. + void UpdateStyleOfChildAnonBox(nsIFrame* aChildFrame, + mozilla::ServoStyleSet& aStyleSet, + nsStyleChangeList& aChangeList, + nsChangeHint aHintForThisFrame); + +public: // A helper both for UpdateStyleOfChildAnonBox, and to update frame-backed // pseudo-elements in ServoRestyleManager. // @@ -3318,17 +3334,57 @@ // and adding to the change list as appropriate. // // Returns the generated change hint for the frame. - nsChangeHint UpdateStyleOfOwnedChildFrame(nsIFrame* aChildFrame, - nsStyleContext* aNewStyleContext, - nsStyleChangeList& aChangeList); + nsChangeHint UpdateStyleOfOwnedChildFrame( + nsIFrame* aChildFrame, + nsStyleContext* aNewStyleContext, + nsStyleChangeList& aChangeList); + + struct OwnedAnonBox + { + typedef void (*UpdateStyleFn)(nsIFrame* aOwningFrame, nsIFrame* aAnonBox, + mozilla::ServoStyleSet&, + nsStyleChangeList&, nsChangeHint); + + explicit OwnedAnonBox(nsIFrame* aAnonBoxFrame, + UpdateStyleFn aUpdateStyleFn = nullptr) + : mAnonBoxFrame(aAnonBoxFrame) + , mUpdateStyleFn(aUpdateStyleFn) + {} + + nsIFrame* mAnonBoxFrame; + UpdateStyleFn mUpdateStyleFn; + }; + + /** + * Appends information about all of the anonymous boxes owned by this frame, + * including other anonymous boxes owned by those which this frame owns + * directly. + */ + void AppendOwnedAnonBoxes(nsTArray& aResult) { + if (GetStateBits() & NS_FRAME_OWNS_ANON_BOXES) { + if (IsInlineFrame()) { + // See comment in nsIFrame::DoUpdateStyleOfOwnedAnonBoxes for why + // we skip nsInlineFrames. + return; + } + DoAppendOwnedAnonBoxes(aResult); + } + } + +protected: + // This does the actual work of AppendOwnedAnonBoxes. + void DoAppendOwnedAnonBoxes(nsTArray& aResult); +public: /** - * Hook subclasses can override to actually implement updating of style of - * owned anon boxes. + * Hook subclasses can override to return their owned anonymous boxes. + * + * This function only appends anonymous boxes that are directly owned by + * this frame, i.e. direct children or (for certain frames) a wrapper + * parent, unlike AppendOwnedAnonBoxes, which will append all anonymous + * boxes transitively owned by this frame. */ - virtual void DoUpdateStyleOfOwnedAnonBoxes(mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame); + virtual void AppendDirectlyOwnedAnonBoxes(nsTArray& aResult); /** * Determines whether a frame is visible for painting; diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -1014,9 +1014,10 @@ #endif void -nsInlineFrame::DoUpdateStyleOfOwnedAnonBoxes(ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) +nsInlineFrame::UpdateStyleOfOwnedAnonBoxesForIBSplit( + ServoStyleSet& aStyleSet, + nsStyleChangeList& aChangeList, + nsChangeHint aHintForThisFrame) { MOZ_ASSERT(GetStateBits() & NS_FRAME_OWNS_ANON_BOXES, "Why did we get called?"); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.h thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.h --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/generic/nsInlineFrame.h 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/generic/nsInlineFrame.h 2017-06-17 06:11:21.000000000 +0000 @@ -114,12 +114,12 @@ : (!GetNextInFlow()); } - // Update the style on the block wrappers around our non-inline-outside kids. + // Restyles the block wrappers around our non-inline-outside kids. // This will only be called when such wrappers in fact exist. - virtual void DoUpdateStyleOfOwnedAnonBoxes( - mozilla::ServoStyleSet& aStyleSet, - nsStyleChangeList& aChangeList, - nsChangeHint aHintForThisFrame) override; + void UpdateStyleOfOwnedAnonBoxesForIBSplit( + mozilla::ServoStyleSet& aStyleSet, + nsStyleChangeList& aChangeList, + nsChangeHint aHintForThisFrame); protected: // Additional reflow state used during our reflow methods diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inDOMUtils.cpp thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inDOMUtils.cpp --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inDOMUtils.cpp 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inDOMUtils.cpp 2017-06-17 06:11:21.000000000 +0000 @@ -1108,6 +1108,7 @@ NS_IMETHODIMP inDOMUtils::RemoveContentState(nsIDOMElement* aElement, EventStates::InternalType aState, + bool aClearActiveDocument, bool* aRetVal) { NS_ENSURE_ARG_POINTER(aElement); @@ -1117,6 +1118,15 @@ NS_ENSURE_TRUE(esm, NS_ERROR_INVALID_ARG); *aRetVal = esm->SetContentState(nullptr, EventStates(aState)); + + if (aClearActiveDocument && EventStates(aState) == NS_EVENT_STATE_ACTIVE) { + EventStateManager* activeESM = static_cast( + EventStateManager::GetActiveEventStateManager()); + if (activeESM == esm) { + EventStateManager::ClearGlobalActiveContent(nullptr); + } + } + return NS_OK; } diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inIDOMUtils.idl thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inIDOMUtils.idl --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/inspector/inIDOMUtils.idl 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/inspector/inIDOMUtils.idl 2017-06-17 06:11:21.000000000 +0000 @@ -152,7 +152,7 @@ in boolean aShowingAnonymousContent); nsIDOMNodeList getChildrenForNode(in nsIDOMNode aNode, in boolean aShowingAnonymousContent); - + // XBL utilities nsIArray getBindingURLs(in nsIDOMElement aElement); @@ -164,11 +164,15 @@ * that for the remove case we simply pass in nullptr for the element. * Use them accordingly. * + * When removing the active state, you may optionally also clear the active + * document as well by setting aClearActiveDocument + * * @return Returns true if the state was set successfully. See more details * in EventStateManager.h SetContentState. */ bool setContentState(in nsIDOMElement aElement, in unsigned long long aState); - bool removeContentState(in nsIDOMElement aElement, in unsigned long long aState); + bool removeContentState(in nsIDOMElement aElement, in unsigned long long aState, + [optional] in bool aClearActiveDocument); nsIDOMFontFaceList getUsedFontFaces(in nsIDOMRange aRange); diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping.html 2017-06-17 06:11:22.000000000 +0000 @@ -28,8 +28,6 @@ system: extends katakana-iroha; } -
    -
    @@ -43,7 +41,6 @@
    -
    @@ -57,7 +54,6 @@
      -
    • diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html 2017-06-16 16:00:38.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-attr-mapping-ref.html 2017-06-17 06:11:21.000000000 +0000 @@ -15,8 +15,6 @@
      -
      -
      @@ -30,7 +28,6 @@
      -
      @@ -44,7 +41,6 @@
    • -
    • diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin.html 2017-06-16 16:00:38.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin.html 2017-06-17 06:11:21.000000000 +0000 @@ -7,6 +7,9 @@ @counter-style decimal { system: extends upper-roman; } + @counter-style disc { + system: extends decimal; + } @counter-style hebrew { system: extends cjk-decimal; } @@ -14,5 +17,6 @@
      1. foo
      2. bar +
      3. baz
      diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html 2017-06-16 16:00:37.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/counter-style/redefine-builtin-ref.html 2017-06-17 06:11:21.000000000 +0000 @@ -3,5 +3,6 @@
      1. foo
      2. bar +
      3. baz
      diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col.html 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col-ref.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-col-ref.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-col-ref.html 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row.html 2017-06-17 06:11:21.000000000 +0000 @@ -0,0 +1,22 @@ + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row-ref.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-add-row-ref.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-add-row-ref.html 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col.html 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-col-ref.html 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row.html 2017-06-17 06:11:21.000000000 +0000 @@ -0,0 +1,20 @@ + + + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/frameset-remove-row-ref.html 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/reftest.list thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/reftest.list --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/frameset/reftest.list 1970-01-01 00:00:00.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/frameset/reftest.list 2017-06-17 06:11:22.000000000 +0000 @@ -0,0 +1,4 @@ +== frameset-add-row.html frameset-add-row-ref.html +== frameset-remove-row.html frameset-remove-row-ref.html +== frameset-add-col.html frameset-add-col-ref.html +== frameset-remove-col.html frameset-remove-col-ref.html diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/mathml/reftest.list thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/mathml/reftest.list --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/mathml/reftest.list 2017-06-16 16:00:38.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/mathml/reftest.list 2017-06-17 06:11:22.000000000 +0000 @@ -294,8 +294,8 @@ == mathvariant-4.html mathvariant-4-ref.html == mathvariant-5.html mathvariant-5-ref.html == dtls-1.html dtls-1-ref.html -fails-if(styloVsGecko||stylo) == dtls-2.html dtls-2-ref.html # bug 1366206 -fails-if(styloVsGecko||stylo) == dtls-3.html dtls-3-ref.html # bug 1366206 +== dtls-2.html dtls-2-ref.html +== dtls-3.html dtls-3-ref.html == ssty-1.html ssty-1-ref.html == ssty-2.html ssty-2-ref.html == ssty-3.html ssty-3-ref.html diff -Nru thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html --- thunderbird-trunk-56.0~a1~hg20170616r21680.364324/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html 2017-06-16 16:00:38.000000000 +0000 +++ thunderbird-trunk-56.0~a1~hg20170616r21680.364430/mozilla/layout/reftests/native-theme/scroll-thumb-minimum-size-notheme.html 2017-06-17 06:11:22.000000000 +0000 @@ -1,6 +1,5 @@ - -
      +