diff options
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch | 203 | ||||
-rw-r--r-- | 0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch | 117 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | glibc-2.26-fix.diff | 258 | ||||
-rw-r--r-- | plugin-crash.diff | 50 |
6 files changed, 224 insertions, 458 deletions
@@ -1,8 +1,8 @@ # Generated by makepkg 5.0.2 -# Sun Nov 19 16:34:30 UTC 2017 +# Tue Nov 28 23:11:14 UTC 2017 pkgbase = cliqz pkgdesc = Firefox-based privacy aware web browser, build from sources - pkgver = 1.16.3 + pkgver = 1.17.0 pkgrel = 1 url = https://cliqz.com/ arch = i686 @@ -37,20 +37,16 @@ pkgbase = cliqz options = !emptydirs options = !makeflags options = !strip - source = https://github.com/cliqz-oss/browser-f/archive/1.16.3.tar.gz + source = https://github.com/cliqz-oss/browser-f/archive/1.17.0.tar.gz source = wifi-disentangle.patch source = wifi-fix-interface.patch source = no-plt.diff - source = plugin-crash.diff - source = glibc-2.26-fix.diff - source = 0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch - sha256sums = 657eec637ded9b3144e7bdc5e1adddfeaf1180e4f82d5297ce8ac8fba7baeb7b + source = 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch + sha256sums = 11aec82033c9deea31e109108f553f4c87a089cba318aff19f32a0f091e237ff sha256sums = f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed sha256sums = e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1 sha256sums = ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa - sha256sums = a7e5d2430bb562f6367deb07417dad4368317e8e8be5d1cfa842c3356de3cfc0 - sha256sums = cd7ff441da66a287f8712e60cdc9e216c30355d521051e2eaae28a66d81915e8 - sha256sums = aba767995ffb1a55345e30aaba667f43d469e23bd9b1b68263cf71b8118acc96 + sha256sums = 1f71b379f2262d7319624c2aed31fa2dbed42828feccc27b1cd82153b76ad707 pkgname = cliqz diff --git a/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch b/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch new file mode 100644 index 000000000000..bd54d89cbdb4 --- /dev/null +++ b/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch @@ -0,0 +1,203 @@ +From 34508b32f65d5ad8143623b1258eb92d347514e2 Mon Sep 17 00:00:00 2001 +Message-Id: <34508b32f65d5ad8143623b1258eb92d347514e2.1511260210.git.jan.steffens@gmail.com> +From: Robin Grenet <robin.grenet@wanadoo.fr> +Date: Thu, 16 Nov 2017 13:35:58 +0100 +Subject: [PATCH] Bug 1360278 - Add preference to trigger context menu on mouse + up for GTK+ and macOS, r=mstange,smaug + +MozReview-Commit-ID: Bg60bD8jIg6 + +--HG-- +extra : rebase_source : cc8bd5796096f49ad4fdab81885a426afd6117e4 +--- + modules/libpref/init/all.js | 4 ++++ + widget/cocoa/nsChildView.mm | 23 +++++++++++++++++++++-- + widget/gtk/nsWindow.cpp | 27 ++++++++++++++++++++------- + widget/gtk/nsWindow.h | 2 ++ + widget/nsBaseWidget.cpp | 16 ++++++++++++++++ + widget/nsBaseWidget.h | 6 ++++++ + 6 files changed, 69 insertions(+), 9 deletions(-) + +diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js +index 315422a6e2255e5f..92bcf5f02564d46e 100644 +--- a/modules/libpref/init/all.js ++++ b/modules/libpref/init/all.js +@@ -234,6 +234,10 @@ pref("browser.sessionhistory.max_total_viewers", -1); + + pref("ui.use_native_colors", true); + pref("ui.click_hold_context_menus", false); ++ ++// Pop up context menu on mouseup instead of mousedown, if that's the OS default. ++// Note: ignored on Windows (context menus always use mouseup) ++pref("ui.context_menus.after_mouseup", false); + // Duration of timeout of incremental search in menus (ms). 0 means infinite. + pref("ui.menu.incremental_search.timeout", 1000); + // If true, all popups won't hide automatically on blur +diff --git a/widget/cocoa/nsChildView.mm b/widget/cocoa/nsChildView.mm +index cac897327a190422..bf42b4f8c0950753 100644 +--- a/widget/cocoa/nsChildView.mm ++++ b/widget/cocoa/nsChildView.mm +@@ -4700,30 +4700,49 @@ NSEvent* gLastDragMouseDownEvent = nil; + if (!mGeckoChild) + return; + +- // Let the superclass do the context menu stuff. +- [super rightMouseDown:theEvent]; ++ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) { ++ // Let the superclass do the context menu stuff. ++ [super rightMouseDown:theEvent]; ++ } + + NS_OBJC_END_TRY_ABORT_BLOCK; + } + + - (void)rightMouseUp:(NSEvent *)theEvent + { + NS_OBJC_BEGIN_TRY_ABORT_BLOCK; + + if (!mGeckoChild) + return; + if (mTextInputHandler->OnHandleEvent(theEvent)) { + return; + } + + WidgetMouseEvent geckoEvent(true, eMouseUp, mGeckoChild, + WidgetMouseEvent::eReal); + [self convertCocoaMouseEvent:theEvent toGeckoEvent:&geckoEvent]; + geckoEvent.button = WidgetMouseEvent::eRightButton; + geckoEvent.mClickCount = [theEvent clickCount]; + + nsAutoRetainCocoaObject kungFuDeathGrip(self); + mGeckoChild->DispatchInputEvent(&geckoEvent); ++ if (!mGeckoChild) ++ return; ++ ++ if (nsBaseWidget::ShowContextMenuAfterMouseUp()) { ++ // Let the superclass do the context menu stuff, but pretend it's rightMouseDown. ++ NSEvent *dupeEvent = [NSEvent mouseEventWithType:NSRightMouseDown ++ location:theEvent.locationInWindow ++ modifierFlags:theEvent.modifierFlags ++ timestamp:theEvent.timestamp ++ windowNumber:theEvent.windowNumber ++ context:theEvent.context ++ eventNumber:theEvent.eventNumber ++ clickCount:theEvent.clickCount ++ pressure:theEvent.pressure]; ++ ++ [super rightMouseDown:dupeEvent]; ++ } + + NS_OBJC_END_TRY_ABORT_BLOCK; + } +diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp +index 87cc858ca7efd11d..17992f78bbf0a0a7 100644 +--- a/widget/gtk/nsWindow.cpp ++++ b/widget/gtk/nsWindow.cpp +@@ -2737,6 +2737,19 @@ static guint ButtonMaskFromGDKButton(guint button) + return GDK_BUTTON1_MASK << (button - 1); + } + ++void ++nsWindow::DispatchContextMenuEventFromMouseEvent(uint16_t domButton, ++ GdkEventButton *aEvent) ++{ ++ if (domButton == WidgetMouseEvent::eRightButton && MOZ_LIKELY(!mIsDestroyed)) { ++ WidgetMouseEvent contextMenuEvent(true, eContextMenu, this, ++ WidgetMouseEvent::eReal); ++ InitButtonEvent(contextMenuEvent, aEvent); ++ contextMenuEvent.pressure = mLastMotionPressure; ++ DispatchInputEvent(&contextMenuEvent); ++ } ++} ++ + void + nsWindow::OnButtonPressEvent(GdkEventButton *aEvent) + { +@@ -2806,13 +2819,8 @@ nsWindow::OnButtonPressEvent(GdkEventButton *aEvent) + DispatchInputEvent(&event); + + // right menu click on linux should also pop up a context menu +- if (domButton == WidgetMouseEvent::eRightButton && +- MOZ_LIKELY(!mIsDestroyed)) { +- WidgetMouseEvent contextMenuEvent(true, eContextMenu, this, +- WidgetMouseEvent::eReal); +- InitButtonEvent(contextMenuEvent, aEvent); +- contextMenuEvent.pressure = mLastMotionPressure; +- DispatchInputEvent(&contextMenuEvent); ++ if (!nsBaseWidget::ShowContextMenuAfterMouseUp()) { ++ DispatchContextMenuEventFromMouseEvent(domButton, aEvent); + } + } + +@@ -2848,6 +2856,11 @@ nsWindow::OnButtonReleaseEvent(GdkEventButton *aEvent) + + DispatchInputEvent(&event); + mLastMotionPressure = pressure; ++ ++ // right menu click on linux should also pop up a context menu ++ if (nsBaseWidget::ShowContextMenuAfterMouseUp()) { ++ DispatchContextMenuEventFromMouseEvent(domButton, aEvent); ++ } + } + + void +diff --git a/widget/gtk/nsWindow.h b/widget/gtk/nsWindow.h +index 0fafc8994579fe3c..7a28e3260c0fdefb 100644 +--- a/widget/gtk/nsWindow.h ++++ b/widget/gtk/nsWindow.h +@@ -245,6 +245,8 @@ private: + + void UpdateClientOffset(); + ++ void DispatchContextMenuEventFromMouseEvent(uint16_t domButton, ++ GdkEventButton *aEvent); + public: + void ThemeChanged(void); + void OnDPIChanged(void); +diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp +index 13fccd7f7d6627fb..e4ca5e011894f5c4 100644 +--- a/widget/nsBaseWidget.cpp ++++ b/widget/nsBaseWidget.cpp +@@ -1218,6 +1218,22 @@ nsBaseWidget::DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent) + } + } + ++// static ++bool ++nsBaseWidget::ShowContextMenuAfterMouseUp() ++{ ++ static bool gContextMenuAfterMouseUp = false; ++ static bool gContextMenuAfterMouseUpCached = false; ++ if (!gContextMenuAfterMouseUpCached) { ++ Preferences::AddBoolVarCache(&gContextMenuAfterMouseUp, ++ "ui.context_menus.after_mouseup", ++ false); ++ ++ gContextMenuAfterMouseUpCached = true; ++ } ++ return gContextMenuAfterMouseUp; ++} ++ + nsIDocument* + nsBaseWidget::GetDocument() const + { +diff --git a/widget/nsBaseWidget.h b/widget/nsBaseWidget.h +index f4e8e3d783307cc1..3cb56f38b6ced983 100644 +--- a/widget/nsBaseWidget.h ++++ b/widget/nsBaseWidget.h +@@ -417,6 +417,12 @@ public: + void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize) override {}; + #endif + ++ /** ++ * Whether context menus should only appear on mouseup instead of mousedown, ++ * on OSes where they normally appear on mousedown (macOS, *nix). ++ */ ++ static bool ShowContextMenuAfterMouseUp(); ++ + protected: + // These are methods for CompositorWidgetWrapper, and should only be + // accessed from that class. Derived widgets can choose which methods to +-- +2.15.0 + diff --git a/0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch b/0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch deleted file mode 100644 index 58d029bde35a..000000000000 --- a/0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch +++ /dev/null @@ -1,117 +0,0 @@ -From 2874ecd82e9671f774bdfda41fe0857fcb916c13 Mon Sep 17 00:00:00 2001 -Message-Id: <2874ecd82e9671f774bdfda41fe0857fcb916c13.1506634385.git.jan.steffens@gmail.com> -From: Mike Hommey <mh+mozilla@glandium.org> -Date: Wed, 16 Aug 2017 13:16:16 +0900 -Subject: [PATCH] Bug 1384062 - Make SystemResourceMonitor.stop more resilient - to errors. r=ahal,gps - -The poll() call in SystemResourceMonitor.stop might fail even though -there is something to read from the pipe, in some corner cases, and -python won't let us know about it. In that case, an exception is thrown, -leaving the SystemResourceMonitor (and its callers) in a weird state. In -practice, this leads BuildMonitor.__exit__ to recall stop, which then -fails. - -So when poll() throws an exception, we pretend there's still something -to read, and we try to read anyways. If there is something to read, -recv() will return it, otherwise, it will throw an exception of its own, -which we catch, pretending we're done. - -Furthermore, when there is nothing to read from the pipe, poll() simply -returns False, and our loop never sets `done` to True, and we then hit -an assert, which doesn't have its place here, so we remove it. - -Finally, the other end of the pipe might have died at any time, making -sending over the pipe fail, so we also protect against that. - -With all these changes, it feels like the reason to backout bug 1239939 -in bug 1272782 should have been dealt with, and we can drop the timeout -again. - ---HG-- -extra : rebase_source : ac72dd5b2602cf3ffddfb429f95e02380f939893 ---- - .../mozsystemmonitor/resourcemonitor.py | 38 +++++++++++++++------- - 1 file changed, 26 insertions(+), 12 deletions(-) - -diff --git a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py -index 8f2ac95cbe505540..38f9bc986ac2a120 100644 ---- a/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py -+++ b/testing/mozbase/mozsystemmonitor/mozsystemmonitor/resourcemonitor.py -@@ -289,47 +289,61 @@ class SystemResourceMonitor(object): - assert self._running - assert not self._stopped - -- self._pipe.send(('terminate',)) -+ try: -+ self._pipe.send(('terminate',)) -+ except Exception: -+ pass - self._running = False - self._stopped = True - - self.measurements = [] - -- done = False -- - # The child process will send each data sample over the pipe - # as a separate data structure. When it has finished sending - # samples, it sends a special "done" message to indicate it - # is finished. -- while self._pipe.poll(1.0): -- start_time, end_time, io_diff, cpu_diff, cpu_percent, virt_mem, \ -- swap_mem = self._pipe.recv() -+ -+ # multiprocessing.Pipe is not actually a pipe on at least Linux. that -+ # has an effect on the expected outcome of reading from it when the -+ # other end of the pipe dies, leading to possibly hanging on revc() -+ # below. So we must poll(). -+ def poll(): -+ try: -+ return self._pipe.poll(0.1) -+ except Exception: -+ # Poll might throw an exception even though there's still -+ # data to read. That happens when the underlying system call -+ # returns both POLLERR and POLLIN, but python doesn't tell us -+ # about it. So assume there is something to read, and we'll -+ # get an exception when trying to read the data. -+ return True -+ while poll(): -+ try: -+ start_time, end_time, io_diff, cpu_diff, cpu_percent, virt_mem, \ -+ swap_mem = self._pipe.recv() -+ except Exception: -+ # Let's assume we're done here -+ break - - # There should be nothing after the "done" message so - # terminate. - if start_time == 'done': -- done = True - break - - io = self._io_type(*io_diff) - virt = self._virt_type(*virt_mem) - swap = self._swap_type(*swap_mem) - cpu_times = [self._cpu_times_type(*v) for v in cpu_diff] - - self.measurements.append(SystemResourceUsage(start_time, end_time, - cpu_times, cpu_percent, io, virt, swap)) - - # We establish a timeout so we don't hang forever if the child - # process has crashed. - self._process.join(10) - if self._process.is_alive(): - self._process.terminate() - self._process.join(10) -- else: -- # We should have received a "done" message from the -- # child indicating it shut down properly. This only -- # happens if the child shuts down cleanly. -- assert done - - if len(self.measurements): - self.start_time = self.measurements[0].start --- -2.14.2 - @@ -1,9 +1,9 @@ # Maintainer: Étienne Deparis <etienne@depar.is> pkgname=cliqz _pkgname=browser-f -pkgver=1.16.3 +pkgver=1.17.0 pkgrel=1 -_cqzbuildid=20171109085129 +_cqzbuildid=20171127205425 pkgdesc="Firefox-based privacy aware web browser, build from sources" arch=(i686 x86_64) url="https://cliqz.com/" @@ -17,16 +17,13 @@ source=("https://github.com/cliqz-oss/browser-f/archive/${pkgver}.tar.gz" wifi-disentangle.patch wifi-fix-interface.patch no-plt.diff - plugin-crash.diff - glibc-2.26-fix.diff - 0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch) -sha256sums=('657eec637ded9b3144e7bdc5e1adddfeaf1180e4f82d5297ce8ac8fba7baeb7b' + 0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch) +sha256sums=('11aec82033c9deea31e109108f553f4c87a089cba318aff19f32a0f091e237ff' 'f068b84ad31556095145d8fefc012dd3d1458948533ed3fff6cbc7250b6e73ed' 'e98a3453d803cc7ddcb81a7dc83f883230dd8591bdf936fc5a868428979ed1f1' 'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa' - 'a7e5d2430bb562f6367deb07417dad4368317e8e8be5d1cfa842c3356de3cfc0' - 'cd7ff441da66a287f8712e60cdc9e216c30355d521051e2eaae28a66d81915e8' - 'aba767995ffb1a55345e30aaba667f43d469e23bd9b1b68263cf71b8118acc96') + '1f71b379f2262d7319624c2aed31fa2dbed42828feccc27b1cd82153b76ad707') + options=(!emptydirs !makeflags !strip) prepare() { @@ -47,24 +44,16 @@ Name[fr]=Nouvelle fenêtre en mode oubli Exec=/usr/lib/cliqz/cliqz --private-window %u END + # https://bugzilla.mozilla.org/show_bug.cgi?id=1360278 + patch -Np1 -i $srcdir/0001-Bug-1360278-Add-preference-to-trigger-context-menu-o.patch + # https://bugzilla.mozilla.org/show_bug.cgi?id=1314968 patch -Np1 -i $srcdir/wifi-disentangle.patch patch -Np1 -i $srcdir/wifi-fix-interface.patch - # https://bugzilla.mozilla.org/show_bug.cgi?id=1384062 - patch -Np1 -i $srcdir/0001-Bug-1384062-Make-SystemResourceMonitor.stop-more-res.patch - # https://bugzilla.mozilla.org/show_bug.cgi?id=1382942 patch -Np1 -i $srcdir/no-plt.diff - # https://bugzilla.mozilla.org/show_bug.cgi?id=1400175 - patch -Np1 -i $srcdir/plugin-crash.diff - - # https://bugzilla.mozilla.org/show_bug.cgi?id=1385667 - # https://bugzilla.mozilla.org/show_bug.cgi?id=1394149 - patch -Np1 -i $srcdir/glibc-2.26-fix.diff - - # Google API keys (see http://www.chromium.org/developers/how-tos/api-keys) # Note: These are for Arch Linux use ONLY. For your own distribution, please # get your own set of keys. Feel free to contact foutrelis@archlinux.org for @@ -83,7 +72,7 @@ END ac_add_options --prefix=/usr ac_add_options --enable-gold ac_add_options --enable-pie -ac_add_options --enable-optimize="-O2" +ac_add_options --enable-rust-simd # System libraries ac_add_options --with-system-zlib @@ -95,7 +84,6 @@ ac_add_options --enable-system-ffi # Features ac_add_options --enable-startup-notification ac_add_options --disable-updater -ac_add_options --disable-stylo STRIP_FLAGS="--strip-debug" END @@ -107,7 +95,11 @@ build() { # Hardening LDFLAGS+=" -Wl,-z,now" - CPPFLAGS+=" -O2" + # Avoid duplicate compilation options + march=$(gcc -Q --help=target | grep march | sed -nr 's/^.*\s+([^\s]+)$/\1/p') + CFLAGS="-march=${march} -mtune=generic -O2 -fstack-protector-strong -fno-plt" + CPPFLAGS="-D_FORTIFY_SOURCE=2" + CXXFLAGS="-march=${march} -mtune=generic -fstack-protector-strong -fno-plt" export CQZ_RELEASE_CHANNEL=release export CQZ_VERSION=$pkgver diff --git a/glibc-2.26-fix.diff b/glibc-2.26-fix.diff deleted file mode 100644 index 48733ab899bb..000000000000 --- a/glibc-2.26-fix.diff +++ /dev/null @@ -1,258 +0,0 @@ -From 6a0b7c8ecf0734ba1bcdccf8e0ee97e721fd5420 Mon Sep 17 00:00:00 2001 -Message-Id: <6a0b7c8ecf0734ba1bcdccf8e0ee97e721fd5420.1505113337.git.jan.steffens@gmail.com> -From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= <emilio@crisal.io> -Date: Sat, 19 Aug 2017 20:14:25 +0200 -Subject: [PATCH] Fix use of struct ucontext (squash 2 commits) - -Needed for building with glibc 2.26. - -Bug 1385667: Use ucontext_t consistently in breakpad-client. r=ted -MozReview-Commit-ID: AJhzJdNXP0f - -Bug 1394149: Fix remaining uses of ucontext in breakpad-client. r=ted -MozReview-Commit-ID: 5tP7fXsI7dQ ---- - .../linux/dump_writer_common/ucontext_reader.cc | 30 +++++++++++----------- - .../linux/dump_writer_common/ucontext_reader.h | 10 ++++---- - .../linux/handler/exception_handler.cc | 10 ++++---- - .../linux/handler/exception_handler.h | 2 +- - .../linux/microdump_writer/microdump_writer.cc | 2 +- - .../linux/minidump_writer/minidump_writer.cc | 2 +- - 6 files changed, 28 insertions(+), 28 deletions(-) - -diff --git a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc -index 999960912e459e1b..303c0ebd32b663c4 100644 ---- a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc -+++ b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.cc -@@ -40,15 +40,15 @@ namespace google_breakpad { - - #if defined(__i386__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_ESP]; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_EIP]; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct _libc_fpstate* fp) { - const greg_t* regs = uc->uc_mcontext.gregs; - -@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, - - #elif defined(__x86_64) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_RSP]; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[REG_RIP]; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct _libc_fpstate* fpregs) { - const greg_t* regs = uc->uc_mcontext.gregs; - -@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, - - #elif defined(__ARM_EABI__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.arm_sp; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.arm_pc; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { - out->context_flags = MD_CONTEXT_ARM_FULL; - - out->iregs[0] = uc->uc_mcontext.arm_r0; -@@ -184,41 +184,41 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { - - #elif defined(__aarch64__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.sp; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.pc; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs) { - out->context_flags = MD_CONTEXT_ARM64_FULL; - - out->cpsr = static_cast<uint32_t>(uc->uc_mcontext.pstate); - for (int i = 0; i < MD_CONTEXT_ARM64_REG_SP; ++i) - out->iregs[i] = uc->uc_mcontext.regs[i]; - out->iregs[MD_CONTEXT_ARM64_REG_SP] = uc->uc_mcontext.sp; - out->iregs[MD_CONTEXT_ARM64_REG_PC] = uc->uc_mcontext.pc; - - out->float_save.fpsr = fpregs->fpsr; - out->float_save.fpcr = fpregs->fpcr; - my_memcpy(&out->float_save.regs, &fpregs->vregs, - MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT * 16); - } - - #elif defined(__mips__) - --uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { - return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]; - } - --uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { -+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { - return uc->uc_mcontext.pc; - } - --void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { -+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { - #if _MIPS_SIM == _ABI64 - out->context_flags = MD_CONTEXT_MIPS64_FULL; - #elif _MIPS_SIM == _ABIO32 -diff --git a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h -index c533e28ba7441e83..039752a2dfb6e589 100644 ---- a/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h -+++ b/toolkit/crashreporter/breakpad-client/linux/dump_writer_common/ucontext_reader.h -@@ -41,21 +41,21 @@ namespace google_breakpad { - - // Wraps platform-dependent implementations of accessors to ucontext structs. - struct UContextReader { -- static uintptr_t GetStackPointer(const struct ucontext* uc); -+ static uintptr_t GetStackPointer(const ucontext_t* uc); - -- static uintptr_t GetInstructionPointer(const struct ucontext* uc); -+ static uintptr_t GetInstructionPointer(const ucontext_t* uc); - - // Juggle a arch-specific ucontext into a minidump format - // out: the minidump structure - // info: the collection of register structures. - #if defined(__i386__) || defined(__x86_64) -- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct _libc_fpstate* fp); - #elif defined(__aarch64__) -- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, - const struct fpsimd_context* fpregs); - #else -- static void FillCPUContext(RawContextCPU *out, const ucontext *uc); -+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); - #endif - }; - -diff --git a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc -index 71a51a763938e39d..12df9bc96ec45fea 100644 ---- a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc -+++ b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.cc -@@ -439,44 +439,44 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) { - // Fill in all the holes in the struct to make Valgrind happy. - memset(&g_crash_context_, 0, sizeof(g_crash_context_)); - memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); -- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); -+ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t)); - #if defined(__aarch64__) -- struct ucontext* uc_ptr = (struct ucontext*)uc; -+ ucontext_t* uc_ptr = (ucontext_t*)uc; - struct fpsimd_context* fp_ptr = - (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; - if (fp_ptr->head.magic == FPSIMD_MAGIC) { - memcpy(&g_crash_context_.float_state, fp_ptr, - sizeof(g_crash_context_.float_state)); - } - #elif !defined(__ARM_EABI__) && !defined(__mips__) - // FP state is not part of user ABI on ARM Linux. -- // In case of MIPS Linux FP state is already part of struct ucontext -+ // In case of MIPS Linux FP state is already part of ucontext_t - // and 'float_state' is not a member of CrashContext. -- struct ucontext* uc_ptr = (struct ucontext*)uc; -+ ucontext_t* uc_ptr = (ucontext_t*)uc; - if (uc_ptr->uc_mcontext.fpregs) { - memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, - sizeof(g_crash_context_.float_state)); - } - #endif - g_crash_context_.tid = syscall(__NR_gettid); - if (crash_handler_ != NULL) { - if (crash_handler_(&g_crash_context_, sizeof(g_crash_context_), - callback_context_)) { - return true; - } - } - return GenerateDump(&g_crash_context_); - } - - // This is a public interface to HandleSignal that allows the client to - // generate a crash dump. This function may run in a compromised context. - bool ExceptionHandler::SimulateSignalDelivery(int sig) { - siginfo_t siginfo = {}; - // Mimic a trusted signal to allow tracing the process (see - // ExceptionHandler::HandleSignal(). - siginfo.si_code = SI_USER; - siginfo.si_pid = getpid(); -- struct ucontext context; -+ ucontext_t context; - getcontext(&context); - return HandleSignal(sig, &siginfo, &context); - } -diff --git a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h -index 711586fec7ddae59..be1880170e2826b0 100644 ---- a/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h -+++ b/toolkit/crashreporter/breakpad-client/linux/handler/exception_handler.h -@@ -191,7 +191,7 @@ class ExceptionHandler { - struct CrashContext { - siginfo_t siginfo; - pid_t tid; // the crashing thread. -- struct ucontext context; -+ ucontext_t context; - #if !defined(__ARM_EABI__) && !defined(__mips__) - // #ifdef this out because FP state is not part of user ABI for Linux ARM. - // In case of MIPS Linux FP state is already part of struct -diff --git a/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc -index ff20bf36584c876b..a0b90e08fc5f0cff 100644 ---- a/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc -+++ b/toolkit/crashreporter/breakpad-client/linux/microdump_writer/microdump_writer.cc -@@ -571,7 +571,7 @@ class MicrodumpWriter { - - void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } - -- const struct ucontext* const ucontext_; -+ const ucontext_t* const ucontext_; - #if !defined(__ARM_EABI__) && !defined(__mips__) - const google_breakpad::fpstate_t* const float_state_; - #endif -diff --git a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc -index 0650bb95c179464a..6b5304bcd605ca3a 100644 ---- a/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc -+++ b/toolkit/crashreporter/breakpad-client/linux/minidump_writer/minidump_writer.cc -@@ -1247,7 +1247,7 @@ class MinidumpWriter { - const int fd_; // File descriptor where the minidum should be written. - const char* path_; // Path to the file where the minidum should be written. - -- const struct ucontext* const ucontext_; // also from the signal handler -+ const ucontext_t* const ucontext_; // also from the signal handler - #if !defined(__ARM_EABI__) && !defined(__mips__) - const google_breakpad::fpstate_t* const float_state_; // ditto - #endif --- -2.14.1 - diff --git a/plugin-crash.diff b/plugin-crash.diff deleted file mode 100644 index a9d0ce2e622d..000000000000 --- a/plugin-crash.diff +++ /dev/null @@ -1,50 +0,0 @@ - -# HG changeset patch -# User Jan Steffens <jan.steffens@gmail.com> -# Date 1505475854 -7200 -# Node ID 3cd2263687293a229277037090add3bea2531057 -# Parent 70f5f23a429f3d621e44307c191fa84c77fb2f61 -Bug 1400175 - Stub gdk_screen_get_monitor_workarea in mozgtk2; r?karlt - -MozReview-Commit-ID: 72K6U17JuoK - -diff --git a/widget/gtk/mozgtk/mozgtk.c b/widget/gtk/mozgtk/mozgtk.c ---- a/widget/gtk/mozgtk/mozgtk.c -+++ b/widget/gtk/mozgtk/mozgtk.c -@@ -56,17 +56,16 @@ - STUB(gdk_screen_get_default) - STUB(gdk_screen_get_display) - STUB(gdk_screen_get_font_options) - STUB(gdk_screen_get_height) - STUB(gdk_screen_get_height_mm) - STUB(gdk_screen_get_n_monitors) - STUB(gdk_screen_get_monitor_at_window) - STUB(gdk_screen_get_monitor_geometry) --STUB(gdk_screen_get_monitor_workarea) - STUB(gdk_screen_get_monitor_height_mm) - STUB(gdk_screen_get_number) - STUB(gdk_screen_get_resolution) - STUB(gdk_screen_get_rgba_visual) - STUB(gdk_screen_get_root_window) - STUB(gdk_screen_get_system_visual) - STUB(gdk_screen_get_width) - STUB(gdk_screen_height) -@@ -514,16 +513,17 @@ - #ifdef GTK3_SYMBOLS - STUB(gdk_device_get_source) - STUB(gdk_device_manager_get_client_pointer) - STUB(gdk_disable_multidevice) - STUB(gdk_device_manager_list_devices) - STUB(gdk_display_get_device_manager) - STUB(gdk_error_trap_pop_ignored) - STUB(gdk_event_get_source_device) -+STUB(gdk_screen_get_monitor_workarea) - STUB(gdk_window_get_type) - STUB(gdk_window_get_window_type) - STUB(gdk_x11_window_get_xid) - STUB(gdk_x11_display_get_type) - STUB(gdk_wayland_display_get_type) - STUB(gtk_box_new) - STUB(gtk_cairo_should_draw_window) - STUB(gtk_cairo_transform_to_window) - |