mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 826037 - Re-introduce an obsolete private browsing service in order to not break all Jetpack add-ons; r=jdm
This commit is contained in:
parent
db50648ef1
commit
9e4ef49c27
@ -11,9 +11,7 @@ include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = privatebrowsing
|
||||
|
||||
ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
DIRS = src
|
||||
endif
|
||||
|
||||
TEST_DIRS += test
|
||||
|
||||
|
@ -15,6 +15,15 @@ LIBRARY_NAME = privatebrowsing_s
|
||||
FORCE_STATIC_LIB = 1
|
||||
USE_STATIC_LIBS = 1
|
||||
|
||||
ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
|
||||
EXTRA_COMPONENTS = \
|
||||
nsPrivateBrowsingServiceObsolete.manifest \
|
||||
nsPrivateBrowsingServiceObsolete.js \
|
||||
$(NULL)
|
||||
|
||||
else
|
||||
|
||||
CPPSRCS = \
|
||||
nsPrivateBrowsingServiceWrapper.cpp \
|
||||
$(NULL)
|
||||
@ -29,4 +38,6 @@ EXTRA_PP_COMPONENTS = \
|
||||
nsPrivateBrowsingService.js \
|
||||
$(NULL)
|
||||
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -0,0 +1,21 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
const Ci = Components.interfaces;
|
||||
|
||||
// This dummy object just emulates the old nsIPrivateBrowsingService, and is
|
||||
// non-functional in every aspect. It is only used to make Jetpack work
|
||||
// again.
|
||||
|
||||
function PrivateBrowsingService() {
|
||||
}
|
||||
|
||||
PrivateBrowsingService.prototype = {
|
||||
classID: Components.ID("{ba0e4d3d-7be2-41a0-b723-a7c16b22ebe9}"),
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIPrivateBrowsingService])
|
||||
};
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([PrivateBrowsingService]);
|
@ -0,0 +1,15 @@
|
||||
# WebappRT doesn't need these instructions, and they don't necessarily work
|
||||
# with it, but it does use a GRE directory that the GRE shares with Firefox,
|
||||
# so in order to prevent the instructions from being processed for WebappRT,
|
||||
# we need to restrict them to the applications that depend on them, i.e.:
|
||||
#
|
||||
# b2g: {3c2e2abc-06d4-11e1-ac3b-374f68613e61}
|
||||
# browser: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
|
||||
# mobile/android: {aa3c5121-dab2-40e2-81ca-7ea25febc110}
|
||||
# mobile/xul: {a23983c0-fd0e-11dc-95ff-0800200c9a66}
|
||||
#
|
||||
# In theory we should do this for all these instructions, but in practice it is
|
||||
# sufficient to do it for the app-startup one, and the file is simpler that way.
|
||||
|
||||
component {ba0e4d3d-7be2-41a0-b723-a7c16b22ebe9} nsPrivateBrowsingServiceObsolete.js
|
||||
contract @mozilla.org/privatebrowsing;1 {ba0e4d3d-7be2-41a0-b723-a7c16b22ebe9}
|
@ -125,7 +125,9 @@ ifdef MOZ_TOOLKIT_SEARCH
|
||||
XPIDLSRCS += nsIBrowserSearchService.idl
|
||||
endif
|
||||
|
||||
ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
ifdef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
XPIDLSRCS += nsIPrivateBrowsingServiceObsolete.idl
|
||||
else
|
||||
XPIDLSRCS += nsIPrivateBrowsingService.idl
|
||||
endif
|
||||
|
||||
|
16
netwerk/base/public/nsIPrivateBrowsingServiceObsolete.idl
Normal file
16
netwerk/base/public/nsIPrivateBrowsingServiceObsolete.idl
Normal file
@ -0,0 +1,16 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
[scriptable, uuid(7ad4b7f1-5a88-41aa-9b40-713009bc57b3)]
|
||||
interface nsIPrivateBrowsingService : nsISupports
|
||||
{
|
||||
// This space is intentionally left blank!
|
||||
|
||||
// This is a remnant from the old dying global private browsing service.
|
||||
// You should fix your code to not rely on this interface, as it will
|
||||
// be removed completely soon.
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user