Skip to content

Commit

Permalink
[rpm] Add patch for LoginManager. Fixes JB#21980
Browse files Browse the repository at this point in the history
  • Loading branch information
rojkov committed Oct 29, 2015
1 parent 31b632f commit d397afb
Show file tree
Hide file tree
Showing 13 changed files with 109 additions and 23 deletions.
4 changes: 2 additions & 2 deletions rpm/0001-Configure-system-sqlite-to-use-jemalloc.patch
@@ -1,7 +1,7 @@
From bf75995e539b769481b3f27242b3790419522674 Mon Sep 17 00:00:00 2001
From 27f7ada21cb998775417a3b793698b4db222002e Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Mon, 12 Oct 2015 16:18:14 +0300
Subject: [PATCH 01/11] Configure system sqlite to use jemalloc
Subject: [PATCH 01/12] Configure system sqlite to use jemalloc

See bug JB25229

Expand Down
4 changes: 2 additions & 2 deletions rpm/0002-Workaround-for-bug-977015.patch
@@ -1,7 +1,7 @@
From 9239fe80dc786ec0259e134bf2fa98c18b18c79c Mon Sep 17 00:00:00 2001
From 4b848115452528cad24fbefd1888c14e74b0dbc5 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:01:34 +0300
Subject: [PATCH 02/11] Workaround for bug 977015
Subject: [PATCH 02/12] Workaround for bug 977015

See bug JB16252

Expand Down
4 changes: 2 additions & 2 deletions rpm/0003-Workaround-wrong-viewport-in-wikipedia.patch
@@ -1,7 +1,7 @@
From b898ddef0a6b7e3149e8a2f7f0f0d92a7e232822 Mon Sep 17 00:00:00 2001
From d468c5a7b7416895911a82e88fb8e31deeb1f5a5 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:03:43 +0300
Subject: [PATCH 03/11] Workaround wrong viewport in wikipedia
Subject: [PATCH 03/12] Workaround wrong viewport in wikipedia

See bug JB11251

Expand Down
6 changes: 3 additions & 3 deletions rpm/0004-Supply-source-uri-to-gstreamer-pipeline.patch
@@ -1,7 +1,7 @@
From 226120e9273adf782fe94c06aeff188b46cf0dad Mon Sep 17 00:00:00 2001
From e25d36534b0a09999f25bbf5839fb81582e2eb65 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:10:46 +0300
Subject: [PATCH 04/11] Supply source uri to gstreamer pipeline
Subject: [PATCH 04/12] Supply source uri to gstreamer pipeline

See bug JB19511

Expand Down Expand Up @@ -212,7 +212,7 @@ index 3c92e53..c07fa15 100644
GstCaps *caps =
GStreamerFormatHelper::ConvertFormatsToCaps(mDecoder->GetResource()->GetContentType().get(),
diff --git a/dom/media/gstreamer/GStreamerReader.h b/dom/media/gstreamer/GStreamerReader.h
index d455954..8746198c 100644
index d455954..8746198 100644
--- a/dom/media/gstreamer/GStreamerReader.h
+++ b/dom/media/gstreamer/GStreamerReader.h
@@ -118,6 +118,15 @@ private:
Expand Down
4 changes: 2 additions & 2 deletions rpm/0005-Workaround-for-late-access-message-loop.patch
@@ -1,7 +1,7 @@
From 43b8eb70d0eaae85c83d52ebbcb246286264815a Mon Sep 17 00:00:00 2001
From 3afbdb6c5f77650eae62c2f1884500e9320e2b7e Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:12:04 +0300
Subject: [PATCH 05/11] Workaround for late access message loop.
Subject: [PATCH 05/12] Workaround for late access message loop.

See bug JB10381

Expand Down
4 changes: 2 additions & 2 deletions rpm/0006-Define-HAS_NEMO_RESOURCE-in-config.patch
@@ -1,7 +1,7 @@
From 9dc8a17b09b2a52879cef7d80bcc8e18f87be233 Mon Sep 17 00:00:00 2001
From 1815809875520676ce7ce53cce1d27fea0dab30d Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:13:03 +0300
Subject: [PATCH 06/11] Define HAS_NEMO_RESOURCE in config
Subject: [PATCH 06/12] Define HAS_NEMO_RESOURCE in config

See bugs JB10947, JB30305, and JB30517

Expand Down
@@ -1,7 +1,7 @@
From 19690a77bc85b64f59c469a87746233ef3215a83 Mon Sep 17 00:00:00 2001
From 90c886be64b2c8aea428c2740a1871d58ab905f9 Mon Sep 17 00:00:00 2001
From: Piotr Tworek <piotr.tworek@jollamobile.com>
Date: Fri, 3 Jul 2015 14:12:32 +0200
Subject: [PATCH 07/11] Don't decode all images on shell activation if
Subject: [PATCH 07/12] Don't decode all images on shell activation if
decodeondraw is enabled. Fixes JB#25287

Currently if the page contains a lot images in nsDocument::mImageTracker
Expand Down
@@ -1,7 +1,7 @@
From db87bacb1153026d9333a3e36c5bf4246118a127 Mon Sep 17 00:00:00 2001
From 27f298f50667033838d8dac274b6abbb7f75ae62 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Mon, 11 May 2015 13:17:36 +0300
Subject: [PATCH 08/11] Limit surface area rather than width and height
Subject: [PATCH 08/12] Limit surface area rather than width and height

See bug JB26935

Expand Down
@@ -1,7 +1,7 @@
From a40ebf65b53186213bea181f5b5668ccb4454e0f Mon Sep 17 00:00:00 2001
From 6787580fea3378ffcecb7c5d7a860e1b91fe1d18 Mon Sep 17 00:00:00 2001
From: Piotr Tworek <piotr.tworek@jollamobile.com>
Date: Wed, 8 Jul 2015 16:13:11 +0200
Subject: [PATCH 09/11] Make TextureImageEGL hold a reference to GLContext.
Subject: [PATCH 09/12] Make TextureImageEGL hold a reference to GLContext.
Fixes JB#30109.

Due to rather non standard view shutdown procedure of EmbedLite port
Expand Down
4 changes: 2 additions & 2 deletions rpm/0010-Limit-maximum-scale-to-4x.-Fixes-JB-25377.patch
@@ -1,7 +1,7 @@
From f5725148718ea1ea3ee5e5ba145d998b5730dece Mon Sep 17 00:00:00 2001
From 4a7c0290659a401d85c798fb3d3a6919481596d1 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Mon, 12 Oct 2015 16:22:59 +0300
Subject: [PATCH 10/11] Limit maximum scale to 4x. Fixes JB#25377
Subject: [PATCH 10/12] Limit maximum scale to 4x. Fixes JB#25377

The default zoom contraints now matches to the EmbedContentController.

Expand Down
@@ -1,7 +1,7 @@
From e05971921f75746de864b1cc2f75889bca8d20bc Mon Sep 17 00:00:00 2001
From 970b12db1f33de802491b77ee14b6e9cb4a8f94b Mon Sep 17 00:00:00 2001
From: Piotr Tworek <tworaz666@gmail.com>
Date: Tue, 29 Sep 2015 08:18:00 +0200
Subject: [PATCH 11/11] Bug 1209446 - Make sure mFrameInProgress flag is set to
Subject: [PATCH 11/12] Bug 1209446 - Make sure mFrameInProgress flag is set to
true only when we actually begin drawing new frame. r=nical

--HG--
Expand Down
84 changes: 84 additions & 0 deletions rpm/0012-Adapt-LoginManager-to-EmbedLite.-Fixes-JB21980.patch
@@ -0,0 +1,84 @@
From 9d43fee6a410cf8162dc319773af5f156ffccdd1 Mon Sep 17 00:00:00 2001
From: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
Date: Wed, 28 Oct 2015 16:07:36 +0200
Subject: [PATCH 12/12] Adapt LoginManager to EmbedLite. Fixes JB21980

Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@jolla.com>
---
dom/ipc/TabChild.h | 7 +++++--
toolkit/components/passwordmgr/LoginManagerContent.jsm | 3 +--
toolkit/components/passwordmgr/LoginManagerParent.jsm | 2 ++
toolkit/components/passwordmgr/passwordmgr.manifest | 4 +---
4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h
index 72fc447..00a9a89 100644
--- a/dom/ipc/TabChild.h
+++ b/dom/ipc/TabChild.h
@@ -456,8 +456,11 @@ public:
static inline TabChild*
GetFrom(nsIDocShell* aDocShell)
{
- nsCOMPtr<nsITabChild> tc = do_GetInterface(aDocShell);
- return static_cast<TabChild*>(tc.get());
+ // Even though TabChild is not used in EmbedLite somehow the static cast
+ // below can return non-null pointer. Let's return nullptr explcitly.
+ return nullptr;
+ //nsCOMPtr<nsITabChild> tc = do_GetInterface(aDocShell);
+ //return static_cast<TabChild*>(tc.get());
}

static TabChild* GetFrom(nsIPresShell* aPresShell);
diff --git a/toolkit/components/passwordmgr/LoginManagerContent.jsm b/toolkit/components/passwordmgr/LoginManagerContent.jsm
index 973b36a..ba26dfe 100644
--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm
@@ -156,11 +156,10 @@ var LoginManagerContent = {
let requestId = this._getRandomId();
messageData.requestId = requestId;

- messageManager.sendAsyncMessage(name, messageData);
-
let deferred = Promise.defer();
requestData.promise = deferred;
this._requests.set(requestId, requestData);
+ messageManager.sendAsyncMessage(name, messageData);
return deferred.promise;
},

diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm
index 281dcc3..4bc2288 100644
--- a/toolkit/components/passwordmgr/LoginManagerParent.jsm
+++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm
@@ -183,6 +183,8 @@ var LoginManagerParent = {
},

receiveMessage: function (msg) {
+ msg.target.QueryInterface(Ci.nsIEmbedFrame);
+ log("receiveMessage " + msg.name + " msg.target: " + msg.target);
let data = msg.data;
switch (msg.name) {
case "RemoteLogins:findLogins": {
diff --git a/toolkit/components/passwordmgr/passwordmgr.manifest b/toolkit/components/passwordmgr/passwordmgr.manifest
index 1d3d3c3..873426b 100644
--- a/toolkit/components/passwordmgr/passwordmgr.manifest
+++ b/toolkit/components/passwordmgr/passwordmgr.manifest
@@ -2,8 +2,6 @@ component {cb9e0de8-3598-4ed7-857b-827f011ad5d8} nsLoginManager.js
contract @mozilla.org/login-manager;1 {cb9e0de8-3598-4ed7-857b-827f011ad5d8}
component {749e62f4-60ae-4569-a8a2-de78b649660e} nsLoginManagerPrompter.js
contract @mozilla.org/passwordmanager/authpromptfactory;1 {749e62f4-60ae-4569-a8a2-de78b649660e}
-component {8aa66d77-1bbb-45a6-991e-b8f47751c291} nsLoginManagerPrompter.js
-contract @mozilla.org/login-manager/prompter;1 {8aa66d77-1bbb-45a6-991e-b8f47751c291}
component {0f2f347c-1e4f-40cc-8efd-792dea70a85e} nsLoginInfo.js
contract @mozilla.org/login-manager/loginInfo;1 {0f2f347c-1e4f-40cc-8efd-792dea70a85e}
#ifdef ANDROID
@@ -15,4 +13,4 @@ contract @mozilla.org/login-manager/storage/json;1 {c00c432d-a0c9-46d7-bef6-9c45
#endif
component {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309} crypto-SDR.js
contract @mozilla.org/login-manager/crypto/SDR;1 {dc6c2976-0f73-4f1f-b9ff-3d72b4e28309}
-category healthreport-js-provider-default PasswordsMetricsProvider resource://gre/modules/LoginManagerParent.jsm
\ No newline at end of file
+category healthreport-js-provider-default PasswordsMetricsProvider resource://gre/modules/LoginManagerParent.jsm
--
2.1.4

2 changes: 2 additions & 0 deletions rpm/xulrunner-qt5.spec
Expand Up @@ -53,6 +53,7 @@ Patch8: 0008-Limit-surface-area-rather-than-width-and-height.patch
Patch9: 0009-Make-TextureImageEGL-hold-a-reference-to-GLContext.-.patch
Patch10: 0010-Limit-maximum-scale-to-4x.-Fixes-JB-25377.patch
Patch11: 0011-Bug-1209446-Make-sure-mFrameInProgress-flag-is-set-t.patch
Patch12: 0012-Adapt-LoginManager-to-EmbedLite.-Fixes-JB21980.patch
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(pango)
Expand Down Expand Up @@ -141,6 +142,7 @@ Tests and misc files for xulrunner.
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1

mkdir -p "%BUILD_DIR"
cp -rf "%BASE_CONFIG" "%BUILD_DIR"/mozconfig
Expand Down

0 comments on commit d397afb

Please sign in to comment.