Accepting request 669858 from GNOME:Factory
OBS-URL: https://build.opensuse.org/request/show/669858 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/epiphany?expand=0&rev=160
This commit is contained in:
commit
c967e7d22f
67
epiphany-bookmark-ensure-tags-sequence-is-created.patch
Normal file
67
epiphany-bookmark-ensure-tags-sequence-is-created.patch
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
From d571984e24c0a24fd1d09da4341f79eea7286723 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Catanzaro <mcatanzaro@igalia.com>
|
||||||
|
Date: Mon, 7 Jan 2019 19:38:22 +0000
|
||||||
|
Subject: [PATCH] bookmark: ensure tags sequence is always created
|
||||||
|
|
||||||
|
Somehow we are getting EphyBookmarks objects deserialized without
|
||||||
|
initializing the tags property. I'm not sure how this happens. It even
|
||||||
|
happens for JSON corresponding to bookmarks that definitely have tags
|
||||||
|
set. Anyway, ephy_bookmark_get_tags() is used as if the result is not
|
||||||
|
nullable, so let's guarantee this and return an empty list instead in
|
||||||
|
this case.
|
||||||
|
|
||||||
|
This is a speculative fix for #612. It should fix the reported crash,
|
||||||
|
but it's possible it will only uncover a subsequent crash.
|
||||||
|
|
||||||
|
|
||||||
|
(cherry picked from commit 672cffa5ec652a5d5f7d98d0e0664408d58dcf8c)
|
||||||
|
---
|
||||||
|
src/bookmarks/ephy-bookmark.c | 10 ++++++----
|
||||||
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/bookmarks/ephy-bookmark.c b/src/bookmarks/ephy-bookmark.c
|
||||||
|
index 43619a4ef..514a54aec 100644
|
||||||
|
--- a/src/bookmarks/ephy-bookmark.c
|
||||||
|
+++ b/src/bookmarks/ephy-bookmark.c
|
||||||
|
@@ -99,9 +99,10 @@ ephy_bookmark_set_property (GObject *object,
|
||||||
|
ephy_bookmark_set_url (self, g_value_get_string (value));
|
||||||
|
break;
|
||||||
|
case PROP_TAGS:
|
||||||
|
- if (self->tags != NULL)
|
||||||
|
- g_sequence_free (self->tags);
|
||||||
|
+ g_sequence_free (self->tags);
|
||||||
|
self->tags = g_value_get_pointer (value);
|
||||||
|
+ if (!self->tags)
|
||||||
|
+ self->tags = g_sequence_new (g_free);
|
||||||
|
break;
|
||||||
|
case PROP_TYPE:
|
||||||
|
g_free (self->type);
|
||||||
|
@@ -176,8 +177,7 @@ ephy_bookmark_finalize (GObject *object)
|
||||||
|
g_free (self->title);
|
||||||
|
g_free (self->id);
|
||||||
|
|
||||||
|
- if (self->tags)
|
||||||
|
- g_sequence_free (self->tags);
|
||||||
|
+ g_sequence_free (self->tags);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (ephy_bookmark_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
@@ -279,6 +279,7 @@ ephy_bookmark_class_init (EphyBookmarkClass *klass)
|
||||||
|
static void
|
||||||
|
ephy_bookmark_init (EphyBookmark *self)
|
||||||
|
{
|
||||||
|
+ self->tags = g_sequence_new (g_free);
|
||||||
|
}
|
||||||
|
|
||||||
|
EphyBookmark *
|
||||||
|
@@ -456,6 +457,7 @@ GSequence *
|
||||||
|
ephy_bookmark_get_tags (EphyBookmark *self)
|
||||||
|
{
|
||||||
|
g_assert (EPHY_IS_BOOKMARK (self));
|
||||||
|
+ g_assert (self->tags);
|
||||||
|
|
||||||
|
return self->tags;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.18.1
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jan 25 18:59:27 UTC 2019 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
- Add epiphany-bookmark-ensure-tags-sequence-is-created.patch:
|
||||||
|
bookmark: ensure tags sequence is always created. Somehow we are
|
||||||
|
getting EphyBookmarks objects deserialized without initializing
|
||||||
|
the tags property.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Dec 27 23:22:15 UTC 2018 - bjorn.lie@gmail.com
|
Thu Dec 27 23:22:15 UTC 2018 - bjorn.lie@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package epiphany
|
# spec file for package epiphany
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -25,6 +25,7 @@ Group: Productivity/Networking/Web/Browsers
|
|||||||
URL: https://wiki.gnome.org/Apps/Web
|
URL: https://wiki.gnome.org/Apps/Web
|
||||||
Source0: https://download.gnome.org/sources/epiphany/3.30/%{name}-%{version}.tar.xz
|
Source0: https://download.gnome.org/sources/epiphany/3.30/%{name}-%{version}.tar.xz
|
||||||
Source99: %{name}-rpmlintrc
|
Source99: %{name}-rpmlintrc
|
||||||
|
|
||||||
# PATCH-FIX-UPSTREAM epiphany-window-Set-correct-current-height.patch -- window: set correct current height
|
# PATCH-FIX-UPSTREAM epiphany-window-Set-correct-current-height.patch -- window: set correct current height
|
||||||
Patch0: epiphany-window-Set-correct-current-height.patch
|
Patch0: epiphany-window-Set-correct-current-height.patch
|
||||||
# PATCH-FIX-UPSTREAM epiphany-encoding-dialog-add-some-column-spacing.patch -- encoding-dialog: add some column spacing to grid
|
# PATCH-FIX-UPSTREAM epiphany-encoding-dialog-add-some-column-spacing.patch -- encoding-dialog: add some column spacing to grid
|
||||||
@ -37,6 +38,8 @@ Patch3: epiphany-Tags-with-empty-labels.patch
|
|||||||
Patch4: epiphany-Fix-saving-web-app-icons.patch
|
Patch4: epiphany-Fix-saving-web-app-icons.patch
|
||||||
# PATCH-FIX-UPSTREAM epiphany-Fix-remote-inspector-support.patch -- Fix remote inspector support
|
# PATCH-FIX-UPSTREAM epiphany-Fix-remote-inspector-support.patch -- Fix remote inspector support
|
||||||
Patch5: epiphany-Fix-remote-inspector-support.patch
|
Patch5: epiphany-Fix-remote-inspector-support.patch
|
||||||
|
# PATCH-FIX-UPSTREAM epiphany-bookmark-ensure-tags-sequence-is-created.patch -- Fix bookmark tags creation.
|
||||||
|
Patch6: epiphany-bookmark-ensure-tags-sequence-is-created.patch
|
||||||
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
|
Loading…
Reference in New Issue
Block a user