Index: head/www/waterfox/Makefile =================================================================== --- head/www/waterfox/Makefile (revision 469878) +++ head/www/waterfox/Makefile (revision 469879) @@ -1,74 +1,74 @@ # $FreeBSD$ PORTNAME= waterfox -DISTVERSION= 56.1.0-111172 -DISTVERSIONSUFFIX= -g941b28140102e +DISTVERSION= 56.1.0-111178 +DISTVERSIONSUFFIX= -gedfc016bc021c CATEGORIES= www ipv6 MAINTAINER= jbeich@FreeBSD.org COMMENT= Distilled fork of Firefox DEPRECATED= Temporary experiment EXPIRATION_DATE=2018-05-16 BUILD_DEPENDS= nspr>=4.16:devel/nspr \ nss>=3.32.1:security/nss \ icu>=59.1,1:devel/icu \ libevent>=2.1.8:devel/libevent \ harfbuzz>=1.4.7:print/harfbuzz \ graphite2>=1.3.10:graphics/graphite2 \ png>=1.6.31:graphics/png \ libvorbis>=1.3.5,3:audio/libvorbis \ libvpx>=1.5.0:multimedia/libvpx \ sqlite3>=3.19.3:databases/sqlite3 \ ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \ v4l_compat>0:multimedia/v4l_compat \ autoconf-2.13:devel/autoconf213 \ yasm:devel/yasm \ zip:archivers/zip # soundtouch>=1.9.0:audio/soundtouch \ LIB_DEPENDS= libv4l2.so:multimedia/libv4l USE_GITHUB= yes GH_ACCOUNT= MrAlex94 GH_PROJECT= Waterfox USE_GECKO= gecko MOZ_PKGCONFIG_FILES= # empty USE_MOZILLA= -soundtouch MOZILLA_NAME= Waterfox USE_GL= gl WATERFOX_ICON= ${MOZILLA}.png WATERFOX_ICON_SRC= ${PREFIX}/lib/${MOZILLA}/browser/chrome/icons/default/default256.png WATERFOX_DESKTOP= ${MOZSRC}/taskcluster/docker/firefox-snap/firefox.desktop MOZ_OPTIONS= --enable-application=browser \ --with-app-name=${MOZILLA} \ --with-app-basename=${MOZILLA_NAME} \ --with-distribution-id=org.${MOZILLA}project OPTIONS_DEFAULT= BUNDLED_CAIRO .include "${.CURDIR}/../../www/firefox/Makefile.options" post-patch: @${REINPLACE_CMD} -e 's/%u/%U/' -e '/X-MultipleArgs/d' \ -e 's/firefox/${MOZILLA}/' \ -e 's/Firefox/${MOZILLA_NAME}/' \ ${WATERFOX_DESKTOP} @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${WRKSRC}/browser/app/nsBrowserApp.cpp pre-configure: (cd ${WRKSRC} && ${LOCALBASE}/bin/autoconf-2.13) (cd ${WRKSRC}/js/src/ && ${LOCALBASE}/bin/autoconf-2.13) post-install: ${INSTALL_DATA} ${WATERFOX_DESKTOP} \ ${STAGEDIR}${PREFIX}/share/applications/${MOZILLA}.desktop ${MKDIR} ${STAGEDIR}${PREFIX}/share/pixmaps ${LN} -sf ${WATERFOX_ICON_SRC} ${STAGEDIR}${PREFIX}/share/pixmaps/${WATERFOX_ICON} .include Index: head/www/waterfox/distinfo =================================================================== --- head/www/waterfox/distinfo (revision 469878) +++ head/www/waterfox/distinfo (revision 469879) @@ -1,3 +1,3 @@ -TIMESTAMP = 1526148821 -SHA256 (MrAlex94-Waterfox-56.1.0-111172-g941b28140102e_GH0.tar.gz) = a9cedc302e81667f75e46e971ad8e165761f3bed2e1a4a27f6fdb6bc4a812bf1 -SIZE (MrAlex94-Waterfox-56.1.0-111172-g941b28140102e_GH0.tar.gz) = 394958117 +TIMESTAMP = 1526290324 +SHA256 (MrAlex94-Waterfox-56.1.0-111178-gedfc016bc021c_GH0.tar.gz) = a34715f6954e5b557e976166b69f976f0ae3bc92b168ca26ab6d3ba62bf8e6ec +SIZE (MrAlex94-Waterfox-56.1.0-111178-gedfc016bc021c_GH0.tar.gz) = 394952776 Index: head/www/waterfox/files/patch-bug1449530 =================================================================== --- head/www/waterfox/files/patch-bug1449530 (revision 469878) +++ head/www/waterfox/files/patch-bug1449530 (nonexistent) @@ -1,151 +0,0 @@ -commit 23ab7188ecaa -Author: Alexander Surkov -Date: Thu Apr 5 16:07:35 2018 -0400 - - Bug 1449530 - Clean up ATK states mapping. r=eeejay, a=RyanVM ---- - accessible/atk/AccessibleWrap.cpp | 46 ++++++++++++++++++++++----------------- - accessible/atk/nsStateMap.h | 21 +++++++----------- - accessible/base/States.h | 5 +++++ - 3 files changed, 39 insertions(+), 33 deletions(-) - -diff --git accessible/atk/AccessibleWrap.cpp accessible/atk/AccessibleWrap.cpp -index 3abfff51cd18..0a4c44f1b4f4 100644 ---- accessible/atk/AccessibleWrap.cpp -+++ accessible/atk/AccessibleWrap.cpp -@@ -930,9 +930,8 @@ TranslateStates(uint64_t aState, AtkStateSet* aStateSet) - aState &= ~states::EDITABLE; - - // Convert every state to an entry in AtkStateMap -- uint32_t stateIndex = 0; - uint64_t bitMask = 1; -- while (gAtkStateMap[stateIndex].stateMapEntryType != kNoSuchState) { -+ for (auto stateIndex = 0U; stateIndex < gAtkStateMapLen; stateIndex++) { - if (gAtkStateMap[stateIndex].atkState) { // There's potentially an ATK state for this - bool isStateOn = (aState & bitMask) != 0; - if (gAtkStateMap[stateIndex].stateMapEntryType == kMapOpposite) { -@@ -943,7 +942,6 @@ TranslateStates(uint64_t aState, AtkStateSet* aStateSet) - } - } - bitMask <<= 1; -- ++ stateIndex; - } - } - -@@ -1539,24 +1537,32 @@ a11y::ProxyCaretMoveEvent(ProxyAccessible* aTarget, int32_t aOffset) - void - MaiAtkObject::FireStateChangeEvent(uint64_t aState, bool aEnabled) - { -- int32_t stateIndex = AtkStateMap::GetStateIndexFor(aState); -- if (stateIndex >= 0) { -- NS_ASSERTION(gAtkStateMap[stateIndex].stateMapEntryType != kNoSuchState, -- "No such state"); -- -- if (gAtkStateMap[stateIndex].atkState != kNone) { -- NS_ASSERTION(gAtkStateMap[stateIndex].stateMapEntryType != kNoStateChange, -- "State changes should not fired for this state"); -- -- if (gAtkStateMap[stateIndex].stateMapEntryType == kMapOpposite) -- aEnabled = !aEnabled; -- -- // Fire state change for first state if there is one to map -- atk_object_notify_state_change(&parent, -- gAtkStateMap[stateIndex].atkState, -- aEnabled); -- } -+ auto state = aState; -+ int32_t stateIndex = -1; -+ while (state > 0) { -+ ++stateIndex; -+ state >>= 1; -+ } -+ -+ MOZ_ASSERT(stateIndex >= 0 && stateIndex < static_cast(gAtkStateMapLen), -+ "No ATK state for internal state was found"); -+ if (stateIndex < 0 || stateIndex >= static_cast(gAtkStateMapLen)) { -+ return; -+ } -+ -+ if (gAtkStateMap[stateIndex].atkState != kNone) { -+ MOZ_ASSERT(gAtkStateMap[stateIndex].stateMapEntryType != kNoStateChange, -+ "State changes should not fired for this state"); -+ -+ if (gAtkStateMap[stateIndex].stateMapEntryType == kMapOpposite) { -+ aEnabled = !aEnabled; - } -+ -+ // Fire state change for first state if there is one to map -+ atk_object_notify_state_change(&parent, -+ gAtkStateMap[stateIndex].atkState, -+ aEnabled); -+ } - } - - void -diff --git accessible/atk/nsStateMap.h accessible/atk/nsStateMap.h -index 38aad5365a4e..d715d215a953 100644 ---- accessible/atk/nsStateMap.h -+++ accessible/atk/nsStateMap.h -@@ -7,6 +7,8 @@ - #include - #include "AccessibleWrap.h" - -+#include -+ - /****************************************************************************** - The following accessible states aren't translated, just ignored: - STATE_READONLY: Supported indirectly via EXT_STATE_EDITABLE -@@ -39,7 +41,6 @@ enum EStateMapEntryType { - kMapDirectly, - kMapOpposite, // For example, UNAVAILABLE is the opposite of ENABLED - kNoStateChange, // Don't fire state change event -- kNoSuchState - }; - - const AtkStateType kNone = ATK_STATE_INVALID; -@@ -47,16 +48,6 @@ const AtkStateType kNone = ATK_STATE_INVALID; - struct AtkStateMap { - AtkStateType atkState; - EStateMapEntryType stateMapEntryType; -- -- static int32_t GetStateIndexFor(uint64_t aState) -- { -- int32_t stateIndex = -1; -- while (aState > 0) { -- ++ stateIndex; -- aState >>= 1; -- } -- return stateIndex; // Returns -1 if not mapped -- } - }; - - -@@ -110,6 +101,10 @@ static const AtkStateMap gAtkStateMap[] = { // Cross Platfor - { ATK_STATE_SENSITIVE, kMapDirectly }, // states::SENSITIVE = 1 << 45 - { ATK_STATE_EXPANDABLE, kMapDirectly }, // states::EXPANDABLE = 1 << 46 - { kNone, kMapDirectly }, // states::PINNED = 1 << 47 -- { ATK_STATE_ACTIVE, kMapDirectly }, // states::CURRENT = 1 << 48 -- { kNone, kNoSuchState }, // = 1 << 49 -+ { ATK_STATE_ACTIVE, kMapDirectly } // states::CURRENT = 1 << 48 - }; -+ -+static const auto gAtkStateMapLen = std::extent::value; -+ -+static_assert(((uint64_t) 0x1) << (gAtkStateMapLen - 1) == mozilla::a11y::states::LAST_ENTRY, -+ "ATK states map is out of sync with internal states"); -diff --git accessible/base/States.h accessible/base/States.h -index 786d36076b18..637b08de1231 100644 ---- accessible/base/States.h -+++ accessible/base/States.h -@@ -283,6 +283,11 @@ namespace states { - */ - const uint64_t CURRENT = ((uint64_t) 0x1) << 48; - -+ /** -+ * Not a real state, used for static assertions. -+ */ -+ const uint64_t LAST_ENTRY = CURRENT; -+ - } // namespace states - } // namespace a11y - } // namespace mozilla Property changes on: head/www/waterfox/files/patch-bug1449530 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1381815 =================================================================== --- head/www/waterfox/files/patch-bug1381815 (revision 469878) +++ head/www/waterfox/files/patch-bug1381815 (nonexistent) @@ -1,278 +0,0 @@ -commit 165fab2f8596 -Author: Jan Horak -Date: Tue Oct 10 13:35:56 2017 +0200 - - Bug 1381815 - fixing dimensions of radio and checkbox for GTK 3.20+; r=karlt - - In the GTK < 3.20 the size of radio and checkbox toggle is determined by indicator - spacing and indicator size. By GTK 3.20+ it is replaced by standard box model - (padding, margin, border). The patch fixes that while keeping the functionality - for older GTK. The values are also cached by similar way as scrollbar metrics - are cached now. - - The focus is no longer rendered by GTK but by Mozilla code, so the extra - size for toggles has been removed from GetExtraSizeForWidget and toggles - no longer render focus indicator. - - MozReview-Commit-ID: 1Wg5AgHy1Vz - - --HG-- - extra : rebase_source : 81437f45b7d32555942d21fccc9de4a561d85111 ---- - widget/gtk/gtk3drawing.cpp | 121 ++++++++++++++++++++++++++++++---------- - widget/gtk/gtkdrawing.h | 14 +++++ - widget/gtk/nsNativeThemeGTK.cpp | 32 +---------- - 3 files changed, 107 insertions(+), 60 deletions(-) - -diff --git widget/gtk/gtk3drawing.cpp widget/gtk/gtk3drawing.cpp -index 4c562b380095..7968aef920f6 100644 ---- widget/gtk/gtk3drawing.cpp -+++ widget/gtk/gtk3drawing.cpp -@@ -22,6 +22,8 @@ static gboolean checkbox_check_state; - static gboolean notebook_has_tab_gap; - - static ScrollbarGTKMetrics sScrollbarMetrics[2]; -+static ToggleGTKMetrics sCheckboxMetrics; -+static ToggleGTKMetrics sRadioMetrics; - - #define ARROW_UP 0 - #define ARROW_DOWN G_PI -@@ -110,6 +112,8 @@ moz_gtk_refresh() - - sScrollbarMetrics[GTK_ORIENTATION_HORIZONTAL].initialized = false; - sScrollbarMetrics[GTK_ORIENTATION_VERTICAL].initialized = false; -+ sCheckboxMetrics.initialized = false; -+ sRadioMetrics.initialized = false; - } - - gint -@@ -308,33 +312,21 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - gboolean isradio, GtkTextDirection direction) - { - GtkStateFlags state_flags = GetStateFlagsFromGtkWidgetState(state); -- gint indicator_size, indicator_spacing; - gint x, y, width, height; -- gint focus_x, focus_y, focus_width, focus_height; - GtkStyleContext *style; - -- GtkWidget *widget = GetWidget(isradio ? MOZ_GTK_RADIOBUTTON_CONTAINER : -- MOZ_GTK_CHECKBUTTON_CONTAINER); -- gtk_widget_style_get(widget, -- "indicator_size", &indicator_size, -- "indicator_spacing", &indicator_spacing, -- nullptr); -+ const ToggleGTKMetrics* metrics = GetToggleMetrics(isradio); - - // XXX we should assert rect->height >= indicator_size too - // after bug 369581 is fixed. -- MOZ_ASSERT(rect->width >= indicator_size, -+ MOZ_ASSERT(rect->width >= metrics->minSizeWithBorder.width, - "GetMinimumWidgetSize was ignored"); - - // Paint it center aligned in the rect. -- x = rect->x + (rect->width - indicator_size) / 2; -- y = rect->y + (rect->height - indicator_size) / 2; -- width = indicator_size; -- height = indicator_size; -- -- focus_x = x - indicator_spacing; -- focus_y = y - indicator_spacing; -- focus_width = width + 2 * indicator_spacing; -- focus_height = height + 2 * indicator_spacing; -+ width = metrics->minSizeWithBorder.width; -+ height = metrics->minSizeWithBorder.height; -+ x = rect->x + (rect->width - width) / 2; -+ y = rect->y + (rect->height - height) / 2; - - if (selected) - state_flags = static_cast(state_flags|checkbox_check_state); -@@ -348,20 +340,25 @@ moz_gtk_toggle_paint(cairo_t *cr, GdkRectangle* rect, - if (gtk_check_version(3, 20, 0) == nullptr) { - gtk_render_background(style, cr, x, y, width, height); - gtk_render_frame(style, cr, x, y, width, height); -- } -- -- if (isradio) { -- gtk_render_option(style, cr, x, y, width, height); -- if (state->focused) { -- gtk_render_focus(style, cr, focus_x, focus_y, -- focus_width, focus_height); -+ // Indicator is inset by the toggle's padding and border. -+ gint indicator_x = x + metrics->borderAndPadding.left; -+ gint indicator_y = y + metrics->borderAndPadding.top; -+ gint indicator_width = metrics->minSizeWithBorder.width - -+ metrics->borderAndPadding.left - metrics->borderAndPadding.right; -+ gint indicator_height = metrics->minSizeWithBorder.height - -+ metrics->borderAndPadding.top - metrics->borderAndPadding.bottom; -+ if (isradio) { -+ gtk_render_option(style, cr, indicator_x, indicator_y, -+ indicator_width, indicator_height); -+ } else { -+ gtk_render_check(style, cr, indicator_x, indicator_y, -+ indicator_width, indicator_height); - } -- } -- else { -- gtk_render_check(style, cr, x, y, width, height); -- if (state->focused) { -- gtk_render_focus(style, cr, -- focus_x, focus_y, focus_width, focus_height); -+ } else { -+ if (isradio) { -+ gtk_render_option(style, cr, x, y, width, height); -+ } else { -+ gtk_render_check(style, cr, x, y, width, height); - } - } - -@@ -2514,6 +2511,68 @@ SizeFromLengthAndBreadth(GtkOrientation aOrientation, - MozGtkSize({aLength, aBreadth}) : MozGtkSize({aBreadth, aLength}); - } - -+const ToggleGTKMetrics* -+GetToggleMetrics(bool isRadio) -+{ -+ ToggleGTKMetrics* metrics; -+ if (isRadio) { -+ metrics = &sRadioMetrics; -+ } else { -+ metrics = &sCheckboxMetrics; -+ } -+ if (metrics->initialized) -+ return metrics; -+ -+ metrics->initialized = true; -+ if (gtk_check_version(3,20,0) == nullptr) { -+ GtkStyleContext* style; -+ if (isRadio) { -+ style = GetStyleContext(MOZ_GTK_RADIOBUTTON); -+ } else { -+ style = GetStyleContext(MOZ_GTK_CHECKBUTTON); -+ } -+ GtkStateFlags state_flags = gtk_style_context_get_state(style); -+ gtk_style_context_get(style, state_flags, -+ "min-height",&(metrics->minSizeWithBorder.height), -+ "min-width", &(metrics->minSizeWithBorder.width), -+ nullptr); -+ // Fallback to indicator size if min dimensions are zero -+ if (metrics->minSizeWithBorder.height == 0 || -+ metrics->minSizeWithBorder.width == 0) { -+ gint indicator_size; -+ gtk_widget_style_get(GetWidget(MOZ_GTK_CHECKBUTTON_CONTAINER), -+ "indicator_size", &indicator_size, nullptr); -+ if (metrics->minSizeWithBorder.height == 0) { -+ metrics->minSizeWithBorder.height = indicator_size; -+ } -+ if (metrics->minSizeWithBorder.width == 0) { -+ metrics->minSizeWithBorder.width = indicator_size; -+ } -+ } -+ -+ GtkBorder border, padding; -+ gtk_style_context_get_border(style, state_flags, &border); -+ gtk_style_context_get_padding(style, state_flags, &padding); -+ metrics->borderAndPadding.left = border.left + padding.left; -+ metrics->borderAndPadding.right = border.right + padding.right; -+ metrics->borderAndPadding.top = border.top + padding.top; -+ metrics->borderAndPadding.bottom = border.bottom + padding.bottom; -+ metrics->minSizeWithBorder.width += metrics->borderAndPadding.left + -+ metrics->borderAndPadding.right; -+ metrics->minSizeWithBorder.height += metrics->borderAndPadding.top + -+ metrics->borderAndPadding.bottom; -+ } else { -+ gint indicator_size, indicator_spacing; -+ gtk_widget_style_get(GetWidget(MOZ_GTK_CHECKBUTTON_CONTAINER), -+ "indicator_size", &indicator_size, -+ "indicator_spacing", &indicator_spacing, -+ nullptr); -+ metrics->minSizeWithBorder.width = -+ metrics->minSizeWithBorder.height = indicator_size; -+ } -+ return metrics; -+} -+ - const ScrollbarGTKMetrics* - GetScrollbarMetrics(GtkOrientation aOrientation) - { -diff --git widget/gtk/gtkdrawing.h widget/gtk/gtkdrawing.h -index 42dbf8287499..909c18f7f525 100644 ---- widget/gtk/gtkdrawing.h -+++ widget/gtk/gtkdrawing.h -@@ -83,6 +83,12 @@ typedef struct { - } border; - } ScrollbarGTKMetrics; - -+typedef struct { -+ bool initialized; -+ MozGtkSize minSizeWithBorder; -+ GtkBorder borderAndPadding; -+} ToggleGTKMetrics; -+ - typedef enum { - MOZ_GTK_STEPPER_DOWN = 1 << 0, - MOZ_GTK_STEPPER_BOTTOM = 1 << 1, -@@ -391,6 +397,14 @@ moz_gtk_get_tab_border(gint* left, gint* top, gint* right, gint* bottom, - gint - moz_gtk_checkbox_get_metrics(gint* indicator_size, gint* indicator_spacing); - -+/** -+ * Get metrics of the toggle (radio or checkbox) -+ * isRadio: [IN] true when requesting metrics for the radio button -+ * returns: pointer to ToggleGTKMetrics struct -+ */ -+const ToggleGTKMetrics* -+GetToggleMetrics(bool isRadio); -+ - /** - * Get the desired size of a GtkRadioButton - * indicator_size: [OUT] the indicator size -diff --git widget/gtk/nsNativeThemeGTK.cpp widget/gtk/nsNativeThemeGTK.cpp -index 06e62efbcda8..da3eaa71a6b4 100644 ---- widget/gtk/nsNativeThemeGTK.cpp -+++ widget/gtk/nsNativeThemeGTK.cpp -@@ -1020,24 +1020,6 @@ nsNativeThemeGTK::GetExtraSizeForWidget(nsIFrame* aFrame, uint8_t aWidgetType, - aExtra->left = aExtra->right = 1; - break; - -- // Include the indicator spacing (the padding around the control). -- case NS_THEME_CHECKBOX: -- case NS_THEME_RADIO: -- { -- gint indicator_size, indicator_spacing; -- -- if (aWidgetType == NS_THEME_CHECKBOX) { -- moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing); -- } else { -- moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing); -- } -- -- aExtra->top = indicator_spacing; -- aExtra->right = indicator_spacing; -- aExtra->bottom = indicator_spacing; -- aExtra->left = indicator_spacing; -- break; -- } - case NS_THEME_BUTTON : - { - if (IsDefaultButton(aFrame)) { -@@ -1595,17 +1577,9 @@ nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext, - case NS_THEME_CHECKBOX: - case NS_THEME_RADIO: - { -- gint indicator_size, indicator_spacing; -- -- if (aWidgetType == NS_THEME_CHECKBOX) { -- moz_gtk_checkbox_get_metrics(&indicator_size, &indicator_spacing); -- } else { -- moz_gtk_radio_get_metrics(&indicator_size, &indicator_spacing); -- } -- -- // Include space for the indicator and the padding around it. -- aResult->width = indicator_size; -- aResult->height = indicator_size; -+ const ToggleGTKMetrics* metrics = GetToggleMetrics(aWidgetType == NS_THEME_RADIO); -+ aResult->width = metrics->minSizeWithBorder.width; -+ aResult->height = metrics->minSizeWithBorder.height; - } - break; - case NS_THEME_TOOLBARBUTTON_DROPDOWN: Property changes on: head/www/waterfox/files/patch-bug1381815 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1445234 =================================================================== --- head/www/waterfox/files/patch-bug1445234 (revision 469878) +++ head/www/waterfox/files/patch-bug1445234 (nonexistent) @@ -1,85 +0,0 @@ -commit 66fbcba45541 -Author: Alex Gaynor -Date: Mon Apr 9 10:48:09 2018 -0400 - - Bug 1445234 - Use ContiguousEnumSerializer for serializing nsCursor. r=smaug, a=RyanVM - - --HG-- - extra : source : a2385811ffdc30f153b8d5853f198c89020bf5ce - extra : amend_source : bc18c122db5db07a99a839f5421b49e9c5229160 ---- - dom/ipc/PBrowser.ipdl | 3 ++- - dom/ipc/TabParent.cpp | 4 ++-- - dom/ipc/TabParent.h | 4 ++-- - widget/WidgetMessageUtils.h | 6 ++++++ - 4 files changed, 12 insertions(+), 5 deletions(-) - -diff --git dom/ipc/PBrowser.ipdl dom/ipc/PBrowser.ipdl -index b1cf9efbe964..024ebc5b6cf7 100644 ---- dom/ipc/PBrowser.ipdl -+++ dom/ipc/PBrowser.ipdl -@@ -69,6 +69,7 @@ using mozilla::CommandInt from "mozilla/EventForwards.h"; - using mozilla::WritingMode from "mozilla/WritingModes.h"; - using mozilla::layers::TouchBehaviorFlags from "mozilla/layers/APZUtils.h"; - using nsIWidget::TouchPointerState from "nsIWidget.h"; -+using nsCursor from "nsIWidget.h"; - using struct LookAndFeelInt from "mozilla/widget/WidgetMessageUtils.h"; - using class mozilla::dom::MessagePort from "mozilla/dom/MessagePort.h"; - using class mozilla::dom::ipc::StructuredCloneData from "mozilla/dom/ipc/StructuredCloneData.h"; -@@ -366,7 +367,7 @@ parent: - * Invalidate any locally cached cursor settings and force an - * update. - */ -- async SetCursor(uint32_t value, bool force); -+ async SetCursor(nsCursor value, bool force); - - /** - * Set the native cursor using a custom image. -diff --git dom/ipc/TabParent.cpp dom/ipc/TabParent.cpp -index ae43c24e8891..86bb854962be 100644 ---- dom/ipc/TabParent.cpp -+++ dom/ipc/TabParent.cpp -@@ -1723,9 +1723,9 @@ TabParent::RecvAsyncMessage(const nsString& aMessage, - } - - mozilla::ipc::IPCResult --TabParent::RecvSetCursor(const uint32_t& aCursor, const bool& aForce) -+TabParent::RecvSetCursor(const nsCursor& aCursor, const bool& aForce) - { -- mCursor = static_cast(aCursor); -+ mCursor = aCursor; - mCustomCursor = nullptr; - - nsCOMPtr widget = GetWidget(); -diff --git dom/ipc/TabParent.h dom/ipc/TabParent.h -index e3c2601ce0b4..7d62663835d7 100644 ---- dom/ipc/TabParent.h -+++ dom/ipc/TabParent.h -@@ -274,8 +274,8 @@ public: - nsTArray&& aEnabledCommands, - nsTArray&& aDisabledCommands) override; - -- virtual mozilla::ipc::IPCResult -- RecvSetCursor(const uint32_t& aValue, const bool& aForce) override; -+ virtual mozilla::ipc::IPCResult RecvSetCursor(const nsCursor& aValue, -+ const bool& aForce) override; - - virtual mozilla::ipc::IPCResult RecvSetCustomCursor(const nsCString& aUri, - const uint32_t& aWidth, -diff --git widget/WidgetMessageUtils.h widget/WidgetMessageUtils.h -index 8ab831a206da..2add8fd9533e 100644 ---- widget/WidgetMessageUtils.h -+++ widget/WidgetMessageUtils.h -@@ -34,6 +34,12 @@ struct ParamTraits - } - }; - -+template<> -+struct ParamTraits -+ : public ContiguousEnumSerializer -+{ -+}; -+ - } // namespace IPC - - #endif // WidgetMessageUtils_h Property changes on: head/www/waterfox/files/patch-bug1445234 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1444668 =================================================================== --- head/www/waterfox/files/patch-bug1444668 (revision 469878) +++ head/www/waterfox/files/patch-bug1444668 (nonexistent) @@ -1,126 +0,0 @@ -commit cd8b6897bc4b -Author: Jan de Mooij -Date: Tue Apr 10 15:00:49 2018 +0200 - - Bug 1444668 - Avoid allocating large AssemblerBuffers. r=luke, r=bbouvier, a=RyanVM - - --HG-- - extra : source : d4aad468062493810bdc58e6a18f7322d59d4066 ---- - js/src/jit/MacroAssembler.cpp | 6 ++++ - js/src/jit/shared/IonAssemblerBuffer.h | 12 +++----- - js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h | 32 +++++++++++++++++++++- - 3 files changed, 41 insertions(+), 9 deletions(-) - -diff --git js/src/jit/MacroAssembler.cpp js/src/jit/MacroAssembler.cpp -index bf6d47bebfa0..fed23892021a 100644 ---- js/src/jit/MacroAssembler.cpp -+++ js/src/jit/MacroAssembler.cpp -@@ -2677,6 +2677,12 @@ MacroAssembler::finish() - } - - MacroAssemblerSpecific::finish(); -+ -+ MOZ_RELEASE_ASSERT(size() <= MaxCodeBytesPerProcess, -+ "AssemblerBuffer should ensure we don't exceed MaxCodeBytesPerProcess"); -+ -+ if (bytesNeeded() > MaxCodeBytesPerProcess) -+ setOOM(); - } - - void -diff --git js/src/jit/shared/IonAssemblerBuffer.h js/src/jit/shared/IonAssemblerBuffer.h -index b37b7518fdb6..6d4bf405b5ca 100644 ---- js/src/jit/shared/IonAssemblerBuffer.h -+++ js/src/jit/shared/IonAssemblerBuffer.h -@@ -189,6 +189,10 @@ class AssemblerBuffer - - protected: - virtual Slice* newSlice(LifoAlloc& a) { -+ if (size() > MaxCodeBytesPerProcess - sizeof(Slice)) { -+ fail_oom(); -+ return nullptr; -+ } - Slice* tmp = static_cast(a.alloc(sizeof(Slice))); - if (!tmp) { - fail_oom(); -@@ -298,6 +297,9 @@ class AssemblerBuffer - return bufferSize + tail->length(); - return bufferSize; - } -+ BufferOffset nextOffset() const { -+ return BufferOffset(size()); -+ } - - bool oom() const { return m_oom || m_bail; } - bool bail() const { return m_bail; } -@@ -413,12 +415,6 @@ class AssemblerBuffer - return getInstBackwards(off, prev, bufferSize - prev->length()); - } - -- BufferOffset nextOffset() const { -- if (tail) -- return BufferOffset(bufferSize + tail->length()); -- return BufferOffset(bufferSize); -- } -- - typedef AssemblerBuffer ThisClass; - - class AssemblerBufferInstIterator -diff --git js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h -index fa921d91db26..f9a6f5a3ea50 100644 ---- js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h -+++ js/src/jit/x86-shared/AssemblerBuffer-x86-shared.h -@@ -67,6 +67,33 @@ namespace js { - - namespace jit { - -+ // AllocPolicy for AssemblerBuffer. OOMs when trying to allocate more than -+ // MaxCodeBytesPerProcess bytes. Use private inheritance to make sure we -+ // explicitly have to expose SystemAllocPolicy methods. -+ class AssemblerBufferAllocPolicy : private SystemAllocPolicy -+ { -+ public: -+ using SystemAllocPolicy::checkSimulatedOOM; -+ using SystemAllocPolicy::reportAllocOverflow; -+ using SystemAllocPolicy::free_; -+ -+ template T* pod_realloc(T* p, size_t oldSize, size_t newSize) { -+ static_assert(sizeof(T) == 1, -+ "AssemblerBufferAllocPolicy should only be used with byte vectors"); -+ MOZ_ASSERT(oldSize <= MaxCodeBytesPerProcess); -+ if (MOZ_UNLIKELY(newSize > MaxCodeBytesPerProcess)) -+ return nullptr; -+ return SystemAllocPolicy::pod_realloc(p, oldSize, newSize); -+ } -+ template T* pod_malloc(size_t numElems) { -+ static_assert(sizeof(T) == 1, -+ "AssemblerBufferAllocPolicy should only be used with byte vectors"); -+ if (MOZ_UNLIKELY(numElems > MaxCodeBytesPerProcess)) -+ return nullptr; -+ return SystemAllocPolicy::pod_malloc(numElems); -+ } -+ }; -+ - class AssemblerBuffer - { - template -@@ -87,6 +114,9 @@ namespace jit { - - void ensureSpace(size_t space) - { -+ // This should only be called with small |space| values to ensure -+ // we don't overflow below. -+ MOZ_ASSERT(space <= 16); - if (MOZ_UNLIKELY(!m_buffer.reserve(m_buffer.length() + space))) - oomDetected(); - } -@@ -164,7 +194,7 @@ namespace jit { - m_buffer.clear(); - } - -- mozilla::Vector m_buffer; -+ mozilla::Vector m_buffer; - bool m_oom; - }; - Property changes on: head/www/waterfox/files/patch-bug1444668 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1436983 =================================================================== --- head/www/waterfox/files/patch-bug1436983 (revision 469878) +++ head/www/waterfox/files/patch-bug1436983 (nonexistent) @@ -1,52 +0,0 @@ -commit 7721a472b21b -Author: Jon Coppeard -Date: Mon Feb 12 10:34:21 2018 +0000 - - Bug 1436983 - Don't GC while linking JIT code r=nbp - - --HG-- - extra : rebase_source : b096346182b263753414e1ef7aa4cb86d57d7386 ---- - js/src/jit-test/tests/ion/getprop-primitive.js | 3 ++- - js/src/jit/CodeGenerator.cpp | 7 ++++++- - 2 files changed, 8 insertions(+), 2 deletions(-) - -diff --git js/src/jit-test/tests/ion/getprop-primitive.js js/src/jit-test/tests/ion/getprop-primitive.js -index 2cb912d7d4d42..bf59e35b5702b 100644 ---- js/src/jit-test/tests/ion/getprop-primitive.js -+++ js/src/jit-test/tests/ion/getprop-primitive.js -@@ -35,7 +35,8 @@ var template = function (set) { - // If we bailout in the inner loop, then x will have a smaller value - // than the number of iterations. - cont = assertEqIf(lastX > 0, x, set.length); -- lastX = x; -+ if (inIon()) -+ lastX = x; - x = 0; - } - return y; -diff --git js/src/jit/CodeGenerator.cpp js/src/jit/CodeGenerator.cpp -index 1b275a75cfd7e..6677d6cee443c 100644 ---- js/src/jit/CodeGenerator.cpp -+++ js/src/jit/CodeGenerator.cpp -@@ -9838,6 +9838,11 @@ CodeGenerator::linkSharedStubs(JSContext* cx) - bool - CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints) - { -+ // We cancel off-thread Ion compilations in a few places during GC, but if -+ // this compilation was performed off-thread it will already have been -+ // removed from the relevant lists by this point. Don't allow GC here. -+ JS::AutoAssertNoGC nogc(cx); -+ - RootedScript script(cx, gen->info().script()); - OptimizationLevel optimizationLevel = gen->optimizationInfo().level(); - -@@ -9918,7 +9923,7 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints) - // read barriers which were skipped while compiling the script off thread. - Linker linker(masm); - AutoFlushICache afc("IonLink"); -- JitCode* code = linker.newCode(cx, ION_CODE, !patchableBackedges_.empty()); -+ JitCode* code = linker.newCode(cx, ION_CODE, !patchableBackedges_.empty()); - if (!code) - return false; - Property changes on: head/www/waterfox/files/patch-bug1436983 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1436241 =================================================================== --- head/www/waterfox/files/patch-bug1436241 (nonexistent) +++ head/www/waterfox/files/patch-bug1436241 (revision 469879) @@ -0,0 +1,54 @@ +commit 540471c8085c +Author: Kyle Machulis +Date: Mon Apr 30 12:49:15 2018 -0700 + + Bug 1436241 - Check redirect status code before forwarding to NPAPI. r=jimm, r=pauljt, a=RyanVM + + NPAPI may handle a 307 redirect across different origins, while they + should only happen on same origin requests. Have the browser check + this before forwarding to NPAPI. + + MozReview-Commit-ID: 5vxMooygI4g + + --HG-- + extra : source : 6d595a423fb52766abb5c1d10d4b9d7d6027d68a +--- + dom/plugins/base/nsPluginStreamListenerPeer.cpp | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +diff --git dom/plugins/base/nsPluginStreamListenerPeer.cpp dom/plugins/base/nsPluginStreamListenerPeer.cpp +index b780688ddd0c7..dd8e84d2df075 100644 +--- dom/plugins/base/nsPluginStreamListenerPeer.cpp ++++ dom/plugins/base/nsPluginStreamListenerPeer.cpp +@@ -668,15 +668,6 @@ nsPluginStreamListenerPeer::AsyncOnChannelRedirect(nsIChannel *oldChannel, nsICh + return NS_ERROR_FAILURE; + } + +- nsCOMPtr proxyCallback = +- new ChannelRedirectProxyCallback(this, callback, oldChannel, newChannel); +- +- // Give NPAPI a chance to control redirects. +- bool notificationHandled = mPStreamListener->HandleRedirectNotification(oldChannel, newChannel, proxyCallback); +- if (notificationHandled) { +- return NS_OK; +- } +- + // Don't allow cross-origin 307 POST redirects. + nsCOMPtr oldHttpChannel(do_QueryInterface(oldChannel)); + if (oldHttpChannel) { +@@ -700,6 +691,15 @@ nsPluginStreamListenerPeer::AsyncOnChannelRedirect(nsIChannel *oldChannel, nsICh + } + } + ++ nsCOMPtr proxyCallback = ++ new ChannelRedirectProxyCallback(this, callback, oldChannel, newChannel); ++ ++ // Give NPAPI a chance to control redirects. ++ bool notificationHandled = mPStreamListener->HandleRedirectNotification(oldChannel, newChannel, proxyCallback); ++ if (notificationHandled) { ++ return NS_OK; ++ } ++ + // Fall back to channel event sink for window. + nsCOMPtr channelEventSink; + nsresult rv = GetInterfaceGlobal(NS_GET_IID(nsIChannelEventSink), getter_AddRefs(channelEventSink)); Property changes on: head/www/waterfox/files/patch-bug1436241 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1451262 =================================================================== --- head/www/waterfox/files/patch-bug1451262 (nonexistent) +++ head/www/waterfox/files/patch-bug1451262 (revision 469879) @@ -0,0 +1,62 @@ +commit 659634effe22 +Author: Valentin Gosu +Date: Wed Apr 4 13:47:46 2018 +0300 + + Bug 1451262 - Clear gSocketThread after finishing all operations so we don't trigger thread assertions r=mayhemer + + MozReview-Commit-ID: AHMPd72S2GB + + --HG-- + extra : rebase_source : fe5fb1604e771f223d78f23fcf9d37b1f85763f9 +--- + netwerk/base/nsSocketTransportService2.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git netwerk/base/nsSocketTransportService2.cpp netwerk/base/nsSocketTransportService2.cpp +index abaa8f8fb6da3..a16d888998ae9 100644 +--- netwerk/base/nsSocketTransportService2.cpp ++++ netwerk/base/nsSocketTransportService2.cpp +@@ -1067,9 +1067,8 @@ nsSocketTransportService::Run() + // socket detach handlers get processed. + NS_ProcessPendingEvents(mRawThread); + +- gSocketThread = nullptr; +- + psm::StopSSLServerCertVerificationThreads(); ++ gSocketThread = nullptr; + + SOCKET_LOG(("STS thread exit\n")); + +commit 43e3838b681b +Author: Valentin Gosu +Date: Thu May 10 10:37:24 2018 +0200 + + Bug 1451262 - Call NS_ProcessPendingEvents after StopSSLServerCertVerificationThreads. r=mayhemer, a=RyanVM + + If there are still pending events after we null out gSocketThread, OnSocketThread() will always return false, which can trigger assertions. + + MozReview-Commit-ID: CovFIU3cKL + + --HG-- + extra : source : b859a16d74500eed3b00d7e0bc1eba0d9e0c34a4 +--- + netwerk/base/nsSocketTransportService2.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git netwerk/base/nsSocketTransportService2.cpp netwerk/base/nsSocketTransportService2.cpp +index 637a7d95f748c..06cda53f52056 100644 +--- netwerk/base/nsSocketTransportService2.cpp ++++ netwerk/base/nsSocketTransportService2.cpp +@@ -1067,7 +1067,12 @@ nsSocketTransportService::Run() + // socket detach handlers get processed. + NS_ProcessPendingEvents(mRawThread); + ++ // Stopping the SLL threads can generate new events, so we need to ++ // process them before nulling out gSocketThread, otherwise we can get ++ // !onSocketThread assertions. + psm::StopSSLServerCertVerificationThreads(); ++ NS_ProcessPendingEvents(mRawThread); ++ + gSocketThread = nullptr; + + SOCKET_LOG(("STS thread exit\n")); Property changes on: head/www/waterfox/files/patch-bug1451262 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1452576 =================================================================== --- head/www/waterfox/files/patch-bug1452576 (nonexistent) +++ head/www/waterfox/files/patch-bug1452576 (revision 469879) @@ -0,0 +1,92 @@ +commit fac32e857b4b +Author: Andrea Marchesini +Date: Thu May 10 09:02:16 2018 +0200 + + Bug 1452576 - Improve StructuredCloneHolder for fuzzy tests. r=decoder, a=RyanVM + + --HG-- + extra : source : c8d6bf455ae5ac9a31ff9fc5418e87a66f12e89c +--- + dom/base/StructuredCloneHolder.cpp | 34 ++++++++++++++++++---------------- + 1 file changed, 18 insertions(+), 16 deletions(-) + +diff --git dom/base/StructuredCloneHolder.cpp dom/base/StructuredCloneHolder.cpp +index 745ef7871b856..9f697fc2878e7 100644 +--- dom/base/StructuredCloneHolder.cpp ++++ dom/base/StructuredCloneHolder.cpp +@@ -1024,9 +1024,9 @@ StructuredCloneHolder::CustomReadHandler(JSContext* aCx, + return ReadFormData(aCx, aReader, aIndex, this); + } + +- if (aTag == SCTAG_DOM_IMAGEBITMAP) { +- MOZ_ASSERT(mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || +- mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread); ++ if (aTag == SCTAG_DOM_IMAGEBITMAP && ++ (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || ++ mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread)) { + + // Get the current global object. + // This can be null. +@@ -1040,7 +1040,9 @@ StructuredCloneHolder::CustomReadHandler(JSContext* aCx, + return StructuredCloneBlob::ReadStructuredClone(aCx, aReader, this); + } + +- if (aTag == SCTAG_DOM_WASM) { ++ if (aTag == SCTAG_DOM_WASM && ++ (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || ++ mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread)) { + return ReadWasmModule(aCx, aIndex, this); + } + +@@ -1175,9 +1177,9 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx, + return true; + } + +- if (aTag == SCTAG_DOM_CANVAS) { +- MOZ_ASSERT(mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || +- mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread); ++ if (aTag == SCTAG_DOM_CANVAS && ++ (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || ++ mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread)) { + MOZ_ASSERT(aContent); + OffscreenCanvasCloneData* data = + static_cast(aContent); +@@ -1195,9 +1197,9 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx, + return true; + } + +- if (aTag == SCTAG_DOM_IMAGEBITMAP) { +- MOZ_ASSERT(mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || +- mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread); ++ if (aTag == SCTAG_DOM_IMAGEBITMAP && ++ (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || ++ mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread)) { + MOZ_ASSERT(aContent); + ImageBitmapCloneData* data = + static_cast(aContent); +@@ -1320,9 +1322,9 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag, + return; + } + +- if (aTag == SCTAG_DOM_CANVAS) { +- MOZ_ASSERT(mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || +- mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread); ++ if (aTag == SCTAG_DOM_CANVAS && ++ (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || ++ mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread)) { + MOZ_ASSERT(aContent); + OffscreenCanvasCloneData* data = + static_cast(aContent); +@@ -1330,9 +1332,9 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag, + return; + } + +- if (aTag == SCTAG_DOM_IMAGEBITMAP) { +- MOZ_ASSERT(mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || +- mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread); ++ if (aTag == SCTAG_DOM_IMAGEBITMAP && ++ (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread || ++ mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread)) { + MOZ_ASSERT(aContent); + ImageBitmapCloneData* data = + static_cast(aContent); Property changes on: head/www/waterfox/files/patch-bug1452576 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1458166 =================================================================== --- head/www/waterfox/files/patch-bug1458166 (nonexistent) +++ head/www/waterfox/files/patch-bug1458166 (revision 469879) @@ -0,0 +1,75 @@ +commit 64082ca923f8 +Author: Andreas Pehrson +Date: Mon May 7 11:33:07 2018 +0200 + + Bug 1458166 - Clear out tracks while destroying MediaStream. r=bryce, a=RyanVM + + MediaStream::Destroy() is part of a controlled shutdown sequence. + If there are still tracks with content beyond Destroy() they will + only get caught by the dtor, which may be on CC shutdown and too late. + + MozReview-Commit-ID: GV6XRiTCIRk + + --HG-- + extra : source : da84235630724b32d2e619c4ae6b7ae34a4c5c2d +--- + dom/media/MediaStreamGraph.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git dom/media/MediaStreamGraph.cpp dom/media/MediaStreamGraph.cpp +index 1c6683c966084..9cdb50e8abc98 100644 +--- dom/media/MediaStreamGraph.cpp ++++ dom/media/MediaStreamGraph.cpp +@@ -2054,6 +2054,7 @@ MediaStream::DestroyImpl() + for (int32_t i = mConsumers.Length() - 1; i >= 0; --i) { + mConsumers[i]->Disconnect(); + } ++ mTracks.Clear(); + mGraph = nullptr; + } + +commit d18fab7f3fa9 +Author: Andreas Pehrson +Date: Mon May 7 11:36:35 2018 +0200 + + Bug 1458166 - Remove listeners before destroying MediaStreams. r=bryce, a=RyanVM + + If listeners are still registered to a MediaStream on MediaStream::Destroy + (triggered by MediaStream::UnregisterUser below), they will catch and act + on further events from the MediaStream (such as a track ending). + + This may dispatch runnables that are unnecessary since we know we are + shutting down. + + If we first remove the listeners from the MediaStream we will never see + said events. + + MozReview-Commit-ID: IZ1kENqL2C8 + + --HG-- + extra : source : 8dc7d2696a29c0752066ebe67962b1ad323c4153 +--- + dom/media/DOMMediaStream.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git dom/media/DOMMediaStream.cpp dom/media/DOMMediaStream.cpp +index f69324d416a8f..febb527556701 100644 +--- dom/media/DOMMediaStream.cpp ++++ dom/media/DOMMediaStream.cpp +@@ -455,10 +455,16 @@ DOMMediaStream::Destroy() + { + LOG(LogLevel::Debug, ("DOMMediaStream %p Being destroyed.", this)); + if (mOwnedListener) { ++ if (mOwnedStream) { ++ mOwnedStream->RemoveListener(mOwnedListener); ++ } + mOwnedListener->Forget(); + mOwnedListener = nullptr; + } + if (mPlaybackListener) { ++ if (mPlaybackStream) { ++ mPlaybackStream->RemoveListener(mPlaybackListener); ++ } + mPlaybackListener->Forget(); + mPlaybackListener = nullptr; + } Property changes on: head/www/waterfox/files/patch-bug1458166 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1458720 =================================================================== --- head/www/waterfox/files/patch-bug1458720 (nonexistent) +++ head/www/waterfox/files/patch-bug1458720 (revision 469879) @@ -0,0 +1,99 @@ +commit ba437f08694c +Author: David Keeler +Date: Wed May 2 16:42:51 2018 -0700 + + Bug 1458720 - Make RunOnAllContentParents runnable from any thread. r=Ehsan, r=jcj, a=RyanVM + + In bug 1215723 RunOnAllContentParents was added to the DataStorage + implementation so we could make more security state information available in + child processes. It uses IPC APIs, which in general are not thread-safe. We need + to make sure that these APIs are only accessed on the main thread, which means + we have to copy any necessary data, create a runnable, and send it to the main + thread to do the actual work. Note that the IPC APIs are async, so this dispatch + can be async as well. + + MozReview-Commit-ID: HwkgSX1iORU + + --HG-- + extra : source : 38e60f49b316258b72f8453387049c16d2005867 +--- + security/manager/ssl/DataStorage.cpp | 34 +++++++++++++++++++++++----------- + 1 file changed, 23 insertions(+), 11 deletions(-) + +diff --git security/manager/ssl/DataStorage.cpp security/manager/ssl/DataStorage.cpp +index e93f7f50a0b39..00e43f298aae3 100644 +--- security/manager/ssl/DataStorage.cpp ++++ security/manager/ssl/DataStorage.cpp +@@ -707,6 +707,8 @@ DataStorage::MaybeEvictOneEntry(DataStorageType aType, + } + } + ++// NB: Because this may cross a thread boundary, any variables captured by the ++// Functor must be captured by copy and not by reference. + template + static + void +@@ -716,11 +718,16 @@ RunOnAllContentParents(Functor func) + return; + } + using dom::ContentParent; +- nsTArray parents; +- ContentParent::GetAll(parents); +- for (auto& parent: parents) { +- func(parent); +- } ++ ++ nsCOMPtr r = NS_NewRunnableFunction("RunOnAllContentParents", ++ [func] () { ++ nsTArray parents; ++ ContentParent::GetAll(parents); ++ for (auto& parent: parents) { ++ func(parent); ++ } ++ }); ++ MOZ_ALWAYS_SUCCEEDS(NS_DispatchToMainThread(r)); + } + + nsresult +@@ -749,12 +756,14 @@ DataStorage::Put(const nsCString& aKey, const nsCString& aValue, + return rv; + } + +- RunOnAllContentParents([&](dom::ContentParent* aParent) { ++ nsString filename(mFilename); ++ RunOnAllContentParents( ++ [aKey, aValue, aType, filename] (dom::ContentParent* aParent) { + DataStorageItem item; + item.key() = aKey; + item.value() = aValue; + item.type() = aType; +- Unused << aParent->SendDataStoragePut(mFilename, item); ++ Unused << aParent->SendDataStoragePut(filename, item); + }); + + return NS_OK; +@@ -788,8 +797,10 @@ DataStorage::Remove(const nsCString& aKey, DataStorageType aType) + Unused << AsyncSetTimer(lock); + } + +- RunOnAllContentParents([&](dom::ContentParent* aParent) { +- Unused << aParent->SendDataStorageRemove(mFilename, aKey, aType); ++ nsString filename(mFilename); ++ RunOnAllContentParents( ++ [filename, aKey, aType] (dom::ContentParent* aParent) { ++ Unused << aParent->SendDataStorageRemove(filename, aKey, aType); + }); + } + +@@ -914,8 +925,9 @@ DataStorage::Clear() + } + } + +- RunOnAllContentParents([&](dom::ContentParent* aParent) { +- Unused << aParent->SendDataStorageClear(mFilename); ++ nsString filename(mFilename); ++ RunOnAllContentParents([filename] (dom::ContentParent* aParent) { ++ Unused << aParent->SendDataStorageClear(filename); + }); + + return NS_OK; Property changes on: head/www/waterfox/files/patch-bug1458720 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-bug1459206 =================================================================== --- head/www/waterfox/files/patch-bug1459206 (nonexistent) +++ head/www/waterfox/files/patch-bug1459206 (revision 469879) @@ -0,0 +1,44 @@ +commit 4741651d3ac6 +Author: Andrea Marchesini +Date: Thu May 10 11:24:25 2018 +0200 + + Bug 1459206 - Use FileSystemSecurity in ContentParent::RecvGetFilesRequest. r=ehsan, a=RyanVM + + --HG-- + extra : source : a3ebab26f0d9e962f1f892335838ee1b51335378 +--- + dom/filesystem/tests/test_webkitdirectory.html | 1 + + dom/ipc/ContentParent.cpp | 8 ++++++++ + 2 files changed, 9 insertions(+) + +diff --git dom/filesystem/tests/test_webkitdirectory.html dom/filesystem/tests/test_webkitdirectory.html +index 3611039a5a46a..45957f9bb56d0 100644 +--- dom/filesystem/tests/test_webkitdirectory.html ++++ dom/filesystem/tests/test_webkitdirectory.html +@@ -151,6 +151,7 @@ function test_changeDataWhileWorking() { + + function test_setup() { + SpecialPowers.pushPrefEnv({"set": [["dom.input.dirpicker", true], ++ ["dom.filesystem.pathcheck.disabled", true], + ["dom.webkitBlink.dirPicker.enabled", true]]}, next); + } + +diff --git dom/ipc/ContentParent.cpp dom/ipc/ContentParent.cpp +index 9912238b27744..c55fb106690f0 100644 +--- dom/ipc/ContentParent.cpp ++++ dom/ipc/ContentParent.cpp +@@ -5241,6 +5241,14 @@ ContentParent::RecvGetFilesRequest(const nsID& aUUID, + { + MOZ_ASSERT(!mGetFilesPendingRequests.GetWeak(aUUID)); + ++ if (!mozilla::Preferences::GetBool("dom.filesystem.pathcheck.disabled", false)) { ++ RefPtr fss = FileSystemSecurity::Get(); ++ if (NS_WARN_IF(!fss || ++ !fss->ContentProcessHasAccessTo(ChildID(), aDirectoryPath))) { ++ return IPC_FAIL_NO_REASON(this); ++ } ++ } ++ + ErrorResult rv; + RefPtr helper = + GetFilesHelperParent::Create(aUUID, aDirectoryPath, aRecursiveFlag, this, Property changes on: head/www/waterfox/files/patch-bug1459206 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/www/waterfox/files/patch-typos =================================================================== --- head/www/waterfox/files/patch-typos (revision 469878) +++ head/www/waterfox/files/patch-typos (revision 469879) @@ -1,42 +1,55 @@ Mismerges found by comparing changes with Firefox 56 --- browser/components/customizableui/CustomizeMode.jsm +++ browser/components/customizableui/CustomizeMode.jsm @@ -735,7 +735,6 @@ CustomizeMode.prototype = { // Put the tip contents in the popup. let bundle = this.document.getElementById("bundle_browser"); const kLabelClass = "customization-tipPanel-link"; - // eslint-disable-next-line no-unsanitized/property messageNode.unsafeSetInnerHTML(bundle.getFormattedString("customizeTips.tip0", [ "