зеркало из https://github.com/mozilla/gecko-dev.git
merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 2kKTSo87OJy
This commit is contained in:
Коммит
68c1933983
|
@ -5,10 +5,10 @@
|
|||
// The ext-* files are imported into the same scopes.
|
||||
/* import-globals-from ext-browserAction.js */
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Services",
|
||||
"resource://gre/modules/Services.jsm");
|
||||
|
||||
var {
|
||||
normalizeTime,
|
||||
|
@ -213,7 +213,7 @@ this.history = class extends ExtensionAPI {
|
|||
options.resultType = options.RESULTS_AS_VISIT;
|
||||
|
||||
let historyQuery = PlacesUtils.history.getNewQuery();
|
||||
historyQuery.uri = NetUtil.newURI(url);
|
||||
historyQuery.uri = Services.io.newURI(url);
|
||||
let queryResult = PlacesUtils.history.executeQuery(historyQuery, options).root;
|
||||
let results = convertNavHistoryContainerResultNode(queryResult, convertNodeToVisitItem);
|
||||
return Promise.resolve(results);
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
|
||||
var {
|
||||
ExtensionError,
|
||||
} = ExtensionUtils;
|
||||
|
@ -575,7 +572,7 @@ MenuItem.prototype = {
|
|||
if (contextData.onLink) {
|
||||
targetUrls.push(contextData.linkUrl);
|
||||
}
|
||||
if (!targetUrls.some(targetUrl => targetPattern.matches(NetUtil.newURI(targetUrl)))) {
|
||||
if (!targetUrls.some(targetUrl => targetPattern.matches(Services.io.newURI(targetUrl)))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "js/UbiNode.h"
|
||||
#include "js/UniquePtr.h"
|
||||
#include "mozilla/devtools/CoreDump.pb.h"
|
||||
#include "mozilla/HashFunctions.h"
|
||||
#include "mozilla/Maybe.h"
|
||||
#include "mozilla/Move.h"
|
||||
#include "mozilla/Vector.h"
|
||||
|
@ -142,13 +143,7 @@ private:
|
|||
static inline js::HashNumber
|
||||
hashIdDerivedFromPtr(uint64_t id)
|
||||
{
|
||||
// NodeIds and StackFrameIds are always 64 bits, but they are derived from
|
||||
// the original referents' addresses, which could have been either 32 or 64
|
||||
// bits long. As such, NodeId and StackFrameId have little entropy in their
|
||||
// bottom three bits, and may or may not have entropy in their upper 32
|
||||
// bits. This hash should manage both cases well.
|
||||
id >>= 3;
|
||||
return js::HashNumber((id >> 32) ^ id);
|
||||
return mozilla::HashGeneric(id);
|
||||
}
|
||||
|
||||
struct DeserializedNode::HashPolicy
|
||||
|
|
|
@ -119,7 +119,7 @@ ShaderOutput(gl::GLContext* gl)
|
|||
case 440: return SH_GLSL_440_CORE_OUTPUT;
|
||||
case 450: return SH_GLSL_450_CORE_OUTPUT;
|
||||
default:
|
||||
MOZ_CRASH("GFX: Unexpected GLSL version.");
|
||||
MOZ_ASSERT(false, "GFX: Unexpected GLSL version.");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "nsCExternalHandlerService.h"
|
||||
#include "nsIFileStreams.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
||||
#include "mozilla/dom/Directory.h"
|
||||
#include "mozilla/dom/File.h"
|
||||
|
|
|
@ -465,13 +465,13 @@ void
|
|||
WebRenderBridgeChild::BeginClearCachedResources()
|
||||
{
|
||||
mIsInClearCachedResources = true;
|
||||
SendClearCachedResources();
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderBridgeChild::EndClearCachedResources()
|
||||
{
|
||||
ProcessWebRenderParentCommands();
|
||||
SendClearCachedResources();
|
||||
mIsInClearCachedResources = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -846,11 +846,11 @@ WebRenderBridgeParent::RecvClearCachedResources()
|
|||
mCompositorBridge->ObserveLayerUpdate(GetLayersId(), GetChildLayerObserverEpoch(), false);
|
||||
|
||||
// Clear resources
|
||||
// XXX Can we clear more resources?
|
||||
++mWrEpoch; // Update webrender epoch
|
||||
mApi->ClearRootDisplayList(wr::NewEpoch(mWrEpoch), mPipelineId);
|
||||
// Schedule composition to clean up Pipeline
|
||||
mCompositorScheduler->ScheduleComposition();
|
||||
DeleteOldImages();
|
||||
// Remove animations.
|
||||
for (std::unordered_set<uint64_t>::iterator iter = mActiveAnimations.begin(); iter != mActiveAnimations.end(); iter++) {
|
||||
mAnimStorage->ClearById(*iter);
|
||||
|
|
|
@ -630,18 +630,18 @@ WebRenderLayerManager::MakeSnapshotIfRequired(LayoutDeviceIntSize aSize)
|
|||
void
|
||||
WebRenderLayerManager::AddImageKeyForDiscard(wr::ImageKey key)
|
||||
{
|
||||
mImageKeys.push_back(key);
|
||||
mImageKeysToDelete.push_back(key);
|
||||
}
|
||||
|
||||
void
|
||||
WebRenderLayerManager::DiscardImages()
|
||||
{
|
||||
if (WrBridge()->IPCOpen()) {
|
||||
for (auto key : mImageKeys) {
|
||||
for (auto key : mImageKeysToDelete) {
|
||||
WrBridge()->SendDeleteImage(key);
|
||||
}
|
||||
}
|
||||
mImageKeys.clear();
|
||||
mImageKeysToDelete.clear();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -666,7 +666,7 @@ WebRenderLayerManager::DiscardLocalImages()
|
|||
// Removes images but doesn't tell the parent side about them
|
||||
// This is useful in empty / failed transactions where we created
|
||||
// image keys but didn't tell the parent about them yet.
|
||||
mImageKeys.clear();
|
||||
mImageKeysToDelete.clear();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -764,6 +764,7 @@ WebRenderLayerManager::ClearCachedResources(Layer* aSubtree)
|
|||
} else if (mRoot) {
|
||||
ClearLayer(mRoot);
|
||||
}
|
||||
DiscardImages();
|
||||
WrBridge()->EndClearCachedResources();
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ private:
|
|||
|
||||
private:
|
||||
nsIWidget* MOZ_NON_OWNING_REF mWidget;
|
||||
std::vector<wr::ImageKey> mImageKeys;
|
||||
std::vector<wr::ImageKey> mImageKeysToDelete;
|
||||
nsTArray<uint64_t> mDiscardedCompositorAnimationsIds;
|
||||
|
||||
/* PaintedLayer callbacks; valid at the end of a transaciton,
|
||||
|
|
|
@ -141,7 +141,7 @@
|
|||
# endif
|
||||
# else
|
||||
# define MOZ_MEMORY_API MOZ_EXTERN_C MFBT_API
|
||||
# if defined(MOZ_WIDGET_ANDROID) || defined(MOZ_WIDGET_GONK)
|
||||
# if defined(MOZ_WIDGET_ANDROID)
|
||||
# define MOZ_WRAP_NEW_DELETE
|
||||
# endif
|
||||
# endif
|
||||
|
|
|
@ -68,14 +68,7 @@ TEST(VolatileBufferTest, RealVolatileBuffersWork)
|
|||
}
|
||||
|
||||
// Test purging if we know how to
|
||||
#if defined(MOZ_WIDGET_GONK)
|
||||
// This also works on Android, but we need root.
|
||||
int fd = open("/" ASHMEM_NAME_DEF, O_RDWR);
|
||||
|
||||
ASSERT_GE(fd, 0) << "Failed to open ashmem device";
|
||||
ASSERT_GE(ioctl(fd, ASHMEM_PURGE_ALL_CACHES, NULL), 0)
|
||||
<< "Failed to purge ashmem caches";
|
||||
#elif defined(XP_DARWIN)
|
||||
#if defined(XP_DARWIN)
|
||||
int state;
|
||||
vm_purgable_control(mach_task_self(), (vm_address_t)NULL,
|
||||
VM_PURGABLE_PURGE_ALL, &state);
|
||||
|
|
|
@ -61,6 +61,7 @@ public class AppConstants {
|
|||
* Otherwise, we need a range check.
|
||||
*/
|
||||
public static final boolean preMarshmallow = MAX_SDK_VERSION < 23 || (MIN_SDK_VERSION < 23 && Build.VERSION.SDK_INT < 23);
|
||||
public static final boolean preLollipopMR1 = MAX_SDK_VERSION < 22 || (MIN_SDK_VERSION < 22 && Build.VERSION.SDK_INT < 22);
|
||||
public static final boolean preLollipop = MAX_SDK_VERSION < 21 || (MIN_SDK_VERSION < 21 && Build.VERSION.SDK_INT < 21);
|
||||
public static final boolean preJBMR2 = MAX_SDK_VERSION < 18 || (MIN_SDK_VERSION < 18 && Build.VERSION.SDK_INT < 18);
|
||||
public static final boolean preJBMR1 = MAX_SDK_VERSION < 17 || (MIN_SDK_VERSION < 17 && Build.VERSION.SDK_INT < 17);
|
||||
|
|
|
@ -314,8 +314,8 @@ public class DateTimePicker extends FrameLayout {
|
|||
});
|
||||
|
||||
final int height;
|
||||
if (Versions.preLollipop) {
|
||||
// The 4.X version of CalendarView doesn't request any height, resulting in
|
||||
if (Versions.preLollipopMR1) {
|
||||
// Older versions of CalendarView don't request any height, resulting in
|
||||
// the whole dialog not appearing unless we manually request height.
|
||||
height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 200, getResources().getDisplayMetrics());;
|
||||
} else {
|
||||
|
|
|
@ -64,23 +64,6 @@ private:
|
|||
static std::vector<AtForkFuncs, SpecialAllocator<AtForkFuncs> > atfork;
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "cpuacct.h"
|
||||
|
||||
#if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID)
|
||||
extern "C" NS_EXPORT int
|
||||
timer_create(clockid_t, struct sigevent*, timer_t*)
|
||||
{
|
||||
__android_log_print(ANDROID_LOG_ERROR, "BionicGlue", "timer_create not supported!");
|
||||
abort();
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define cpuacct_add(x)
|
||||
#endif
|
||||
|
||||
#if ANDROID_VERSION < 17 || defined(MOZ_WIDGET_ANDROID)
|
||||
extern "C" NS_EXPORT int
|
||||
pthread_atfork(void (*prepare)(void), void (*parent)(void), void (*child)(void))
|
||||
|
@ -108,7 +91,6 @@ fork(void)
|
|||
|
||||
switch ((pid = syscall(__NR_clone, SIGCHLD, NULL, NULL, NULL, NULL))) {
|
||||
case 0:
|
||||
cpuacct_add(getuid());
|
||||
for (auto it = atfork.begin();
|
||||
it < atfork.end(); ++it)
|
||||
if (it->child)
|
||||
|
@ -140,7 +122,6 @@ raise(int sig)
|
|||
}
|
||||
|
||||
/* Flash plugin uses symbols that are not present in Android >= 4.4 */
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
namespace android {
|
||||
namespace VectorImpl {
|
||||
NS_EXPORT void reservedVectorImpl1(void) { }
|
||||
|
@ -153,5 +134,4 @@ namespace android {
|
|||
NS_EXPORT void reservedVectorImpl8(void) { }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -427,8 +427,7 @@ public:
|
|||
* So it is same value of TimeStamp posix implementation.
|
||||
* UNTESTED ON OTHER PLATFORMS
|
||||
*/
|
||||
#if defined(MOZ_WIDGET_GONK) || defined(XP_DARWIN) || \
|
||||
defined(MOZ_WIDGET_ANDROID)
|
||||
#if defined(XP_DARWIN) || defined(MOZ_WIDGET_ANDROID)
|
||||
static TimeStamp FromSystemTime(int64_t aSystemTime)
|
||||
{
|
||||
static_assert(sizeof(aSystemTime) == sizeof(TimeStampValue),
|
||||
|
|
|
@ -26,7 +26,7 @@ public:
|
|||
MOZ_ASSERT(mListener, "no stream listener specified");
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_FORWARD_SAFE_NSIREQUESTOBSERVER(mListener)
|
||||
NS_FORWARD_SAFE_NSISTREAMLISTENER(mListener)
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
|
||||
#include "nsWebRequestListener.h"
|
||||
|
||||
#if !defined(MOZ_WIDGET_GONK) && !defined(MOZ_WIDGET_ANDROID)
|
||||
#if !defined(MOZ_WIDGET_ANDROID)
|
||||
#define MOZ_HAS_TERMINATOR
|
||||
#endif
|
||||
|
||||
|
|
|
@ -145,9 +145,6 @@ static const mozilla::Module::ContractIDEntry kDiskSpaceWatcherContracts[] = {
|
|||
};
|
||||
|
||||
static const mozilla::Module::CategoryEntry kDiskSpaceWatcherCategories[] = {
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
{ "profile-after-change", "Disk Space Watcher Service", DISKSPACEWATCHER_CONTRACTID },
|
||||
#endif
|
||||
{ nullptr }
|
||||
};
|
||||
|
||||
|
|
|
@ -279,7 +279,7 @@ var UninstallObserver = {
|
|||
ExtensionStorage.clear(addon.id));
|
||||
|
||||
// Clear any IndexedDB storage created by the extension
|
||||
let baseURI = NetUtil.newURI(`moz-extension://${uuid}/`);
|
||||
let baseURI = Services.io.newURI(`moz-extension://${uuid}/`);
|
||||
let principal = Services.scriptSecurityManager.createCodebasePrincipal(
|
||||
baseURI, {});
|
||||
Services.qms.clearStoragesForPrincipal(principal);
|
||||
|
@ -395,7 +395,7 @@ this.ExtensionData = class {
|
|||
|
||||
async readDirectory(path) {
|
||||
if (this.rootURI instanceof Ci.nsIFileURL) {
|
||||
let uri = NetUtil.newURI(this.rootURI.resolve("./" + path));
|
||||
let uri = Services.io.newURI(this.rootURI.resolve("./" + path));
|
||||
let fullPath = uri.QueryInterface(Ci.nsIFileURL).file.path;
|
||||
|
||||
let iter = new OS.File.DirectoryIterator(fullPath);
|
||||
|
@ -792,7 +792,7 @@ this.Extension = class extends ExtensionData {
|
|||
|
||||
this.id = addonData.id;
|
||||
this.version = addonData.version;
|
||||
this.baseURI = NetUtil.newURI(this.getURL("")).QueryInterface(Ci.nsIURL);
|
||||
this.baseURI = Services.io.newURI(this.getURL("")).QueryInterface(Ci.nsIURL);
|
||||
this.principal = this.createPrincipal();
|
||||
this.views = new Set();
|
||||
this._backgroundPageFrameLoader = null;
|
||||
|
|
|
@ -34,8 +34,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "MessageChannel",
|
|||
"resource://gre/modules/MessageChannel.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NativeApp",
|
||||
"resource://gre/modules/NativeMessaging.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Schemas",
|
||||
|
@ -367,7 +365,7 @@ class ProxyContextParent extends BaseContext {
|
|||
constructor(envType, extension, params, xulBrowser, principal) {
|
||||
super(envType, extension);
|
||||
|
||||
this.uri = NetUtil.newURI(params.url);
|
||||
this.uri = Services.io.newURI(params.url);
|
||||
|
||||
this.incognito = params.incognito;
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
|
||||
"resource://gre/modules/ContextualIdentityService.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
|
||||
"resource://gre/modules/NetUtil.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Services",
|
||||
"resource://gre/modules/Services.jsm");
|
||||
|
||||
/* globals DEFAULT_STORE, PRIVATE_STORE */
|
||||
|
||||
|
@ -181,7 +181,7 @@ const query = function* (detailsIn, props, context) {
|
|||
};
|
||||
if ("url" in details) {
|
||||
try {
|
||||
uri = NetUtil.newURI(details.url).QueryInterface(Ci.nsIURL);
|
||||
uri = Services.io.newURI(details.url).QueryInterface(Ci.nsIURL);
|
||||
enumerator = Services.cookies.getCookiesFromHost(uri.host, originAttributes);
|
||||
} catch (ex) {
|
||||
// This often happens for about: URLs
|
||||
|
@ -293,7 +293,7 @@ this.cookies = class extends ExtensionAPI {
|
|||
},
|
||||
|
||||
set: function(details) {
|
||||
let uri = NetUtil.newURI(details.url).QueryInterface(Ci.nsIURL);
|
||||
let uri = Services.io.newURI(details.url).QueryInterface(Ci.nsIURL);
|
||||
|
||||
let path;
|
||||
if (details.path !== null) {
|
||||
|
|
|
@ -32,8 +32,7 @@ nsWebRequestListener::OnStartRequest(nsIRequest *request, nsISupports * aCtxt)
|
|||
MOZ_ASSERT(mTargetStreamListener, "Should have mTargetStreamListener");
|
||||
MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
|
||||
|
||||
nsresult rv = mTargetStreamListener->OnStartRequest(request, aCtxt);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mTargetStreamListener->OnStartRequest(request, aCtxt);
|
||||
|
||||
return mOrigStreamListener->OnStartRequest(request, aCtxt);
|
||||
}
|
||||
|
@ -45,8 +44,7 @@ nsWebRequestListener::OnStopRequest(nsIRequest *request, nsISupports *aCtxt,
|
|||
MOZ_ASSERT(mOrigStreamListener, "Should have mOrigStreamListener");
|
||||
MOZ_ASSERT(mTargetStreamListener, "Should have mTargetStreamListener");
|
||||
|
||||
nsresult rv = mOrigStreamListener->OnStopRequest(request, aCtxt, aStatus);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
mOrigStreamListener->OnStopRequest(request, aCtxt, aStatus);
|
||||
|
||||
return mTargetStreamListener->OnStopRequest(request, aCtxt, aStatus);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "nsIStreamListener.h"
|
||||
#include "nsITraceableChannel.h"
|
||||
#include "nsIThreadRetargetableStreamListener.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
|
||||
class nsWebRequestListener final : public nsIWebRequestListener
|
||||
|
@ -18,7 +19,7 @@ class nsWebRequestListener final : public nsIWebRequestListener
|
|||
, public nsIThreadRetargetableStreamListener
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSIWEBREQUESTLISTENER
|
||||
NS_DECL_NSIREQUESTOBSERVER
|
||||
NS_DECL_NSISTREAMLISTENER
|
||||
|
@ -27,7 +28,10 @@ public:
|
|||
nsWebRequestListener() {}
|
||||
|
||||
private:
|
||||
~nsWebRequestListener() {}
|
||||
~nsWebRequestListener() {
|
||||
NS_ReleaseOnMainThreadSystemGroup("nsWebRequestListener::mTargetStreamListener",
|
||||
mTargetStreamListener.forget());
|
||||
}
|
||||
nsCOMPtr<nsIStreamListener> mOrigStreamListener;
|
||||
nsCOMPtr<nsIStreamListener> mTargetStreamListener;
|
||||
};
|
||||
|
|
|
@ -373,8 +373,6 @@ this.DownloadIntegration = {
|
|||
directoryPath = await this.getPreferredDownloadsDirectory();
|
||||
#elifdef MOZ_WIDGET_ANDROID
|
||||
directoryPath = await this.getSystemDownloadsDirectory();
|
||||
#elifdef MOZ_WIDGET_GONK
|
||||
directoryPath = await this.getSystemDownloadsDirectory();
|
||||
#else
|
||||
directoryPath = this._getDirectory("TmpD");
|
||||
#endif
|
||||
|
|
|
@ -102,7 +102,7 @@ nsresult DownloadPlatform::DownloadDone(nsIURI* aSource, nsIURI* aReferrer, nsIF
|
|||
const nsACString& aContentType, bool aIsPrivate)
|
||||
{
|
||||
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(MOZ_WIDGET_ANDROID) \
|
||||
|| defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_GONK)
|
||||
|| defined(MOZ_WIDGET_GTK)
|
||||
|
||||
nsAutoString path;
|
||||
if (aTarget && NS_SUCCEEDED(aTarget->GetPath(path))) {
|
||||
|
|
|
@ -241,7 +241,7 @@ NS_IMPL_ISUPPORTS(nsAppStartup,
|
|||
NS_IMETHODIMP
|
||||
nsAppStartup::CreateHiddenWindow()
|
||||
{
|
||||
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_UIKIT)
|
||||
#if defined(MOZ_WIDGET_UIKIT)
|
||||
return NS_OK;
|
||||
#else
|
||||
nsCOMPtr<nsIAppShellService> appShellService
|
||||
|
@ -256,7 +256,7 @@ nsAppStartup::CreateHiddenWindow()
|
|||
NS_IMETHODIMP
|
||||
nsAppStartup::DestroyHiddenWindow()
|
||||
{
|
||||
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_WIDGET_UIKIT)
|
||||
#if defined(MOZ_WIDGET_UIKIT)
|
||||
return NS_OK;
|
||||
#else
|
||||
nsCOMPtr<nsIAppShellService> appShellService
|
||||
|
|
|
@ -6795,14 +6795,6 @@
|
|||
"kind": "boolean",
|
||||
"description": "Deleted or to-be-reused innerwindow which has had mutation event listeners."
|
||||
},
|
||||
"FORM_ISINDEX_USED": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"alert_emails": ["hsivonen@mozilla.com"],
|
||||
"expires_in_version": "56",
|
||||
"kind": "flag",
|
||||
"bug_numbers": [1356181],
|
||||
"description": "Whether there has been an isindex form submission in this session."
|
||||
},
|
||||
"CHARSET_OVERRIDE_SITUATION": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"expires_in_version": "never",
|
||||
|
|
|
@ -1915,7 +1915,6 @@
|
|||
"FX_TOUCH_USED",
|
||||
"GEOLOCATION_ERROR",
|
||||
"JS_TELEMETRY_ADDON_EXCEPTIONS",
|
||||
"FORM_ISINDEX_USED",
|
||||
"MASTER_PASSWORD_ENABLED",
|
||||
"MEDIA_CODEC_USED",
|
||||
"MEDIA_DECODING_PROCESS_CRASH",
|
||||
|
|
|
@ -490,13 +490,6 @@ nsWindowWatcher::CreateChromeWindow(const nsACString& aFeatures,
|
|||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
|
||||
// B2G multi-screen support. mozDisplayId is returned from the
|
||||
// "display-changed" event, it is also platform-dependent.
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
int retval = WinHasOption(aFeatures, "mozDisplayId", 0, nullptr);
|
||||
windowCreator2->SetScreenId(retval);
|
||||
#endif
|
||||
|
||||
bool cancel = false;
|
||||
nsCOMPtr<nsIWebBrowserChrome> newWindowChrome;
|
||||
nsresult rv =
|
||||
|
|
|
@ -1601,11 +1601,9 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
|
|||
if (gExceptionHandler)
|
||||
return NS_ERROR_ALREADY_INITIALIZED;
|
||||
|
||||
#if !defined(DEBUG) || defined(MOZ_WIDGET_GONK)
|
||||
#if !defined(DEBUG)
|
||||
// In non-debug builds, enable the crash reporter by default, and allow
|
||||
// disabling it with the MOZ_CRASHREPORTER_DISABLE environment variable.
|
||||
// Also enable it by default in debug gonk builds as it is difficult to
|
||||
// set environment on startup.
|
||||
const char *envvar = PR_GetEnv("MOZ_CRASHREPORTER_DISABLE");
|
||||
if (envvar && *envvar && !force)
|
||||
return NS_OK;
|
||||
|
@ -1617,10 +1615,7 @@ nsresult SetExceptionHandler(nsIFile* aXREDirectory,
|
|||
return NS_OK;
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GONK)
|
||||
doReport = false;
|
||||
headlessClient = true;
|
||||
#elif defined(XP_WIN)
|
||||
#if defined(XP_WIN)
|
||||
doReport = ShouldReport();
|
||||
#else
|
||||
// this environment variable prevents us from launching
|
||||
|
|
|
@ -156,8 +156,6 @@ this.AppConstants = Object.freeze({
|
|||
"macosx",
|
||||
#elif MOZ_WIDGET_ANDROID
|
||||
"android",
|
||||
#elif MOZ_WIDGET_GONK
|
||||
"gonk",
|
||||
#elif XP_LINUX
|
||||
"linux",
|
||||
#else
|
||||
|
|
|
@ -30,10 +30,6 @@
|
|||
#include "mozilla/Printf.h"
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_WIDGET_GONK) && !defined(MOZ_CRASHREPORTER)
|
||||
#include <sys/syscall.h>
|
||||
#endif
|
||||
|
||||
// **********************************************************************
|
||||
// class nsProfileLock
|
||||
//
|
||||
|
@ -192,27 +188,6 @@ void nsProfileLock::FatalSignalHandler(int signo
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
switch (signo) {
|
||||
case SIGQUIT:
|
||||
case SIGILL:
|
||||
case SIGABRT:
|
||||
case SIGSEGV:
|
||||
#ifndef MOZ_CRASHREPORTER
|
||||
// Retrigger the signal for those that can generate a core dump
|
||||
signal(signo, SIG_DFL);
|
||||
if (info->si_code <= 0) {
|
||||
if (syscall(__NR_tgkill, getpid(), syscall(__NR_gettid), signo) < 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Backstop exit call, just in case.
|
||||
_exit(signo);
|
||||
}
|
||||
|
|
|
@ -66,10 +66,6 @@
|
|||
#include <prtime.h>
|
||||
|
||||
#include "nsThreadUtils.h"
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include "nsIObserverService.h"
|
||||
#include "mozilla/Services.h"
|
||||
#endif
|
||||
|
||||
using mozilla::TimeDuration;
|
||||
using mozilla::TimeStamp;
|
||||
|
@ -85,31 +81,6 @@ struct TracerStartClosure {
|
|||
int32_t mThresholdInterval;
|
||||
};
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
class EventLoopLagDispatcher : public Runnable
|
||||
{
|
||||
public:
|
||||
explicit EventLoopLagDispatcher(int aLag)
|
||||
: mLag(aLag) {}
|
||||
|
||||
NS_IMETHOD Run() override
|
||||
{
|
||||
nsCOMPtr<nsIObserverService> obsService =
|
||||
mozilla::services::GetObserverService();
|
||||
if (!obsService) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
nsAutoString value;
|
||||
value.AppendInt(mLag);
|
||||
return obsService->NotifyObservers(nullptr, "event-loop-lag", value.get());
|
||||
}
|
||||
|
||||
private:
|
||||
int mLag;
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The tracer thread fires events at the native event loop roughly
|
||||
* every kMeasureInterval. It will sleep to attempt not to send them
|
||||
|
@ -180,10 +151,6 @@ void TracerThread(void *arg)
|
|||
fprintf(log, "MOZ_EVENT_TRACE sample %llu %lf\n",
|
||||
now,
|
||||
duration.ToMilliseconds());
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_DispatchToMainThread(
|
||||
new EventLoopLagDispatcher(int(duration.ToSecondsSigDigits() * 1000)));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (next_sleep > duration.ToMilliseconds()) {
|
||||
|
|
|
@ -4018,7 +4018,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_GONK)
|
||||
#if defined(MOZ_UPDATER) && !defined(MOZ_WIDGET_ANDROID)
|
||||
// Check for and process any available updates
|
||||
nsCOMPtr<nsIFile> updRoot;
|
||||
bool persistent;
|
||||
|
@ -4211,7 +4211,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag)
|
|||
}
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && !defined(MOZ_WIDGET_GONK)
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
void AddSandboxAnnotations()
|
||||
{
|
||||
// Include the sandbox content level, regardless of platform
|
||||
|
@ -4240,7 +4240,7 @@ void AddSandboxAnnotations()
|
|||
NS_LITERAL_CSTRING("ContentSandboxCapable"),
|
||||
sandboxCapable ? NS_LITERAL_CSTRING("1") : NS_LITERAL_CSTRING("0"));
|
||||
}
|
||||
#endif /* MOZ_CONTENT_SANDBOX && !MOZ_WIDGET_GONK */
|
||||
#endif /* MOZ_CONTENT_SANDBOX */
|
||||
#endif /* MOZ_CRASHREPORTER */
|
||||
|
||||
/*
|
||||
|
@ -4561,7 +4561,7 @@ XREMain::XRE_mainRun()
|
|||
}
|
||||
#endif /* MOZ_INSTRUMENT_EVENT_LOOP */
|
||||
|
||||
#if defined(MOZ_SANDBOX) && defined(XP_LINUX) && !defined(MOZ_WIDGET_GONK)
|
||||
#if defined(MOZ_SANDBOX) && defined(XP_LINUX)
|
||||
// If we're on Linux, we now have information about the OS capabilities
|
||||
// available to us.
|
||||
SandboxInfo sandboxInfo = SandboxInfo::Get();
|
||||
|
@ -4584,12 +4584,12 @@ XREMain::XRE_mainRun()
|
|||
CrashReporter::AnnotateCrashReport(
|
||||
NS_LITERAL_CSTRING("ContentSandboxCapabilities"), flagsString);
|
||||
#endif /* MOZ_CRASHREPORTER */
|
||||
#endif /* MOZ_SANDBOX && XP_LINUX && !MOZ_WIDGET_GONK */
|
||||
#endif /* MOZ_SANDBOX && XP_LINUX */
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && !defined(MOZ_WIDGET_GONK)
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
AddSandboxAnnotations();
|
||||
#endif /* MOZ_CONTENT_SANDBOX && !MOZ_WIDGET_GONK */
|
||||
#endif /* MOZ_CONTENT_SANDBOX */
|
||||
#endif /* MOZ_CRASHREPORTER */
|
||||
|
||||
{
|
||||
|
|
|
@ -89,10 +89,8 @@
|
|||
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
#include "mozilla/SandboxSettings.h"
|
||||
#if !defined(MOZ_WIDGET_GONK)
|
||||
#include "mozilla/Preferences.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
|
||||
#include "mozilla/Sandbox.h"
|
||||
|
@ -309,7 +307,7 @@ SetTaskbarGroupId(const nsString& aId)
|
|||
#endif
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && !defined(MOZ_WIDGET_GONK)
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
void
|
||||
AddContentSandboxLevelAnnotation()
|
||||
{
|
||||
|
@ -321,7 +319,7 @@ AddContentSandboxLevelAnnotation()
|
|||
NS_LITERAL_CSTRING("ContentSandboxLevel"), levelString);
|
||||
}
|
||||
}
|
||||
#endif /* MOZ_CONTENT_SANDBOX && !MOZ_WIDGET_GONK */
|
||||
#endif /* MOZ_CONTENT_SANDBOX */
|
||||
#endif /* MOZ_CRASHREPORTER */
|
||||
|
||||
namespace {
|
||||
|
@ -702,7 +700,7 @@ XRE_InitChildProcess(int aArgc,
|
|||
OverrideDefaultLocaleIfNeeded();
|
||||
|
||||
#if defined(MOZ_CRASHREPORTER)
|
||||
#if defined(MOZ_CONTENT_SANDBOX) && !defined(MOZ_WIDGET_GONK)
|
||||
#if defined(MOZ_CONTENT_SANDBOX)
|
||||
AddContentSandboxLevelAnnotation();
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1249,14 +1249,6 @@ nsresult
|
|||
nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult)
|
||||
{
|
||||
nsCOMPtr<nsIFile> updRoot;
|
||||
#if defined(MOZ_WIDGET_GONK)
|
||||
|
||||
nsresult rv = NS_NewNativeLocalFile(nsDependentCString("/data/local"),
|
||||
true,
|
||||
getter_AddRefs(updRoot));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
#else
|
||||
nsCOMPtr<nsIFile> appFile;
|
||||
bool per = false;
|
||||
nsresult rv = GetFile(XRE_EXECUTABLE_FILE, &per, getter_AddRefs(appFile));
|
||||
|
@ -1402,7 +1394,6 @@ nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
#endif // XP_WIN
|
||||
#endif
|
||||
updRoot.forget(aResult);
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -1506,9 +1497,6 @@ nsXREDirProvider::GetUserDataDirectoryHome(nsIFile** aFile, bool aLocal)
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
rv = NS_NewLocalFile(path, true, getter_AddRefs(localDir));
|
||||
#elif defined(MOZ_WIDGET_GONK)
|
||||
rv = NS_NewNativeLocalFile(NS_LITERAL_CSTRING("/data/b2g"), true,
|
||||
getter_AddRefs(localDir));
|
||||
#elif defined(XP_UNIX)
|
||||
const char* homeDir = getenv("HOME");
|
||||
if (!homeDir || !*homeDir)
|
||||
|
|
Загрузка…
Ссылка в новой задаче