mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
merge mozilla-central to mozilla-inbound. r=merge a=merge
This commit is contained in:
commit
3c466b2f77
@ -582,7 +582,8 @@ this.PlacesUIUtils = {
|
||||
if (!this.SUPPORTED_FLAVORS.includes(aData.type))
|
||||
throw new Error(`Unsupported '${aData.type}' data type`);
|
||||
|
||||
if ("itemGuid" in aData) {
|
||||
if ("itemGuid" in aData && "instanceId" in aData &&
|
||||
aData.instanceId == PlacesUtils.instanceId) {
|
||||
if (!this.PLACES_FLAVORS.includes(aData.type))
|
||||
throw new Error(`itemGuid unexpectedly set on ${aData.type} data`);
|
||||
|
||||
|
@ -53,6 +53,8 @@ subsuite = clipboard
|
||||
[browser_library_search.js]
|
||||
[browser_library_views_liveupdate.js]
|
||||
[browser_markPageAsFollowedLink.js]
|
||||
[browser_paste_bookmarks.js]
|
||||
subsuite = clipboard
|
||||
[browser_paste_into_tags.js]
|
||||
subsuite = clipboard
|
||||
[browser_sidebarpanels_click.js]
|
||||
|
@ -0,0 +1,103 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const TEST_URL = "http://example.com/";
|
||||
const TEST_URL1 = "https://example.com/otherbrowser";
|
||||
|
||||
var PlacesOrganizer;
|
||||
var ContentTree;
|
||||
var bookmark;
|
||||
var bookmarkId;
|
||||
|
||||
add_task(async function setup() {
|
||||
await PlacesUtils.bookmarks.eraseEverything();
|
||||
let organizer = await promiseLibrary();
|
||||
|
||||
registerCleanupFunction(async function() {
|
||||
await promiseLibraryClosed(organizer);
|
||||
await PlacesUtils.bookmarks.eraseEverything();
|
||||
});
|
||||
|
||||
PlacesOrganizer = organizer.PlacesOrganizer;
|
||||
ContentTree = organizer.ContentTree;
|
||||
|
||||
info("Selecting BookmarksToolbar in the left pane");
|
||||
PlacesOrganizer.selectLeftPaneQuery("BookmarksToolbar");
|
||||
|
||||
bookmark = await PlacesUtils.bookmarks.insert({
|
||||
parentGuid: PlacesUtils.bookmarks.toolbarGuid,
|
||||
url: TEST_URL,
|
||||
title: "0"
|
||||
});
|
||||
bookmarkId = await PlacesUtils.promiseItemId(bookmark.guid);
|
||||
|
||||
ContentTree.view.selectItems([bookmarkId]);
|
||||
|
||||
await promiseClipboard(() => {
|
||||
info("Copying selection");
|
||||
ContentTree.view.controller.cut();
|
||||
}, PlacesUtils.TYPE_X_MOZ_PLACE);
|
||||
});
|
||||
|
||||
add_task(async function paste() {
|
||||
info("Selecting UnfiledBookmarks in the left pane");
|
||||
PlacesOrganizer.selectLeftPaneQuery("UnfiledBookmarks");
|
||||
|
||||
info("Pasting clipboard");
|
||||
await ContentTree.view.controller.paste();
|
||||
|
||||
let tree = await PlacesUtils.promiseBookmarksTree(PlacesUtils.bookmarks.unfiledGuid);
|
||||
|
||||
Assert.equal(tree.children.length, 1,
|
||||
"Should be one bookmark in the unfiled folder.");
|
||||
Assert.equal(tree.children[0].title, "0",
|
||||
"Should have the correct title");
|
||||
Assert.equal(tree.children[0].uri, TEST_URL,
|
||||
"Should have the correct URL");
|
||||
|
||||
await PlacesUtils.bookmarks.remove(tree.children[0].guid);
|
||||
});
|
||||
|
||||
add_task(async function paste_from_different_instance() {
|
||||
let xferable = Cc["@mozilla.org/widget/transferable;1"]
|
||||
.createInstance(Ci.nsITransferable);
|
||||
xferable.init(null);
|
||||
|
||||
// Fake data on the clipboard to pretend this is from a different instance
|
||||
// of Firefox.
|
||||
let data = {
|
||||
"title": "test",
|
||||
"id": 32,
|
||||
"instanceId": "FAKEFAKEFAKE",
|
||||
"itemGuid": "ZBf_TYkrYGvW",
|
||||
"parent": 452,
|
||||
"dateAdded": 1464866275853000,
|
||||
"lastModified": 1507638113352000,
|
||||
"type": "text/x-moz-place",
|
||||
"uri": TEST_URL1
|
||||
};
|
||||
data = JSON.stringify(data);
|
||||
|
||||
xferable.addDataFlavor(PlacesUtils.TYPE_X_MOZ_PLACE);
|
||||
xferable.setTransferData(PlacesUtils.TYPE_X_MOZ_PLACE, PlacesUtils.toISupportsString(data),
|
||||
data.length * 2);
|
||||
|
||||
Services.clipboard.setData(xferable, null, Ci.nsIClipboard.kGlobalClipboard);
|
||||
|
||||
info("Pasting clipboard");
|
||||
|
||||
await ContentTree.view.controller.paste();
|
||||
|
||||
let tree = await PlacesUtils.promiseBookmarksTree(PlacesUtils.bookmarks.unfiledGuid);
|
||||
|
||||
Assert.equal(tree.children.length, 1,
|
||||
"Should be one bookmark in the unfiled folder.");
|
||||
Assert.equal(tree.children[0].title, "test",
|
||||
"Should have the correct title");
|
||||
Assert.equal(tree.children[0].uri, TEST_URL1,
|
||||
"Should have the correct URL");
|
||||
|
||||
await PlacesUtils.bookmarks.remove(tree.children[0].guid);
|
||||
});
|
@ -146,11 +146,6 @@
|
||||
@BINPATH@/@DLL_PREFIX@mozavcodec@DLL_SUFFIX@
|
||||
#endif
|
||||
@RESPATH@/browser/blocklist.xml
|
||||
#ifdef XP_UNIX
|
||||
#ifndef XP_MACOSX
|
||||
@RESPATH@/run-mozilla.sh
|
||||
#endif
|
||||
#endif
|
||||
#ifdef XP_WIN
|
||||
#ifdef _AMD64_
|
||||
@BINPATH@/@DLL_PREFIX@qipcap64@DLL_SUFFIX@
|
||||
|
@ -1735,6 +1735,13 @@ toolbarpaletteitem[place=panel] > .toolbaritem-combined-buttons > toolbarbutton
|
||||
width: @wideMenuPanelWidth@;
|
||||
}
|
||||
|
||||
/* In customize mode, the overflow list is constrained by its container,
|
||||
* so we set width: auto to avoid the scrollbar not fitting.
|
||||
*/
|
||||
#customization-panelHolder > .widget-overflow-list {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
toolbaritem[overflowedItem=true],
|
||||
.widget-overflow-list .toolbarbutton-1 {
|
||||
width: 100%;
|
||||
|
@ -23,6 +23,15 @@ const { L10N } = require("../utils/l10n");
|
||||
|
||||
const { button, div } = DOM;
|
||||
|
||||
const REQUESTS_COUNT_EMPTY = L10N.getStr("networkMenu.summary.requestsCountEmpty");
|
||||
const TOOLTIP_PERF = L10N.getStr("networkMenu.summary.tooltip.perf");
|
||||
const TOOLTIP_REQUESTS_COUNT = L10N.getStr("networkMenu.summary.tooltip.requestsCount");
|
||||
const TOOLTIP_TRANSFERRED = L10N.getStr("networkMenu.summary.tooltip.transferred");
|
||||
const TOOLTIP_FINISH = L10N.getStr("networkMenu.summary.tooltip.finish");
|
||||
const TOOLTIP_DOM_CONTENT_LOADED =
|
||||
L10N.getStr("networkMenu.summary.tooltip.domContentLoaded");
|
||||
const TOOLTIP_LOAD = L10N.getStr("networkMenu.summary.tooltip.load");
|
||||
|
||||
function StatusBar({ summary, openStatistics, timingMarkers }) {
|
||||
let { count, contentSize, transferredSize, millis } = summary;
|
||||
let {
|
||||
@ -30,7 +39,7 @@ function StatusBar({ summary, openStatistics, timingMarkers }) {
|
||||
load,
|
||||
} = timingMarkers;
|
||||
|
||||
let countText = count === 0 ? L10N.getStr("networkMenu.summary.requestsCountEmpty") :
|
||||
let countText = count === 0 ? REQUESTS_COUNT_EMPTY :
|
||||
PluralForm.get(
|
||||
count, L10N.getFormatStrWithNumbers("networkMenu.summary.requestsCount", count)
|
||||
);
|
||||
@ -43,34 +52,34 @@ function StatusBar({ summary, openStatistics, timingMarkers }) {
|
||||
div({ className: "devtools-toolbar devtools-toolbar-bottom" },
|
||||
button({
|
||||
className: "devtools-button requests-list-network-summary-button",
|
||||
title: L10N.getStr("networkMenu.summary.tooltip.perf"),
|
||||
title: TOOLTIP_PERF,
|
||||
onClick: openStatistics,
|
||||
},
|
||||
div({ className: "summary-info-icon" }),
|
||||
),
|
||||
div({
|
||||
className: "status-bar-label requests-list-network-summary-count",
|
||||
title: L10N.getStr("networkMenu.summary.tooltip.requestsCount"),
|
||||
title: TOOLTIP_REQUESTS_COUNT,
|
||||
}, countText),
|
||||
count !== 0 &&
|
||||
div({
|
||||
className: "status-bar-label requests-list-network-summary-transfer",
|
||||
title: L10N.getStr("networkMenu.summary.tooltip.transferred"),
|
||||
title: TOOLTIP_TRANSFERRED,
|
||||
}, transferText),
|
||||
count !== 0 &&
|
||||
div({
|
||||
className: "status-bar-label requests-list-network-summary-finish",
|
||||
title: L10N.getStr("networkMenu.summary.tooltip.finish"),
|
||||
title: TOOLTIP_FINISH,
|
||||
}, finishText),
|
||||
DOMContentLoaded > -1 &&
|
||||
div({
|
||||
className: "status-bar-label dom-content-loaded",
|
||||
title: L10N.getStr("networkMenu.summary.tooltip.domContentLoaded"),
|
||||
title: TOOLTIP_DOM_CONTENT_LOADED,
|
||||
}, `DOMContentLoaded: ${getFormattedTime(DOMContentLoaded)}`),
|
||||
load > -1 &&
|
||||
div({
|
||||
className: "status-bar-label load",
|
||||
title: L10N.getStr("networkMenu.summary.tooltip.load"),
|
||||
title: TOOLTIP_LOAD,
|
||||
}, `load: ${getFormattedTime(load)}`),
|
||||
)
|
||||
);
|
||||
|
@ -557,7 +557,6 @@ KeyframeEffectReadOnly::EnsureBaseStyle(
|
||||
aPresContext->StyleSet()->AsServo()->GetBaseContextForElement(
|
||||
mTarget->mElement,
|
||||
aPresContext,
|
||||
nullptr,
|
||||
aPseudoType,
|
||||
aComputedStyle);
|
||||
}
|
||||
|
@ -2877,9 +2877,7 @@ GetFontStyleForServo(Element* aElement, const nsAString& aFont,
|
||||
// instead of ResolvestyleFor() because we need up-to-date style even if
|
||||
// the canvas element is display:none.
|
||||
parentStyle =
|
||||
styleSet->ResolveStyleLazily(aElement,
|
||||
CSSPseudoElementType::NotPseudo,
|
||||
nullptr);
|
||||
styleSet->ResolveStyleLazily(aElement, CSSPseudoElementType::NotPseudo);
|
||||
} else {
|
||||
RefPtr<RawServoDeclarationBlock> declarations =
|
||||
CreateFontDeclarationForServo(NS_LITERAL_STRING("10px sans-serif"),
|
||||
|
@ -316,6 +316,8 @@ WebGL2Context::ReadBuffer(GLenum mode)
|
||||
if (IsContextLost())
|
||||
return;
|
||||
|
||||
gl->MakeCurrent();
|
||||
|
||||
if (mBoundReadFramebuffer) {
|
||||
mBoundReadFramebuffer->ReadBuffer(funcName, mode);
|
||||
return;
|
||||
|
@ -3052,7 +3052,7 @@ IsOrHasAncestorWithDisplayNone(Element* aElement, nsIPresShell* aPresShell)
|
||||
// Call ResolveStyleLazily to protect against stale element data in
|
||||
// the tree when styled by Servo.
|
||||
sc = styleSet->AsServo()->ResolveStyleLazily(
|
||||
element, CSSPseudoElementType::NotPseudo, nullptr);
|
||||
element, CSSPseudoElementType::NotPseudo);
|
||||
}
|
||||
} else {
|
||||
sc = nsComputedDOMStyle::GetStyleContextNoFlush(element,
|
||||
|
@ -26,8 +26,6 @@ extern mozilla::LazyLogModule gMediaStreamGraphLog;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
StaticRefPtr<nsIThreadPool> AsyncCubebTask::sThreadPool;
|
||||
|
||||
GraphDriver::GraphDriver(MediaStreamGraphImpl* aGraphImpl)
|
||||
: mIterationStart(0),
|
||||
mIterationEnd(0),
|
||||
@ -93,19 +91,6 @@ void GraphDriver::EnsureNextIteration()
|
||||
mGraphImpl->EnsureNextIteration();
|
||||
}
|
||||
|
||||
void GraphDriver::Shutdown()
|
||||
{
|
||||
if (AsAudioCallbackDriver()) {
|
||||
LOG(LogLevel::Debug,
|
||||
("Releasing audio driver off main thread (GraphDriver::Shutdown)."));
|
||||
RefPtr<AsyncCubebTask> releaseEvent =
|
||||
new AsyncCubebTask(AsAudioCallbackDriver(), AsyncCubebOperation::SHUTDOWN);
|
||||
releaseEvent->Dispatch(NS_DISPATCH_SYNC);
|
||||
} else {
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
bool GraphDriver::Switching()
|
||||
{
|
||||
GraphImpl()->GetMonitor().AssertCurrentThreadOwns();
|
||||
@ -237,12 +222,6 @@ ThreadedDriver::Start()
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ThreadedDriver::Resume()
|
||||
{
|
||||
Start();
|
||||
}
|
||||
|
||||
void
|
||||
ThreadedDriver::Revive()
|
||||
{
|
||||
@ -268,7 +247,7 @@ ThreadedDriver::RemoveCallback()
|
||||
}
|
||||
|
||||
void
|
||||
ThreadedDriver::Stop()
|
||||
ThreadedDriver::Shutdown()
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread(), "Must be called on main thread");
|
||||
// mGraph's thread is not running so it's OK to do whatever here
|
||||
@ -490,36 +469,20 @@ AsyncCubebTask::~AsyncCubebTask()
|
||||
{
|
||||
}
|
||||
|
||||
/* static */
|
||||
nsresult
|
||||
AsyncCubebTask::EnsureThread()
|
||||
SharedThreadPool*
|
||||
AudioCallbackDriver::GetInitShutdownThread()
|
||||
{
|
||||
if (!sThreadPool) {
|
||||
nsCOMPtr<nsIThreadPool> threadPool =
|
||||
if (!mInitShutdownThread) {
|
||||
mInitShutdownThread =
|
||||
SharedThreadPool::Get(NS_LITERAL_CSTRING("CubebOperation"), 1);
|
||||
sThreadPool = threadPool;
|
||||
// Need to null this out before xpcom-shutdown-threads Observers run
|
||||
// since we don't know the order that the shutdown-threads observers
|
||||
// will run. ClearOnShutdown guarantees it runs first.
|
||||
if (!NS_IsMainThread()) {
|
||||
nsCOMPtr<nsIRunnable> runnable =
|
||||
NS_NewRunnableFunction("AsyncCubebTask::EnsureThread", []() -> void {
|
||||
ClearOnShutdown(&sThreadPool, ShutdownPhase::ShutdownThreads);
|
||||
});
|
||||
AbstractThread::MainThread()->Dispatch(runnable.forget());
|
||||
} else {
|
||||
ClearOnShutdown(&sThreadPool, ShutdownPhase::ShutdownThreads);
|
||||
}
|
||||
|
||||
const uint32_t kIdleThreadTimeoutMs = 2000;
|
||||
|
||||
nsresult rv = sThreadPool->SetIdleThreadTimeout(PR_MillisecondsToInterval(kIdleThreadTimeoutMs));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
mInitShutdownThread->
|
||||
SetIdleThreadTimeout(PR_MillisecondsToInterval(kIdleThreadTimeoutMs));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
return mInitShutdownThread;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@ -772,16 +735,6 @@ AudioCallbackDriver::Destroy()
|
||||
mAudioStream.reset();
|
||||
}
|
||||
|
||||
void
|
||||
AudioCallbackDriver::Resume()
|
||||
{
|
||||
LOG(LogLevel::Debug,
|
||||
("Resuming audio threads for MediaStreamGraph %p", mGraphImpl));
|
||||
if (cubeb_stream_start(mAudioStream) != CUBEB_OK) {
|
||||
NS_WARNING("Could not start cubeb stream for MSG.");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AudioCallbackDriver::Start()
|
||||
{
|
||||
@ -879,6 +832,16 @@ AudioCallbackDriver::WakeUp()
|
||||
mGraphImpl->GetMonitor().Notify();
|
||||
}
|
||||
|
||||
void
|
||||
AudioCallbackDriver::Shutdown()
|
||||
{
|
||||
LOG(LogLevel::Debug,
|
||||
("Releasing audio driver off main thread (GraphDriver::Shutdown)."));
|
||||
RefPtr<AsyncCubebTask> releaseEvent =
|
||||
new AsyncCubebTask(this, AsyncCubebOperation::SHUTDOWN);
|
||||
releaseEvent->Dispatch(NS_DISPATCH_SYNC);
|
||||
}
|
||||
|
||||
#if defined(XP_WIN)
|
||||
void
|
||||
AudioCallbackDriver::ResetDefaultDevice()
|
||||
|
@ -122,16 +122,12 @@ public:
|
||||
virtual void Destroy() {}
|
||||
/* Start the graph, init the driver, start the thread. */
|
||||
virtual void Start() = 0;
|
||||
/* Stop the graph, shutting down the thread. */
|
||||
virtual void Stop() = 0;
|
||||
/* Resume after a stop */
|
||||
virtual void Resume() = 0;
|
||||
/* Revive this driver, as more messages just arrived. */
|
||||
virtual void Revive() = 0;
|
||||
/* Remove Mixer callbacks when switching */
|
||||
virtual void RemoveCallback() = 0;
|
||||
/* Shutdown GraphDriver (synchronously) */
|
||||
void Shutdown();
|
||||
virtual void Shutdown() = 0;
|
||||
/* Rate at which the GraphDriver runs, in ms. This can either be user
|
||||
* controlled (because we are using a {System,Offline}ClockDriver, and decide
|
||||
* how often we want to wakeup/how much we want to process per iteration), or
|
||||
@ -274,10 +270,9 @@ public:
|
||||
explicit ThreadedDriver(MediaStreamGraphImpl* aGraphImpl);
|
||||
virtual ~ThreadedDriver();
|
||||
void Start() override;
|
||||
void Stop() override;
|
||||
void Resume() override;
|
||||
void Revive() override;
|
||||
void RemoveCallback() override;
|
||||
void Shutdown() override;
|
||||
/**
|
||||
* Runs main control loop on the graph thread. Normally a single invocation
|
||||
* of this runs for the entire lifetime of the graph thread.
|
||||
@ -396,12 +391,11 @@ public:
|
||||
|
||||
void Destroy() override;
|
||||
void Start() override;
|
||||
void Stop() override;
|
||||
void Resume() override;
|
||||
void Revive() override;
|
||||
void RemoveCallback() override;
|
||||
void WaitForNextIteration() override;
|
||||
void WakeUp() override;
|
||||
void Shutdown() override;
|
||||
#if defined(XP_WIN)
|
||||
void ResetDefaultDevice() override;
|
||||
#endif
|
||||
@ -479,6 +473,11 @@ public:
|
||||
void SetMicrophoneActive(bool aActive);
|
||||
|
||||
void CompleteAudioContextOperations(AsyncCubebOperation aOperation);
|
||||
|
||||
/* Fetch, or create a shared thread pool with up to one thread for
|
||||
* AsyncCubebTask. */
|
||||
SharedThreadPool* GetInitShutdownThread();
|
||||
|
||||
private:
|
||||
/**
|
||||
* On certain MacBookPro, the microphone is located near the left speaker.
|
||||
@ -492,6 +491,8 @@ private:
|
||||
bool StartStream();
|
||||
friend class AsyncCubebTask;
|
||||
bool Init();
|
||||
void Stop();
|
||||
|
||||
/* MediaStreamGraphs are always down/up mixed to output channels. */
|
||||
uint32_t mOutputChannels;
|
||||
/* The size of this buffer comes from the fact that some audio backends can
|
||||
@ -542,9 +543,9 @@ private:
|
||||
AudioCallbackDriver* mDriver;
|
||||
};
|
||||
|
||||
/* Thread for off-main-thread initialization and
|
||||
* shutdown of the audio stream. */
|
||||
nsCOMPtr<nsIThread> mInitShutdownThread;
|
||||
/* Shared thread pool with up to one thread for off-main-thread
|
||||
* initialization and shutdown of the audio stream via AsyncCubebTask. */
|
||||
RefPtr<SharedThreadPool> mInitShutdownThread;
|
||||
/* This must be accessed with the graph monitor held. */
|
||||
AutoTArray<StreamAndPromiseForOperation, 1> mPromisesForOperation;
|
||||
/* Used to queue us to add the mixer callback on first run. */
|
||||
@ -570,21 +571,19 @@ public:
|
||||
|
||||
nsresult Dispatch(uint32_t aFlags = NS_DISPATCH_NORMAL)
|
||||
{
|
||||
nsresult rv = EnsureThread();
|
||||
if (!NS_FAILED(rv)) {
|
||||
rv = sThreadPool->Dispatch(this, aFlags);
|
||||
SharedThreadPool* threadPool = mDriver->GetInitShutdownThread();
|
||||
if (!threadPool) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
return rv;
|
||||
return threadPool->Dispatch(this, aFlags);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~AsyncCubebTask();
|
||||
|
||||
private:
|
||||
static nsresult EnsureThread();
|
||||
|
||||
NS_IMETHOD Run() override final;
|
||||
static StaticRefPtr<nsIThreadPool> sThreadPool;
|
||||
|
||||
RefPtr<AudioCallbackDriver> mDriver;
|
||||
AsyncCubebOperation mOperation;
|
||||
RefPtr<MediaStreamGraphImpl> mShutdownGrip;
|
||||
|
@ -1572,6 +1572,15 @@ public:
|
||||
mGraph->mDriver->Shutdown(); // This will wait until it's shutdown since
|
||||
// we'll start tearing down the graph after this
|
||||
|
||||
// Release the driver now so that an AudioCallbackDriver will release its
|
||||
// SharedThreadPool reference. Each SharedThreadPool reference must be
|
||||
// released before SharedThreadPool::SpinUntilEmpty() runs on
|
||||
// xpcom-shutdown-threads. Don't wait for GC/CC to release references to
|
||||
// objects owning streams, or for expiration of mGraph->mShutdownTimer,
|
||||
// which won't otherwise release its reference on the graph until
|
||||
// nsTimerImpl::Shutdown(), which runs after xpcom-shutdown-threads.
|
||||
mGraph->mDriver = nullptr;
|
||||
|
||||
// Safe to access these without the monitor since the graph isn't running.
|
||||
// We may be one of several graphs. Drop ticket to eventually unblock shutdown.
|
||||
if (mGraph->mShutdownTimer && !mGraph->mForceShutdownTicket) {
|
||||
|
@ -464,11 +464,6 @@ public:
|
||||
return mDriver;
|
||||
}
|
||||
|
||||
bool RemoveMixerCallback(MixerCallbackReceiver* aReceiver)
|
||||
{
|
||||
return mMixer.RemoveCallback(aReceiver);
|
||||
}
|
||||
|
||||
/**
|
||||
* Effectively set the new driver, while we are switching.
|
||||
* It is only safe to call this at the very end of an iteration, when there
|
||||
|
@ -2303,7 +2303,7 @@ LayerManager::Dump(std::stringstream& aStream, const char* aPrefix,
|
||||
nsAutoCString pfx(aPrefix);
|
||||
pfx += " ";
|
||||
if (!GetRoot()) {
|
||||
aStream << nsPrintfCString("%s(null)", pfx.get()).get();
|
||||
aStream << nsPrintfCString("%s(null)\n", pfx.get()).get();
|
||||
if (aDumpHtml) {
|
||||
aStream << "</li></ul>";
|
||||
}
|
||||
|
@ -16,8 +16,10 @@
|
||||
#include "mozilla/layers/ScrollingLayersHelper.h"
|
||||
#include "mozilla/layers/StackingContextHelper.h"
|
||||
#include "mozilla/layers/UpdateImageHelper.h"
|
||||
#include "gfxEnv.h"
|
||||
#include "nsDisplayListInvalidation.h"
|
||||
#include "WebRenderCanvasRenderer.h"
|
||||
#include "LayersLogging.h"
|
||||
#include "LayerTreeInvalidation.h"
|
||||
|
||||
namespace mozilla {
|
||||
@ -354,7 +356,7 @@ PaintItemByDrawTarget(nsDisplayItem* aItem,
|
||||
}
|
||||
|
||||
FrameLayerBuilder* layerBuilder = new FrameLayerBuilder();
|
||||
layerBuilder->Init(aDisplayListBuilder, aManager);
|
||||
layerBuilder->Init(aDisplayListBuilder, aManager, nullptr, true);
|
||||
layerBuilder->DidBeginRetainedLayerTransaction(aManager);
|
||||
|
||||
aManager->BeginTransactionWithTarget(context);
|
||||
@ -375,6 +377,15 @@ PaintItemByDrawTarget(nsDisplayItem* aItem,
|
||||
context, aManager);
|
||||
}
|
||||
|
||||
#ifdef MOZ_DUMP_PAINTING
|
||||
if (gfxUtils::DumpDisplayList() || gfxEnv::DumpPaint()) {
|
||||
fprintf_stderr(gfxUtils::sDumpPaintFile, "Basic layer tree for painting contents of display item %s(%p):\n", aItem->Name(), aItem->Frame());
|
||||
std::stringstream stream;
|
||||
aManager->Dump(stream, "", gfxEnv::DumpPaintToFile());
|
||||
fprint_stderr(gfxUtils::sDumpPaintFile, stream); // not a typo, fprint_stderr declared in LayersLogging.h
|
||||
}
|
||||
#endif
|
||||
|
||||
if (aManager->InTransaction()) {
|
||||
aManager->AbortTransaction();
|
||||
}
|
||||
|
@ -506,8 +506,15 @@ AccessibleCaretManager::DragCaret(const nsPoint& aPoint)
|
||||
MOZ_ASSERT(mActiveCaret);
|
||||
MOZ_ASSERT(GetCaretMode() != CaretMode::None);
|
||||
|
||||
nsPoint point(aPoint.x, aPoint.y + mOffsetYToCaretLogicalPosition);
|
||||
DragCaretInternal(point);
|
||||
if (!mPresShell || !mPresShell->GetRootFrame() || !GetSelection()) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
StopSelectionAutoScrollTimer();
|
||||
DragCaretInternal(aPoint);
|
||||
|
||||
// We want to scroll the page even if we failed to drag the caret.
|
||||
StartSelectionAutoScrollTimer(aPoint);
|
||||
UpdateCarets();
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1210,16 +1217,13 @@ AccessibleCaretManager::CompareTreePosition(nsIFrame* aStartFrame,
|
||||
nsresult
|
||||
AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint)
|
||||
{
|
||||
if (!mPresShell) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
MOZ_ASSERT(mPresShell);
|
||||
|
||||
nsIFrame* rootFrame = mPresShell->GetRootFrame();
|
||||
if (!rootFrame) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
MOZ_ASSERT(rootFrame, "We need root frame to compute caret dragging!");
|
||||
|
||||
nsPoint point = AdjustDragBoundary(aPoint);
|
||||
nsPoint point = AdjustDragBoundary(
|
||||
nsPoint(aPoint.x, aPoint.y + mOffsetYToCaretLogicalPosition));
|
||||
|
||||
// Find out which content we point to
|
||||
nsIFrame* ptFrame = nsLayoutUtils::GetFrameForPoint(
|
||||
@ -1230,9 +1234,7 @@ AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint)
|
||||
}
|
||||
|
||||
RefPtr<nsFrameSelection> fs = GetFrameSelection();
|
||||
if (!fs) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
MOZ_ASSERT(fs);
|
||||
|
||||
nsresult result;
|
||||
nsIFrame* newFrame = nullptr;
|
||||
@ -1255,11 +1257,6 @@ AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
Selection* selection = GetSelection();
|
||||
if (!selection) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
|
||||
if (GetCaretMode() == CaretMode::Selection &&
|
||||
!RestrictCaretDraggingOffsets(offsets)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -1267,25 +1264,9 @@ AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint)
|
||||
|
||||
ClearMaintainedSelection();
|
||||
|
||||
nsIFrame* anchorFrame = nullptr;
|
||||
selection->GetPrimaryFrameForAnchorNode(&anchorFrame);
|
||||
|
||||
nsIFrame* scrollable =
|
||||
nsLayoutUtils::GetClosestFrameOfType(anchorFrame, LayoutFrameType::Scroll);
|
||||
AutoWeakFrame weakScrollable = scrollable;
|
||||
fs->HandleClick(offsets.content, offsets.StartOffset(), offsets.EndOffset(),
|
||||
GetCaretMode() == CaretMode::Selection, false,
|
||||
offsets.associate);
|
||||
if (!weakScrollable.IsAlive()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Scroll scrolled frame.
|
||||
nsIScrollableFrame* saf = do_QueryFrame(scrollable);
|
||||
nsIFrame* capturingFrame = saf->GetScrolledFrame();
|
||||
nsPoint ptInScrolled = point;
|
||||
nsLayoutUtils::TransformPoint(rootFrame, capturingFrame, ptInScrolled);
|
||||
fs->StartAutoScrollTimer(capturingFrame, ptInScrolled, kAutoScrollTimerDelay);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -1379,6 +1360,51 @@ AccessibleCaretManager::AdjustDragBoundary(const nsPoint& aPoint) const
|
||||
return adjustedPoint;
|
||||
}
|
||||
|
||||
void
|
||||
AccessibleCaretManager::StartSelectionAutoScrollTimer(
|
||||
const nsPoint& aPoint) const
|
||||
{
|
||||
Selection* selection = GetSelection();
|
||||
MOZ_ASSERT(selection);
|
||||
|
||||
nsIFrame* anchorFrame = nullptr;
|
||||
selection->GetPrimaryFrameForAnchorNode(&anchorFrame);
|
||||
if (!anchorFrame) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsIScrollableFrame* scrollFrame =
|
||||
nsLayoutUtils::GetNearestScrollableFrame(
|
||||
anchorFrame,
|
||||
nsLayoutUtils::SCROLLABLE_SAME_DOC |
|
||||
nsLayoutUtils::SCROLLABLE_INCLUDE_HIDDEN);
|
||||
if (!scrollFrame) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsIFrame* capturingFrame = scrollFrame->GetScrolledFrame();
|
||||
if (!capturingFrame) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsIFrame* rootFrame = mPresShell->GetRootFrame();
|
||||
MOZ_ASSERT(rootFrame);
|
||||
nsPoint ptInScrolled = aPoint;
|
||||
nsLayoutUtils::TransformPoint(rootFrame, capturingFrame, ptInScrolled);
|
||||
|
||||
RefPtr<nsFrameSelection> fs = GetFrameSelection();
|
||||
MOZ_ASSERT(fs);
|
||||
fs->StartAutoScrollTimer(capturingFrame, ptInScrolled, kAutoScrollTimerDelay);
|
||||
}
|
||||
|
||||
void
|
||||
AccessibleCaretManager::StopSelectionAutoScrollTimer() const
|
||||
{
|
||||
RefPtr<nsFrameSelection> fs = GetFrameSelection();
|
||||
MOZ_ASSERT(fs);
|
||||
fs->StopAutoScrollTimer();
|
||||
}
|
||||
|
||||
void
|
||||
AccessibleCaretManager::DispatchCaretStateChangedEvent(CaretChangedReason aReason) const
|
||||
{
|
||||
|
@ -191,6 +191,12 @@ protected:
|
||||
|
||||
nsresult DragCaretInternal(const nsPoint& aPoint);
|
||||
nsPoint AdjustDragBoundary(const nsPoint& aPoint) const;
|
||||
|
||||
// Start the selection scroll timer if the caret is being dragged out of
|
||||
// the scroll port.
|
||||
void StartSelectionAutoScrollTimer(const nsPoint& aPoint) const;
|
||||
void StopSelectionAutoScrollTimer() const;
|
||||
|
||||
void ClearMaintainedSelection() const;
|
||||
|
||||
// Caller is responsible to use IsTerminated() to check whether PresShell is
|
||||
|
@ -2253,16 +2253,29 @@ nsPresContext::HasAuthorSpecifiedRules(const nsIFrame* aFrame,
|
||||
}
|
||||
Element* elem = aFrame->GetContent()->AsElement();
|
||||
|
||||
MOZ_ASSERT(elem->GetPseudoElementType() ==
|
||||
aFrame->StyleContext()->GetPseudoType());
|
||||
if (elem->HasServoData()) {
|
||||
return Servo_HasAuthorSpecifiedRules(elem,
|
||||
aRuleTypeMask,
|
||||
UseDocumentColors());
|
||||
} else {
|
||||
// We need to handle non-generated content pseudos too, so we use
|
||||
// the parent of generated content pseudo to be consistent.
|
||||
if (elem->GetPseudoElementType() != CSSPseudoElementType::NotPseudo) {
|
||||
MOZ_ASSERT(elem->GetParent(), "Pseudo element has no parent element?");
|
||||
elem = elem->GetParent()->AsElement();
|
||||
}
|
||||
if (MOZ_UNLIKELY(!elem->HasServoData())) {
|
||||
// Probably shouldn't happen, but does. See bug 1387953
|
||||
return false;
|
||||
}
|
||||
|
||||
nsStyleContext* styleContext = aFrame->StyleContext();
|
||||
CSSPseudoElementType pseudoType = styleContext->GetPseudoType();
|
||||
// Anonymous boxes are more complicated, and we just assume that they
|
||||
// cannot have any author-specified rules here.
|
||||
if (pseudoType == CSSPseudoElementType::InheritingAnonBox ||
|
||||
pseudoType == CSSPseudoElementType::NonInheritingAnonBox) {
|
||||
return false;
|
||||
}
|
||||
return Servo_HasAuthorSpecifiedRules(styleContext->AsServo(),
|
||||
elem, pseudoType,
|
||||
aRuleTypeMask,
|
||||
UseDocumentColors());
|
||||
}
|
||||
|
||||
gfxUserFontSet*
|
||||
|
@ -123,6 +123,7 @@ FrameLayerBuilder::FrameLayerBuilder()
|
||||
, mDetectedDOMModification(false)
|
||||
, mInvalidateAllLayers(false)
|
||||
, mInLayerTreeCompressionMode(false)
|
||||
, mIsInactiveLayerManager(false)
|
||||
, mContainerLayerGeneration(0)
|
||||
, mMaxContainerLayerGeneration(0)
|
||||
{
|
||||
@ -1797,6 +1798,7 @@ FrameLayerBuilder::Shutdown()
|
||||
void
|
||||
FrameLayerBuilder::Init(nsDisplayListBuilder* aBuilder, LayerManager* aManager,
|
||||
PaintedLayerData* aLayerData,
|
||||
bool aIsInactiveLayerManager,
|
||||
const DisplayItemClip* aInactiveLayerClip)
|
||||
{
|
||||
mDisplayListBuilder = aBuilder;
|
||||
@ -1805,6 +1807,7 @@ FrameLayerBuilder::Init(nsDisplayListBuilder* aBuilder, LayerManager* aManager,
|
||||
mInitialDOMGeneration = mRootPresContext->GetDOMGeneration();
|
||||
}
|
||||
mContainingPaintedLayer = aLayerData;
|
||||
mIsInactiveLayerManager = aIsInactiveLayerManager;
|
||||
mInactiveLayerClip = aInactiveLayerClip;
|
||||
aManager->SetUserData(&gLayerManagerLayerBuilder, this);
|
||||
}
|
||||
@ -4710,7 +4713,8 @@ FrameLayerBuilder::AddPaintedDisplayItem(PaintedLayerData* aLayerData,
|
||||
if (tempManager) {
|
||||
FLB_LOG_PAINTED_LAYER_DECISION(aLayerData, "Creating nested FLB for item %p\n", aItem);
|
||||
FrameLayerBuilder* layerBuilder = new FrameLayerBuilder();
|
||||
layerBuilder->Init(mDisplayListBuilder, tempManager, aLayerData, &aClip);
|
||||
layerBuilder->Init(mDisplayListBuilder, tempManager, aLayerData, true,
|
||||
&aClip);
|
||||
|
||||
tempManager->BeginTransaction();
|
||||
if (mRetainingManager) {
|
||||
|
@ -340,6 +340,7 @@ public:
|
||||
|
||||
void Init(nsDisplayListBuilder* aBuilder, LayerManager* aManager,
|
||||
PaintedLayerData* aLayerData = nullptr,
|
||||
bool aIsInactiveLayerManager = false,
|
||||
const DisplayItemClip* aInactiveLayerClip = nullptr);
|
||||
|
||||
/**
|
||||
@ -730,7 +731,7 @@ public:
|
||||
|
||||
bool IsBuildingRetainedLayers()
|
||||
{
|
||||
return !mContainingPaintedLayer && mRetainingManager;
|
||||
return !mIsInactiveLayerManager && mRetainingManager;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -799,6 +800,8 @@ protected:
|
||||
|
||||
bool mInLayerTreeCompressionMode;
|
||||
|
||||
bool mIsInactiveLayerManager;
|
||||
|
||||
uint32_t mContainerLayerGeneration;
|
||||
uint32_t mMaxContainerLayerGeneration;
|
||||
};
|
||||
|
@ -5438,6 +5438,10 @@ nsDisplayBoxShadowOuter::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder
|
||||
|
||||
for (uint32_t j = shadows->Length(); j > 0; j--) {
|
||||
nsCSSShadowItem* shadow = shadows->ShadowAt(j - 1);
|
||||
if (shadow->mInset) {
|
||||
continue;
|
||||
}
|
||||
|
||||
float blurRadius = float(shadow->mRadius) / float(appUnitsPerDevPixel);
|
||||
gfx::Color shadowColor = nsCSSRendering::GetShadowColor(shadow,
|
||||
mFrame,
|
||||
|
26
layout/reftests/box-shadow/boxshadow-mixed-2-ref.html
Normal file
26
layout/reftests/box-shadow/boxshadow-mixed-2-ref.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>Reference, bug 1402060</title>
|
||||
<style>
|
||||
|
||||
.blackAtTop {
|
||||
width: 100px;
|
||||
height: 90px;
|
||||
border-top: 10px solid black;
|
||||
}
|
||||
|
||||
.blue {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background: blue;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.white {
|
||||
width: 90px;
|
||||
height: 90px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="blackAtTop"><div class="blue"><div class="white"></div></div></div>
|
13
layout/reftests/box-shadow/boxshadow-mixed-2.html
Normal file
13
layout/reftests/box-shadow/boxshadow-mixed-2.html
Normal file
@ -0,0 +1,13 @@
|
||||
<!DOCTYPE HTML>
|
||||
<title>Testcase, bug 1402060</title>
|
||||
<style>
|
||||
|
||||
div {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
box-shadow: inset 0 10px black, 10px 10px blue;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div></div>
|
@ -16,6 +16,7 @@ fuzzy-if(OSX==1010,1,24) fuzzy-if(d2d,16,908) fuzzy-if(webrender,18,2160) == box
|
||||
fails-if(Android) == boxshadow-fileupload.html boxshadow-fileupload-ref.html
|
||||
fuzzy-if(skiaContent,13,28) fuzzy-if(webrender,29-29,453-453) == boxshadow-inner-basic.html boxshadow-inner-basic-ref.svg
|
||||
random-if(layersGPUAccelerated) == boxshadow-mixed.html boxshadow-mixed-ref.html
|
||||
== boxshadow-mixed-2.html boxshadow-mixed-2-ref.html
|
||||
random-if(d2d) fuzzy-if(skiaContent,1,100) fuzzy-if(webrender,127,3528) == boxshadow-rounded-spread.html boxshadow-rounded-spread-ref.html
|
||||
fuzzy-if(skiaContent,1,50) HTTP(..) == boxshadow-dynamic.xul boxshadow-dynamic-ref.xul
|
||||
random-if(d2d) fails-if(webrender) == boxshadow-onecorner.html boxshadow-onecorner-ref.html
|
||||
|
23
layout/reftests/bugs/1406183-1-ref.html
Normal file
23
layout/reftests/bugs/1406183-1-ref.html
Normal file
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Reference for bug 1406183: ImageLayer inside inactive BasicLayerManager for fallback nsDisplayFilter is drawn at the wrong position</title>
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.outer {
|
||||
margin-left: 100px;
|
||||
margin-top: 50px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="outer">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAFklEQVQImWMwjWhCQwxECoW3oCHihAB0LyYv5/oAHwAAAABJRU5ErkJggg==">
|
||||
</div>
|
30
layout/reftests/bugs/1406183-1.html
Normal file
30
layout/reftests/bugs/1406183-1.html
Normal file
@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Testcase for bug 1406183: ImageLayer inside inactive BasicLayerManager for fallback nsDisplayFilter is drawn at the wrong position</title>
|
||||
|
||||
<style>
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.outer {
|
||||
margin-left: 100px;
|
||||
margin-top: 50px;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.filter {
|
||||
height: 200px;
|
||||
filter: hue-rotate(0deg);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div class="outer">
|
||||
<div class="filter">
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAGCAIAAABvrngfAAAAFklEQVQImWMwjWhCQwxECoW3oCHihAB0LyYv5/oAHwAAAABJRU5ErkJggg==">
|
||||
</div>
|
||||
</div>
|
@ -2045,3 +2045,4 @@ needs-focus != 1377447-1.html 1377447-2.html
|
||||
== 1405878-1.xml 1405878-1-ref.xml
|
||||
== 1404057.html 1404057-ref.html
|
||||
!= 1404057.html 1404057-noref.html
|
||||
== 1406183-1.html 1406183-1-ref.html
|
||||
|
@ -587,7 +587,9 @@ SERVO_BINDING_FUNC(Servo_SetExplicitStyle, void,
|
||||
RawGeckoElementBorrowed element,
|
||||
ServoStyleContextBorrowed primary_style)
|
||||
SERVO_BINDING_FUNC(Servo_HasAuthorSpecifiedRules, bool,
|
||||
ServoStyleContextBorrowed style,
|
||||
RawGeckoElementBorrowed element,
|
||||
mozilla::CSSPseudoElementType pseudo_type,
|
||||
uint32_t rule_type_mask,
|
||||
bool author_colors_allowed)
|
||||
|
||||
|
@ -2841,3 +2841,15 @@ Gecko_AddBufferToCrashReport(const void* addr, size_t len)
|
||||
cr->RegisterAppMemory((uint64_t) addr, len);
|
||||
#endif
|
||||
}
|
||||
|
||||
void Gecko_AnnotateCrashReport(const char* key_str, const char* value_str)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsDependentCString key(key_str);
|
||||
nsDependentCString value(value_str);
|
||||
#ifdef MOZ_CRASHREPORTER
|
||||
nsCOMPtr<nsICrashReporter> cr = do_GetService("@mozilla.org/toolkit/crash-reporter;1");
|
||||
NS_ENSURE_TRUE_VOID(cr);
|
||||
cr->AnnotateCrashReport(key, value);
|
||||
#endif
|
||||
}
|
||||
|
@ -681,6 +681,7 @@ bool Gecko_DocumentRule_UseForPresentation(RawGeckoPresContextBorrowed,
|
||||
void Gecko_SetJemallocThreadLocalArena(bool enabled);
|
||||
|
||||
void Gecko_AddBufferToCrashReport(const void* addr, size_t len);
|
||||
void Gecko_AnnotateCrashReport(const char* key_str, const char* value_str);
|
||||
|
||||
// Pseudo-element flags.
|
||||
#define CSS_PSEUDO_ELEMENT(name_, value_, flags_) \
|
||||
|
@ -344,7 +344,7 @@ ServoStyleSet::ResolveStyleFor(Element* aElement,
|
||||
if (aMayCompute == LazyComputeBehavior::Allow) {
|
||||
PreTraverseSync();
|
||||
return ResolveStyleLazilyInternal(
|
||||
aElement, CSSPseudoElementType::NotPseudo, nullptr);
|
||||
aElement, CSSPseudoElementType::NotPseudo);
|
||||
}
|
||||
|
||||
return ResolveServoStyle(aElement);
|
||||
@ -600,7 +600,6 @@ ServoStyleSet::ResolvePseudoElementStyle(Element* aOriginatingElement,
|
||||
already_AddRefed<ServoStyleContext>
|
||||
ServoStyleSet::ResolveStyleLazily(Element* aElement,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
nsAtom* aPseudoTag,
|
||||
StyleRuleInclusion aRuleInclusion)
|
||||
{
|
||||
// Lazy style computation avoids storing any new data in the tree.
|
||||
@ -622,7 +621,7 @@ ServoStyleSet::ResolveStyleLazily(Element* aElement,
|
||||
|
||||
AutoClearStaleData guard(aElement);
|
||||
PreTraverseSync();
|
||||
return ResolveStyleLazilyInternal(aElement, aPseudoType, aPseudoTag,
|
||||
return ResolveStyleLazilyInternal(aElement, aPseudoType,
|
||||
aRuleInclusion,
|
||||
ignoreExistingStyles);
|
||||
}
|
||||
@ -986,10 +985,12 @@ ServoStyleSet::StyleDocument(ServoTraversalFlags aFlags)
|
||||
// If any style invalidation was triggered in our siblings, then we may
|
||||
// need to post-traverse them, even if the root wasn't restyled after
|
||||
// all.
|
||||
uint32_t existingBits = doc->GetServoRestyleRootDirtyBits();
|
||||
// We need to propagate the existing bits to the parent.
|
||||
parent->SetFlags(existingBits);
|
||||
doc->SetServoRestyleRoot(
|
||||
parent,
|
||||
doc->GetServoRestyleRootDirtyBits() |
|
||||
ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
|
||||
existingBits | ELEMENT_HAS_DIRTY_DESCENDANTS_FOR_SERVO);
|
||||
postTraversalRequired = true;
|
||||
}
|
||||
}
|
||||
@ -1220,7 +1221,6 @@ already_AddRefed<ServoStyleContext>
|
||||
ServoStyleSet::GetBaseContextForElement(
|
||||
Element* aElement,
|
||||
nsPresContext* aPresContext,
|
||||
nsAtom* aPseudoTag,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
const ServoStyleContext* aStyle)
|
||||
{
|
||||
@ -1334,7 +1334,6 @@ ServoStyleSet::ClearNonInheritingStyleContexts()
|
||||
already_AddRefed<ServoStyleContext>
|
||||
ServoStyleSet::ResolveStyleLazilyInternal(Element* aElement,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
nsAtom* aPseudoTag,
|
||||
StyleRuleInclusion aRuleInclusion,
|
||||
bool aIgnoreExistingStyles)
|
||||
{
|
||||
|
@ -219,11 +219,10 @@ public:
|
||||
// Resolves style for a (possibly-pseudo) Element without assuming that the
|
||||
// style has been resolved. If the element was unstyled and a new style
|
||||
// context was resolved, it is not stored in the DOM. (That is, the element
|
||||
// remains unstyled.) |aPeudoTag| and |aPseudoType| must match.
|
||||
// remains unstyled.)
|
||||
already_AddRefed<ServoStyleContext>
|
||||
ResolveStyleLazily(dom::Element* aElement,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
nsAtom* aPseudoTag,
|
||||
StyleRuleInclusion aRules =
|
||||
StyleRuleInclusion::All);
|
||||
|
||||
@ -390,7 +389,6 @@ public:
|
||||
already_AddRefed<ServoStyleContext>
|
||||
GetBaseContextForElement(dom::Element* aElement,
|
||||
nsPresContext* aPresContext,
|
||||
nsAtom* aPseudoTag,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
const ServoStyleContext* aStyle);
|
||||
|
||||
@ -558,7 +556,6 @@ private:
|
||||
already_AddRefed<ServoStyleContext>
|
||||
ResolveStyleLazilyInternal(dom::Element* aElement,
|
||||
CSSPseudoElementType aPseudoType,
|
||||
nsAtom* aPseudoTag,
|
||||
StyleRuleInclusion aRules =
|
||||
StyleRuleInclusion::All,
|
||||
bool aIgnoreExistingStyles = false);
|
||||
|
7
layout/style/crashtests/1401825.html
Normal file
7
layout/style/crashtests/1401825.html
Normal file
@ -0,0 +1,7 @@
|
||||
<!DOCTYPE html>
|
||||
<style>
|
||||
::-moz-list-bullet {
|
||||
-moz-appearance: button;
|
||||
}
|
||||
</style>
|
||||
<li></li>
|
@ -230,6 +230,7 @@ load 1401256.html
|
||||
load 1401692.html
|
||||
load 1401706.html
|
||||
load 1401801.html
|
||||
load 1401825.html
|
||||
load 1402218-1.html
|
||||
load 1402366.html
|
||||
load 1402419.html
|
||||
|
@ -715,7 +715,7 @@ nsComputedDOMStyle::DoGetStyleContextNoFlush(Element* aElement,
|
||||
} else {
|
||||
return presContext->StyleSet()->AsServo()->
|
||||
GetBaseContextForElement(aElement, presContext,
|
||||
aPseudo, pseudoType, result->AsServo());
|
||||
pseudoType, result->AsServo());
|
||||
}
|
||||
}
|
||||
|
||||
@ -742,13 +742,13 @@ nsComputedDOMStyle::DoGetStyleContextNoFlush(Element* aElement,
|
||||
? StyleRuleInclusion::DefaultOnly
|
||||
: StyleRuleInclusion::All;
|
||||
RefPtr<ServoStyleContext> result =
|
||||
servoSet->ResolveStyleLazily(aElement, pseudoType, aPseudo, rules);
|
||||
servoSet->ResolveStyleLazily(aElement, pseudoType, rules);
|
||||
if (aAnimationFlag == eWithAnimation) {
|
||||
return result.forget();
|
||||
}
|
||||
|
||||
return servoSet->GetBaseContextForElement(aElement, presContext,
|
||||
aPseudo, pseudoType, result);
|
||||
pseudoType, result);
|
||||
}
|
||||
|
||||
RefPtr<GeckoStyleContext> parentContext;
|
||||
|
@ -507,17 +507,12 @@ static size_t recycled_size;
|
||||
*/
|
||||
#if defined(XP_WIN)
|
||||
#define malloc_mutex_t CRITICAL_SECTION
|
||||
#define malloc_spinlock_t CRITICAL_SECTION
|
||||
#elif defined(XP_DARWIN)
|
||||
struct malloc_mutex_t {
|
||||
OSSpinLock lock;
|
||||
};
|
||||
struct malloc_spinlock_t {
|
||||
OSSpinLock lock;
|
||||
};
|
||||
#else
|
||||
typedef pthread_mutex_t malloc_mutex_t;
|
||||
typedef pthread_mutex_t malloc_spinlock_t;
|
||||
#endif
|
||||
|
||||
/* Set to true once the allocator has been initialized. */
|
||||
@ -673,7 +668,7 @@ class AddressRadixTree {
|
||||
static_assert(kBitsAtLevel1 + (kHeight - 1) * kBitsPerLevel == Bits,
|
||||
"AddressRadixTree parameters don't work out");
|
||||
|
||||
malloc_spinlock_t mLock;
|
||||
malloc_mutex_t mLock;
|
||||
void** mRoot;
|
||||
|
||||
public:
|
||||
@ -930,7 +925,7 @@ struct arena_t {
|
||||
RedBlackTreeNode<arena_t> mLink;
|
||||
|
||||
/* All operations on this arena require that lock be locked. */
|
||||
malloc_spinlock_t mLock;
|
||||
malloc_mutex_t mLock;
|
||||
|
||||
arena_stats_t mStats;
|
||||
|
||||
@ -1124,7 +1119,7 @@ static size_t base_committed;
|
||||
// the type being defined anymore.
|
||||
static RedBlackTree<arena_t, ArenaTreeTrait> gArenaTree;
|
||||
static unsigned narenas;
|
||||
static malloc_spinlock_t arenas_lock; /* Protects arenas initialization. */
|
||||
static malloc_mutex_t arenas_lock; /* Protects arenas initialization. */
|
||||
|
||||
/*
|
||||
* The arena associated with the current thread (per jemalloc_thread_local_arena)
|
||||
@ -1301,79 +1296,10 @@ malloc_mutex_unlock(malloc_mutex_t *mutex)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (defined(__GNUC__))
|
||||
__attribute__((unused))
|
||||
# endif
|
||||
static bool
|
||||
malloc_spin_init(malloc_spinlock_t *lock)
|
||||
{
|
||||
#if defined(XP_WIN)
|
||||
if (!InitializeCriticalSectionAndSpinCount(lock, _CRT_SPINCOUNT))
|
||||
return (true);
|
||||
#elif defined(XP_DARWIN)
|
||||
lock->lock = OS_SPINLOCK_INIT;
|
||||
#elif defined(XP_LINUX) && !defined(ANDROID)
|
||||
pthread_mutexattr_t attr;
|
||||
if (pthread_mutexattr_init(&attr) != 0)
|
||||
return (true);
|
||||
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
|
||||
if (pthread_mutex_init(lock, &attr) != 0) {
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
return (true);
|
||||
}
|
||||
pthread_mutexattr_destroy(&attr);
|
||||
#else
|
||||
if (pthread_mutex_init(lock, nullptr) != 0)
|
||||
return (true);
|
||||
#endif
|
||||
return (false);
|
||||
}
|
||||
|
||||
static inline void
|
||||
malloc_spin_lock(malloc_spinlock_t *lock)
|
||||
{
|
||||
|
||||
#if defined(XP_WIN)
|
||||
EnterCriticalSection(lock);
|
||||
#elif defined(XP_DARWIN)
|
||||
OSSpinLockLock(&lock->lock);
|
||||
#else
|
||||
pthread_mutex_lock(lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
malloc_spin_unlock(malloc_spinlock_t *lock)
|
||||
{
|
||||
#if defined(XP_WIN)
|
||||
LeaveCriticalSection(lock);
|
||||
#elif defined(XP_DARWIN)
|
||||
OSSpinLockUnlock(&lock->lock);
|
||||
#else
|
||||
pthread_mutex_unlock(lock);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* End mutex.
|
||||
*/
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* Begin spin lock. Spin locks here are actually adaptive mutexes that block
|
||||
* after a period of spinning, because unbounded spinning would allow for
|
||||
* priority inversion.
|
||||
*/
|
||||
|
||||
#if !defined(XP_DARWIN)
|
||||
# define malloc_spin_init malloc_mutex_init
|
||||
# define malloc_spin_lock malloc_mutex_lock
|
||||
# define malloc_spin_unlock malloc_mutex_unlock
|
||||
#endif
|
||||
|
||||
/*
|
||||
* End spin lock.
|
||||
*/
|
||||
/******************************************************************************/
|
||||
/*
|
||||
* Begin Utility functions/macros.
|
||||
*/
|
||||
@ -1753,7 +1679,7 @@ template <size_t Bits>
|
||||
bool
|
||||
AddressRadixTree<Bits>::Init()
|
||||
{
|
||||
malloc_spin_init(&mLock);
|
||||
malloc_mutex_init(&mLock);
|
||||
|
||||
mRoot = (void**)base_calloc(1 << kBitsAtLevel1, sizeof(void*));
|
||||
return mRoot;
|
||||
@ -1807,7 +1733,7 @@ AddressRadixTree<Bits>::Get(void* aKey)
|
||||
ret = *slot;
|
||||
}
|
||||
#ifdef MOZ_DEBUG
|
||||
malloc_spin_lock(&mlock);
|
||||
malloc_mutex_lock(&mlock);
|
||||
/*
|
||||
* Suppose that it were possible for a jemalloc-allocated chunk to be
|
||||
* munmap()ped, followed by a different allocator in another thread re-using
|
||||
@ -1822,13 +1748,13 @@ AddressRadixTree<Bits>::Get(void* aKey)
|
||||
slot = GetSlot(aKey);
|
||||
}
|
||||
if (slot) {
|
||||
// The malloc_spin_lock call above should act as a memory barrier, forcing
|
||||
// The malloc_mutex_lock call above should act as a memory barrier, forcing
|
||||
// the compiler to emit a new read instruction for *slot.
|
||||
MOZ_ASSERT(ret == *slot);
|
||||
} else {
|
||||
MOZ_ASSERT(ret == nullptr);
|
||||
}
|
||||
malloc_spin_unlock(&mlock);
|
||||
malloc_mutex_unlock(&mlock);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
@ -1837,12 +1763,12 @@ template <size_t Bits>
|
||||
bool
|
||||
AddressRadixTree<Bits>::Set(void* aKey, void* aValue)
|
||||
{
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
void** slot = GetSlot(aKey, /* create */ true);
|
||||
if (slot) {
|
||||
*slot = aValue;
|
||||
}
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
return slot;
|
||||
}
|
||||
|
||||
@ -3194,7 +3120,7 @@ arena_t::MallocSmall(size_t aSize, bool aZero)
|
||||
}
|
||||
MOZ_DIAGNOSTIC_ASSERT(aSize == bin->reg_size);
|
||||
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
if ((run = bin->runcur) && run->nfree > 0) {
|
||||
ret = MallocBinEasy(bin, run);
|
||||
} else {
|
||||
@ -3202,12 +3128,12 @@ arena_t::MallocSmall(size_t aSize, bool aZero)
|
||||
}
|
||||
|
||||
if (!ret) {
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
mStats.allocated_small += aSize;
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
|
||||
if (aZero == false) {
|
||||
if (opt_junk) {
|
||||
@ -3228,14 +3154,14 @@ arena_t::MallocLarge(size_t aSize, bool aZero)
|
||||
|
||||
/* Large allocation. */
|
||||
aSize = PAGE_CEILING(aSize);
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
ret = AllocRun(nullptr, aSize, true, aZero);
|
||||
if (!ret) {
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
return nullptr;
|
||||
}
|
||||
mStats.allocated_large += aSize;
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
|
||||
if (aZero == false) {
|
||||
if (opt_junk) {
|
||||
@ -3282,10 +3208,10 @@ arena_t::Palloc(size_t aAlignment, size_t aSize, size_t aAllocSize)
|
||||
MOZ_ASSERT((aSize & pagesize_mask) == 0);
|
||||
MOZ_ASSERT((aAlignment & pagesize_mask) == 0);
|
||||
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
ret = AllocRun(nullptr, aAllocSize, true, false);
|
||||
if (!ret) {
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -3314,7 +3240,7 @@ arena_t::Palloc(size_t aAlignment, size_t aSize, size_t aAllocSize)
|
||||
}
|
||||
|
||||
mStats.allocated_large += aSize;
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
|
||||
if (opt_junk) {
|
||||
memset(ret, kAllocJunk, aSize);
|
||||
@ -3755,7 +3681,7 @@ arena_dalloc(void *ptr, size_t offset)
|
||||
MOZ_ASSERT(arena);
|
||||
MOZ_DIAGNOSTIC_ASSERT(arena->mMagic == ARENA_MAGIC);
|
||||
|
||||
malloc_spin_lock(&arena->mLock);
|
||||
malloc_mutex_lock(&arena->mLock);
|
||||
pageind = offset >> pagesize_2pow;
|
||||
mapelm = &chunk->map[pageind];
|
||||
MOZ_DIAGNOSTIC_ASSERT((mapelm->bits & CHUNK_MAP_ALLOCATED) != 0);
|
||||
@ -3766,7 +3692,7 @@ arena_dalloc(void *ptr, size_t offset)
|
||||
/* Large allocation. */
|
||||
arena->DallocLarge(chunk, ptr);
|
||||
}
|
||||
malloc_spin_unlock(&arena->mLock);
|
||||
malloc_mutex_unlock(&arena->mLock);
|
||||
}
|
||||
|
||||
static inline void
|
||||
@ -3793,10 +3719,10 @@ arena_t::RallocShrinkLarge(arena_chunk_t* aChunk, void* aPtr, size_t aSize,
|
||||
* Shrink the run, and make trailing pages available for other
|
||||
* allocations.
|
||||
*/
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
TrimRunTail(aChunk, (arena_run_t*)aPtr, aOldSize, aSize, true);
|
||||
mStats.allocated_large -= aOldSize - aSize;
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -3806,7 +3732,7 @@ arena_t::RallocGrowLarge(arena_chunk_t* aChunk, void* aPtr, size_t aSize,
|
||||
size_t pageind = (uintptr_t(aPtr) - uintptr_t(aChunk)) >> pagesize_2pow;
|
||||
size_t npages = aOldSize >> pagesize_2pow;
|
||||
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
MOZ_DIAGNOSTIC_ASSERT(aOldSize == (aChunk->map[pageind].bits & ~pagesize_mask));
|
||||
|
||||
/* Try to extend the run. */
|
||||
@ -3829,10 +3755,10 @@ arena_t::RallocGrowLarge(arena_chunk_t* aChunk, void* aPtr, size_t aSize,
|
||||
CHUNK_MAP_ALLOCATED;
|
||||
|
||||
mStats.allocated_large += aSize - aOldSize;
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
return false;
|
||||
}
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -3963,7 +3889,7 @@ arena_t::Init()
|
||||
arena_bin_t* bin;
|
||||
size_t prev_run_size;
|
||||
|
||||
if (malloc_spin_init(&mLock))
|
||||
if (malloc_mutex_init(&mLock))
|
||||
return true;
|
||||
|
||||
memset(&mLink, 0, sizeof(mLink));
|
||||
@ -4062,13 +3988,13 @@ arenas_extend()
|
||||
return arenas_fallback();
|
||||
}
|
||||
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
|
||||
// TODO: Use random Ids.
|
||||
ret->mId = narenas++;
|
||||
gArenaTree.Insert(ret);
|
||||
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -4473,7 +4399,7 @@ MALLOC_OUT:
|
||||
base_nodes = nullptr;
|
||||
malloc_mutex_init(&base_mtx);
|
||||
|
||||
malloc_spin_init(&arenas_lock);
|
||||
malloc_mutex_init(&arenas_lock);
|
||||
|
||||
/*
|
||||
* Initialize one arena here.
|
||||
@ -4838,7 +4764,7 @@ MozJemalloc::jemalloc_stats(jemalloc_stats_t* aStats)
|
||||
MOZ_ASSERT(base_mapped >= base_committed);
|
||||
malloc_mutex_unlock(&base_mtx);
|
||||
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
/* Iterate over arenas. */
|
||||
for (auto arena : gArenaTree.iter()) {
|
||||
size_t arena_mapped, arena_allocated, arena_committed, arena_dirty, j,
|
||||
@ -4852,7 +4778,7 @@ MozJemalloc::jemalloc_stats(jemalloc_stats_t* aStats)
|
||||
arena_headers = 0;
|
||||
arena_unused = 0;
|
||||
|
||||
malloc_spin_lock(&arena->mLock);
|
||||
malloc_mutex_lock(&arena->mLock);
|
||||
|
||||
arena_mapped = arena->mStats.mapped;
|
||||
|
||||
@ -4881,7 +4807,7 @@ MozJemalloc::jemalloc_stats(jemalloc_stats_t* aStats)
|
||||
arena_headers += bin->stats.curruns * bin->reg0_offset;
|
||||
}
|
||||
|
||||
malloc_spin_unlock(&arena->mLock);
|
||||
malloc_mutex_unlock(&arena->mLock);
|
||||
|
||||
MOZ_ASSERT(arena_mapped >= arena_committed);
|
||||
MOZ_ASSERT(arena_committed >= arena_allocated + arena_dirty);
|
||||
@ -4896,7 +4822,7 @@ MozJemalloc::jemalloc_stats(jemalloc_stats_t* aStats)
|
||||
aStats->bin_unused += arena_unused;
|
||||
aStats->bookkeeping += arena_headers;
|
||||
}
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
|
||||
/* Account for arena chunk headers in bookkeeping rather than waste. */
|
||||
chunk_header_size =
|
||||
@ -4946,24 +4872,24 @@ hard_purge_chunk(arena_chunk_t *chunk)
|
||||
void
|
||||
arena_t::HardPurge()
|
||||
{
|
||||
malloc_spin_lock(&mLock);
|
||||
malloc_mutex_lock(&mLock);
|
||||
|
||||
while (!mChunksMAdvised.isEmpty()) {
|
||||
arena_chunk_t* chunk = mChunksMAdvised.popFront();
|
||||
hard_purge_chunk(chunk);
|
||||
}
|
||||
|
||||
malloc_spin_unlock(&mLock);
|
||||
malloc_mutex_unlock(&mLock);
|
||||
}
|
||||
|
||||
template<> inline void
|
||||
MozJemalloc::jemalloc_purge_freed_pages()
|
||||
{
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
for (auto arena : gArenaTree.iter()) {
|
||||
arena->HardPurge();
|
||||
}
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
}
|
||||
|
||||
#else /* !defined MALLOC_DOUBLE_PURGE */
|
||||
@ -4980,13 +4906,13 @@ MozJemalloc::jemalloc_purge_freed_pages()
|
||||
template<> inline void
|
||||
MozJemalloc::jemalloc_free_dirty_pages(void)
|
||||
{
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
for (auto arena : gArenaTree.iter()) {
|
||||
malloc_spin_lock(&arena->mLock);
|
||||
malloc_mutex_lock(&arena->mLock);
|
||||
arena->Purge(true);
|
||||
malloc_spin_unlock(&arena->mLock);
|
||||
malloc_mutex_unlock(&arena->mLock);
|
||||
}
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
}
|
||||
|
||||
inline arena_t*
|
||||
@ -4994,9 +4920,9 @@ arena_t::GetById(arena_id_t aArenaId)
|
||||
{
|
||||
arena_t key;
|
||||
key.mId = aArenaId;
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
arena_t* result = gArenaTree.Search(&key);
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
MOZ_RELEASE_ASSERT(result);
|
||||
return result;
|
||||
}
|
||||
@ -5013,12 +4939,12 @@ template<> inline void
|
||||
MozJemalloc::moz_dispose_arena(arena_id_t aArenaId)
|
||||
{
|
||||
arena_t* arena = arena_t::GetById(aArenaId);
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
gArenaTree.Remove(arena);
|
||||
// The arena is leaked, and remaining allocations in it still are alive
|
||||
// until they are freed. After that, the arena will be empty but still
|
||||
// taking have at least a chunk taking address space. TODO: bug 1364359.
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
}
|
||||
|
||||
#define MALLOC_DECL(name, return_type, ...) \
|
||||
@ -5063,10 +4989,10 @@ _malloc_prefork(void)
|
||||
{
|
||||
/* Acquire all mutexes in a safe order. */
|
||||
|
||||
malloc_spin_lock(&arenas_lock);
|
||||
malloc_mutex_lock(&arenas_lock);
|
||||
|
||||
for (auto arena : gArenaTree.iter()) {
|
||||
malloc_spin_lock(&arena->mLock);
|
||||
malloc_mutex_lock(&arena->mLock);
|
||||
}
|
||||
|
||||
malloc_mutex_lock(&base_mtx);
|
||||
@ -5087,9 +5013,9 @@ _malloc_postfork_parent(void)
|
||||
malloc_mutex_unlock(&base_mtx);
|
||||
|
||||
for (auto arena : gArenaTree.iter()) {
|
||||
malloc_spin_unlock(&arena->mLock);
|
||||
malloc_mutex_unlock(&arena->mLock);
|
||||
}
|
||||
malloc_spin_unlock(&arenas_lock);
|
||||
malloc_mutex_unlock(&arenas_lock);
|
||||
}
|
||||
|
||||
#ifndef XP_DARWIN
|
||||
@ -5105,9 +5031,9 @@ _malloc_postfork_child(void)
|
||||
malloc_mutex_init(&base_mtx);
|
||||
|
||||
for (auto arena : gArenaTree.iter()) {
|
||||
malloc_spin_init(&arena->mLock);
|
||||
malloc_mutex_init(&arena->mLock);
|
||||
}
|
||||
malloc_spin_init(&arenas_lock);
|
||||
malloc_mutex_init(&arenas_lock);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -144,11 +144,11 @@ var PermissionsHelper = {
|
||||
if (aType == "password") {
|
||||
// By default, login saving is enabled, so if it is disabled, the
|
||||
// user selected the never remember option
|
||||
if (!Services.logins.getLoginSavingEnabled(aURI.prePath))
|
||||
if (!Services.logins.getLoginSavingEnabled(aURI.displayPrePath))
|
||||
return Services.perms.DENY_ACTION;
|
||||
|
||||
// Check to see if the user ever actually saved a login
|
||||
if (Services.logins.countLogins(aURI.prePath, "", ""))
|
||||
if (Services.logins.countLogins(aURI.displayPrePath, "", ""))
|
||||
return Services.perms.ALLOW_ACTION;
|
||||
|
||||
return Services.perms.UNKNOWN_ACTION;
|
||||
@ -173,12 +173,12 @@ var PermissionsHelper = {
|
||||
// it seperately.
|
||||
if (aType == "password") {
|
||||
// Get rid of exisiting stored logings
|
||||
let logins = Services.logins.findLogins({}, aURI.prePath, "", "");
|
||||
let logins = Services.logins.findLogins({}, aURI.displayPrePath, "", "");
|
||||
for (let i = 0; i < logins.length; i++) {
|
||||
Services.logins.removeLogin(logins[i]);
|
||||
}
|
||||
// Re-set login saving to enabled
|
||||
Services.logins.setLoginSavingEnabled(aURI.prePath, true);
|
||||
Services.logins.setLoginSavingEnabled(aURI.displayPrePath, true);
|
||||
} else {
|
||||
Services.perms.remove(aURI, aType);
|
||||
// Clear content prefs set in ContentPermissionPrompt.js
|
||||
|
@ -4129,7 +4129,7 @@ Tab.prototype = {
|
||||
|
||||
case "DOMFormHasPassword": {
|
||||
// Send logins for this hostname to Java.
|
||||
let hostname = aEvent.target.baseURIObject.prePath;
|
||||
let hostname = aEvent.target.baseURIObject.displayPrePath;
|
||||
let foundLogins = Services.logins.findLogins({}, hostname, "", "");
|
||||
if (foundLogins.length > 0) {
|
||||
let displayHost = IdentityHandler.getEffectiveHost();
|
||||
|
@ -111,7 +111,7 @@ NSS_VerifySignature(VFYContext * const *ctx,
|
||||
* @return CryptoX_Success on success, CryptoX_Error on error.
|
||||
*/
|
||||
CryptoX_Result
|
||||
CyprtoAPI_VerifySignature(HCRYPTHASH *hash,
|
||||
CryptoAPI_VerifySignature(HCRYPTHASH *hash,
|
||||
HCRYPTKEY *pubKey,
|
||||
const BYTE *signature,
|
||||
DWORD signatureLen)
|
||||
|
@ -117,7 +117,7 @@ CryptoX_Result CryptoAPI_LoadPublicKey(HCRYPTPROV hProv,
|
||||
CryptoX_Result CryptoAPI_VerifyBegin(HCRYPTPROV provider, HCRYPTHASH* hash);
|
||||
CryptoX_Result CryptoAPI_VerifyUpdate(HCRYPTHASH* hash,
|
||||
BYTE *buf, DWORD len);
|
||||
CryptoX_Result CyprtoAPI_VerifySignature(HCRYPTHASH *hash,
|
||||
CryptoX_Result CryptoAPI_VerifySignature(HCRYPTHASH *hash,
|
||||
HCRYPTKEY *pubKey,
|
||||
const BYTE *signature,
|
||||
DWORD signatureLen);
|
||||
@ -137,7 +137,7 @@ CryptoX_Result CyprtoAPI_VerifySignature(HCRYPTHASH *hash,
|
||||
#define CryptoX_LoadPublicKey(CryptoHandle, certData, dataSize, publicKey) \
|
||||
CryptoAPI_LoadPublicKey(CryptoHandle, (BYTE*)(certData), dataSize, publicKey)
|
||||
#define CryptoX_VerifySignature(hash, publicKey, signedData, len) \
|
||||
CyprtoAPI_VerifySignature(hash, publicKey, signedData, len)
|
||||
CryptoAPI_VerifySignature(hash, publicKey, signedData, len)
|
||||
#define CryptoX_FreePublicKey(key) \
|
||||
CryptDestroyKey(*(key))
|
||||
#define CryptoX_FreeCertificate(cert) \
|
||||
|
@ -305,8 +305,7 @@ def parse_chrome_manifest(path, base_path, chrome_entries):
|
||||
#
|
||||
# Example:
|
||||
# manifest = create_webmanifest(
|
||||
# ['pl'],
|
||||
# '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}',
|
||||
# 'pl',
|
||||
# '57.0',
|
||||
# '57.0.*',
|
||||
# 'Firefox',
|
||||
@ -356,7 +355,7 @@ def create_webmanifest(locstr, min_app_ver, max_app_ver, app_name,
|
||||
|
||||
author = build_author_string(
|
||||
defines['MOZ_LANGPACK_CREATOR'],
|
||||
defines['MOZ_LANGPACK_CONTRIBUTORS']
|
||||
defines['MOZ_LANGPACK_CONTRIBUTORS'] if 'MOZ_LANGPACK_CONTRIBUTORS' in defines else ""
|
||||
)
|
||||
|
||||
manifest = {
|
||||
|
@ -0,0 +1,63 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Any copyright is dedicated to the Public Domain.
|
||||
# http://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
import unittest
|
||||
import json
|
||||
|
||||
import mozunit
|
||||
|
||||
import mozbuild.action.langpack_manifest as langpack_manifest
|
||||
from mozbuild.preprocessor import Context
|
||||
|
||||
|
||||
class TestGenerateManifest(unittest.TestCase):
|
||||
"""
|
||||
Unit tests for langpack_manifest.py.
|
||||
"""
|
||||
|
||||
def test_manifest(self):
|
||||
ctx = Context()
|
||||
ctx['MOZ_LANG_TITLE'] = 'Finnish'
|
||||
ctx['MOZ_LANGPACK_CREATOR'] = 'Suomennosprojekti'
|
||||
ctx['MOZ_LANGPACK_CONTRIBUTORS'] = """
|
||||
<em:contributor>Joe Smith</em:contributor>
|
||||
<em:contributor>Mary White</em:contributor>
|
||||
"""
|
||||
manifest = langpack_manifest.create_webmanifest(
|
||||
'fi',
|
||||
'57.0',
|
||||
'57.0.*',
|
||||
'Firefox',
|
||||
'/var/vcs/l10n-central',
|
||||
ctx,
|
||||
{},
|
||||
)
|
||||
|
||||
data = json.loads(manifest)
|
||||
self.assertEquals(data['name'], 'Finnish Language Pack')
|
||||
self.assertEquals(
|
||||
data['author'], 'Suomennosprojekti (contributors: Joe Smith, Mary White)')
|
||||
|
||||
def test_manifest_without_contributors(self):
|
||||
ctx = Context()
|
||||
ctx['MOZ_LANG_TITLE'] = 'Finnish'
|
||||
ctx['MOZ_LANGPACK_CREATOR'] = 'Suomennosprojekti'
|
||||
manifest = langpack_manifest.create_webmanifest(
|
||||
'fi',
|
||||
'57.0',
|
||||
'57.0.*',
|
||||
'Firefox',
|
||||
'/var/vcs/l10n-central',
|
||||
ctx,
|
||||
{},
|
||||
)
|
||||
|
||||
data = json.loads(manifest)
|
||||
self.assertEquals(data['name'], 'Finnish Language Pack')
|
||||
self.assertEquals(data['author'], 'Suomennosprojekti')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
mozunit.main()
|
@ -1,5 +1,6 @@
|
||||
[action/test_buildlist.py]
|
||||
[action/test_generate_browsersearch.py]
|
||||
[action/test_langpack_manifest.py]
|
||||
[action/test_package_fennec_apk.py]
|
||||
[backend/test_build.py]
|
||||
[backend/test_configenvironment.py]
|
||||
|
@ -1140,4 +1140,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
||||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1516124531296000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1516168619980000);
|
||||
|
@ -2,7 +2,6 @@
|
||||
0i0.nl: could not connect to host
|
||||
125m125.de: could not connect to host
|
||||
174.net.nz: could not connect to host
|
||||
1px.tv: could not connect to host
|
||||
360live.fr: could not connect to host
|
||||
47tech.com: could not connect to host
|
||||
4loc.us: could not connect to host
|
||||
@ -11,6 +10,7 @@
|
||||
8560.be: could not connect to host
|
||||
87577.com: could not connect to host
|
||||
8887999.com: could not connect to host
|
||||
8ack.de: could not connect to host
|
||||
8t88.biz: could not connect to host
|
||||
91-freedom.com: could not connect to host
|
||||
aamwa.com: could not connect to host
|
||||
@ -18,20 +18,21 @@ abolition.co: could not connect to host
|
||||
acrossgw.com: could not connect to host
|
||||
addiko.net: could not connect to host
|
||||
adrinet.tk: could not connect to host
|
||||
aerotheque.fr: could not connect to host
|
||||
aevpn.org: could not connect to host
|
||||
agowa338.de: could not connect to host
|
||||
aivd.lol: could not connect to host
|
||||
akoww.de: could not connect to host
|
||||
akul.co.in: could not connect to host
|
||||
alexandros.io: could not connect to host
|
||||
altahrim.net: could not connect to host
|
||||
amua.fr: could not connect to host
|
||||
annetaan.fi: could not connect to host
|
||||
arent.kz: could not connect to host
|
||||
arksan.com.tr: could not connect to host
|
||||
artisense.de: could not connect to host
|
||||
askmagicconch.com: could not connect to host
|
||||
assdecoeur.org: could not connect to host
|
||||
astral.gq: could not connect to host
|
||||
attilagyorffy.com: could not connect to host
|
||||
aviv.nyc: could not connect to host
|
||||
azabani.com: could not connect to host
|
||||
backschues.com: could not connect to host
|
||||
@ -39,40 +40,42 @@ backschues.net: could not connect to host
|
||||
balonmano.co: could not connect to host
|
||||
bbdos.ru: could not connect to host
|
||||
beamitapp.com: could not connect to host
|
||||
beelen.fr: could not connect to host
|
||||
beasel.biz: could not connect to host
|
||||
bencorby.com: could not connect to host
|
||||
benjamin-horvath.com: could not connect to host
|
||||
benjamindietrich.com: could not connect to host
|
||||
benjamindietrich.de: could not connect to host
|
||||
berna.fr: could not connect to host
|
||||
betterlifemakers.com: could not connect to host
|
||||
bip.gov.sa: could not connect to host
|
||||
blazeit.io: could not connect to host
|
||||
blumen-garage.de: could not connect to host
|
||||
bodrumfarm.com: could not connect to host
|
||||
bouncourseplanner.net: could not connect to host
|
||||
brettabel.com: could not connect to host
|
||||
businessfurs.info: could not connect to host
|
||||
buyshoe.org: could not connect to host
|
||||
by1898.com: could not connect to host
|
||||
cais.de: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no]
|
||||
cake-time.co.uk: could not connect to host
|
||||
calculatoaresecondhand.xyz: could not connect to host
|
||||
capellidipremoli.com: could not connect to host
|
||||
casperpanel.com: could not connect to host
|
||||
cbdev.de: could not connect to host
|
||||
chloehorler.com: could not connect to host
|
||||
chonghe.org: could not connect to host
|
||||
christina-quast.de: could not connect to host
|
||||
cielly.com: could not connect to host
|
||||
clearviewwealthprojector.com.au: could not connect to host
|
||||
cloudbased.info: could not connect to host
|
||||
cloudbleed.info: could not connect to host
|
||||
cmpr.es: could not connect to host
|
||||
cnlic.com: could not connect to host
|
||||
colleencornez.com: could not connect to host
|
||||
comssa.org.au: could not connect to host
|
||||
consejosdenutricion.com: could not connect to host
|
||||
corinnanese.de: could not connect to host
|
||||
cpaneltips.com: could not connect to host
|
||||
criticalaim.com: could not connect to host
|
||||
cross-view.com: could not connect to host
|
||||
cry.nu: could not connect to host
|
||||
cryptoisnotacrime.org: could not connect to host
|
||||
cselzer.com: could not connect to host
|
||||
csgo77.com: could not connect to host
|
||||
cypherpunk.ws: could not connect to host
|
||||
@ -84,22 +87,26 @@ dawnsonb.com: could not connect to host
|
||||
dcc.moe: could not connect to host
|
||||
de-servers.de: could not connect to host
|
||||
decoyrouting.com: could not connect to host
|
||||
derchris.me: could not connect to host
|
||||
derivativeshub.pro: could not connect to host
|
||||
dev-talk.eu: could not connect to host
|
||||
devops.moe: could not connect to host
|
||||
dick.red: could not connect to host
|
||||
die-blahuts.de: could not connect to host
|
||||
digioccumss.ddns.net: could not connect to host
|
||||
dijks.com: could not connect to host
|
||||
dingcc.xyz: could not connect to host
|
||||
disco-crazy-world.de: could not connect to host
|
||||
dkn.go.id: could not connect to host
|
||||
dkravchenko.su: could not connect to host
|
||||
donotspellitgav.in: could not connect to host
|
||||
dreizwosechs.de: could not connect to host
|
||||
drkmtrx.xyz: could not connect to host
|
||||
drrr.chat: could not connect to host
|
||||
drrr.wiki: could not connect to host
|
||||
duch.cloud: could not connect to host
|
||||
duelsow.eu: could not connect to host
|
||||
duo.money: could not connect to host
|
||||
dyeager.org: could not connect to host
|
||||
dxm.no-ip.biz: could not connect to host
|
||||
dynts.pro: could not connect to host
|
||||
ectora.com: could not connect to host
|
||||
edit.yahoo.com: could not connect to host
|
||||
@ -132,21 +139,24 @@ gam3rs.de: could not connect to host
|
||||
gaygeeks.de: could not connect to host
|
||||
gdevpenze.ru: could not connect to host
|
||||
geeks.berlin: could not connect to host
|
||||
geneve.guide: could not connect to host
|
||||
getwarden.net: could not connect to host
|
||||
gevaulug.fr: could not connect to host
|
||||
gfoss.gr: could not connect to host
|
||||
ggs.jp: could not connect to host
|
||||
ggx.us: could not connect to host
|
||||
globalgivingtime.com: could not connect to host
|
||||
gmantra.org: could not connect to host
|
||||
google: could not connect to host
|
||||
gottfridsberg.org: could not connect to host
|
||||
gradsm-ci.net: could not connect to host
|
||||
graphire.io: could not connect to host
|
||||
gritte.net: could not connect to host
|
||||
gtdgo.com: could not connect to host
|
||||
gvt2.com: could not connect to host
|
||||
gvt3.com: could not connect to host
|
||||
happygadget.me: could not connect to host
|
||||
haucke.xyz: could not connect to host
|
||||
heijblok.com: could not connect to host
|
||||
helsingfors.guide: could not connect to host
|
||||
here.ml: could not connect to host
|
||||
hg881.com: could not connect to host
|
||||
homeownersassociationmanagementla.com: could not connect to host
|
||||
@ -165,6 +175,7 @@ installgentoo.net: could not connect to host
|
||||
ipv6.watch: could not connect to host
|
||||
iskai.net: could not connect to host
|
||||
islief.com: could not connect to host
|
||||
itspawned.com: could not connect to host
|
||||
jackyyf.com: could not connect to host
|
||||
jaredfraser.com: could not connect to host
|
||||
javascriptlab.fr: could not connect to host
|
||||
@ -175,19 +186,23 @@ jie.dance: could not connect to host
|
||||
johnblackbourn.com: could not connect to host
|
||||
just-pools.co.za: could not connect to host
|
||||
justmy.website: could not connect to host
|
||||
kabus.org: could not connect to host
|
||||
kamikaichimaru.com: could not connect to host
|
||||
kapo.info: could not connect to host
|
||||
karanlyons.com: could not connect to host
|
||||
kenrogers.co: could not connect to host
|
||||
kenvix.com: could not connect to host
|
||||
kevinmeijer.nl: could not connect to host
|
||||
kieranweightman.me: could not connect to host
|
||||
kinepolis-studio.ga: could not connect to host
|
||||
kinganywhere.eu: could not connect to host
|
||||
knapp.noip.me: could not connect to host
|
||||
kollawat.me: could not connect to host
|
||||
kousaku.jp: could not connect to host
|
||||
kozmik.co: could not connect to host
|
||||
kteen.info: could not connect to host
|
||||
laboiteanem.fr: could not connect to host
|
||||
lacasa.fr: could not connect to host
|
||||
laglab.org: could not connect to host
|
||||
lars-mense.de: could not connect to host
|
||||
lathamlabs.com: could not connect to host
|
||||
lathamlabs.net: could not connect to host
|
||||
lathamlabs.org: could not connect to host
|
||||
@ -197,7 +212,9 @@ leninalbertop.com.ve: could not connect to host
|
||||
lezdomsm.com: could not connect to host
|
||||
lheinrich.org: could not connect to host
|
||||
libscode.com: could not connect to host
|
||||
lidong.me: could not connect to host
|
||||
linksanitizer.com: could not connect to host
|
||||
lissabon.guide: could not connect to host
|
||||
littleservice.cn: could not connect to host
|
||||
liukang.tech: could not connect to host
|
||||
livnev.me: could not connect to host
|
||||
@ -205,10 +222,15 @@ logcat.info: could not connect to host
|
||||
logimagine.com: could not connect to host
|
||||
lovelytimes.net: could not connect to host
|
||||
luav.org: could not connect to host
|
||||
luenwarneke.com: could not connect to host
|
||||
lunix.io: could not connect to host
|
||||
m4570.xyz: could not connect to host
|
||||
maartenterpstra.xyz: could not connect to host
|
||||
macedopesca.com.br: could not connect to host
|
||||
maidofhonorcleaning.net: could not connect to host
|
||||
mail4geek.com: could not connect to host
|
||||
makeyourank.com: could not connect to host
|
||||
marie.club: could not connect to host
|
||||
martin-mattel.com: could not connect to host
|
||||
martinrogalla.com: could not connect to host
|
||||
mc-team.org: could not connect to host
|
||||
@ -219,11 +241,14 @@ metachris.com: could not connect to host
|
||||
mingy.ddns.net: could not connect to host
|
||||
mmstick.tk: could not connect to host
|
||||
modded-minecraft-server-list.com: could not connect to host
|
||||
mode-individuell.de: could not connect to host
|
||||
mosaique-lachenaie.fr: could not connect to host
|
||||
moskva.guide: could not connect to host
|
||||
mrliu.me: could not connect to host
|
||||
muh.io: could not connect to host
|
||||
muj-svet.cz: could not connect to host
|
||||
munduch.cz: could not connect to host
|
||||
narada.com.ua: could not connect to host
|
||||
navdeep.ca: could not connect to host
|
||||
ncdesigns-studio.com: could not connect to host
|
||||
necesitodinero.org: could not connect to host
|
||||
@ -231,8 +256,10 @@ nedcf.org.uk: could not connect to host
|
||||
negai.moe: could not connect to host
|
||||
nevolution.me: could not connect to host
|
||||
nikolasbradshaw.com: could not connect to host
|
||||
nkb.in.th: could not connect to host
|
||||
nnote.net: could not connect to host
|
||||
nostraspace.com: could not connect to host
|
||||
notesforpebble.com: could not connect to host
|
||||
nsbfalconacademy.org: could not connect to host
|
||||
nup.pw: could not connect to host
|
||||
ogkw.de: could not connect to host
|
||||
@ -243,7 +270,6 @@ opengg.me: could not connect to host
|
||||
optimist.bg: could not connect to host
|
||||
oranges.tokyo: could not connect to host
|
||||
oscsdp.cz: could not connect to host
|
||||
oshell.me: could not connect to host
|
||||
osterkraenzchen.de: could not connect to host
|
||||
oxygaming.com: could not connect to host
|
||||
oxymc.com: could not connect to host
|
||||
@ -256,42 +282,49 @@ pengisatelier.net: could not connect to host
|
||||
perkbrian.com: could not connect to host
|
||||
persjrp.ca: could not connect to host
|
||||
persoform.ch: could not connect to host
|
||||
pettitcoat.com: could not connect to host
|
||||
philippa.cool: could not connect to host
|
||||
picallo.es: could not connect to host
|
||||
pkautodesign.com: could not connect to host
|
||||
pkov.cz: could not connect to host
|
||||
plaasprodukte.com: could not connect to host
|
||||
pointagri.com: could not connect to host
|
||||
polit.im: could not connect to host
|
||||
poolinstallers.co.za: could not connect to host
|
||||
potomania.cz: could not connect to host
|
||||
pouets.ovh: could not connect to host
|
||||
projectasterk.com: could not connect to host
|
||||
proxydesk.eu: could not connect to host
|
||||
proxyweb.us: could not connect to host
|
||||
pythia.nz: could not connect to host
|
||||
qionouu.cn: could not connect to host
|
||||
qto.net: could not connect to host
|
||||
rainbin.com: could not connect to host
|
||||
real-compare.com: could not connect to host
|
||||
refactor.zone: could not connect to host
|
||||
reignsphere.net: could not connect to host
|
||||
reinaertvandecruys.me: could not connect to host
|
||||
revayd.net: could not connect to host
|
||||
reykjavik.guide: could not connect to host
|
||||
roguesignal.net: could not connect to host
|
||||
rolodato.com: could not connect to host
|
||||
s1mplescripts.de: could not connect to host
|
||||
sallysubs.com: could not connect to host
|
||||
sanatrans.com: could not connect to host
|
||||
sarndipity.com: could not connect to host
|
||||
secureesolutions.com: could not connect to host
|
||||
securitymap.wiki: could not connect to host
|
||||
sellmoretires.com: could not connect to host
|
||||
semantheme.fr: could not connect to host
|
||||
shadowplus.net: could not connect to host
|
||||
shadowrocket.net: could not connect to host
|
||||
sharevari.com: could not connect to host
|
||||
shavingks.com: could not connect to host
|
||||
sheratan.web.id: could not connect to host
|
||||
shirakaba-cc.com: could not connect to host
|
||||
shorten.ninja: could not connect to host
|
||||
siku.pro: could not connect to host
|
||||
simbolo.co.uk: could not connect to host
|
||||
simonkjellberg.com: could not connect to host
|
||||
simplerses.com: could not connect to host
|
||||
snille.com: could not connect to host
|
||||
socialworkout.com: could not connect to host
|
||||
socialworkout.net: could not connect to host
|
||||
socialworkout.org: could not connect to host
|
||||
@ -302,21 +335,20 @@ soontm.de: could not connect to host
|
||||
soubriquet.org: could not connect to host
|
||||
soulema.com: could not connect to host
|
||||
sowingseasons.com: could not connect to host
|
||||
spatzenwerkstatt.de: could not connect to host
|
||||
spicywombat.com: could not connect to host
|
||||
spom.net: could not connect to host
|
||||
sputnik1net.org: could not connect to host
|
||||
sss3s.com: could not connect to host
|
||||
stitthappens.com: could not connect to host
|
||||
stumf.si: could not connect to host
|
||||
stytt.com: could not connect to host
|
||||
surdam.casa: could not connect to host
|
||||
sviz.pro: could not connect to host
|
||||
taidu.news: could not connect to host
|
||||
talon.rip: could not connect to host
|
||||
tech-blog.fr: could not connect to host
|
||||
tenispopular.com: could not connect to host
|
||||
terminalvelocity.co.nz: could not connect to host
|
||||
thesehighsandlows.com: could not connect to host
|
||||
thezero.org: could not connect to host
|
||||
thinkcash.nl: could not connect to host
|
||||
tiliaze.info: could not connect to host
|
||||
tiliaze.net: could not connect to host
|
||||
@ -324,7 +356,10 @@ totch.de: could not connect to host
|
||||
totot.net: could not connect to host
|
||||
transcendmotor.sg: could not connect to host
|
||||
turn-sticks.com: could not connect to host
|
||||
tusb.ml: could not connect to host
|
||||
umsapi.com: could not connect to host
|
||||
underskatten.tk: could not connect to host
|
||||
upr.com.ua: could not connect to host
|
||||
venmos.com: could not connect to host
|
||||
viditut.com: could not connect to host
|
||||
vilog.me: could not connect to host
|
||||
@ -332,15 +367,16 @@ visionless.me: could not connect to host
|
||||
vitapingu.de: could not connect to host
|
||||
vmgirls.com: could not connect to host
|
||||
warhaggis.com: could not connect to host
|
||||
warlions.info: could not connect to host
|
||||
watchweasel.com: could not connect to host
|
||||
weareincognito.org: could not connect to host
|
||||
webart-factory.de: could not connect to host
|
||||
webduck.nl: could not connect to host
|
||||
websiteadvice.com.au: could not connect to host
|
||||
weed.ren: could not connect to host
|
||||
webthings.com.br: could not connect to host
|
||||
weicn.org: could not connect to host
|
||||
welby.cat: could not connect to host
|
||||
werhatunsverraten.eu: could not connect to host
|
||||
werkinc.de: could not connect to host
|
||||
whilsttraveling.com: could not connect to host
|
||||
wipc.net: could not connect to host
|
||||
wm-talk.net: could not connect to host
|
||||
@ -351,9 +387,7 @@ www.simbolo.co.uk: could not connect to host
|
||||
xa1.uk: could not connect to host
|
||||
xecureit.com: could not connect to host
|
||||
xing.ml: could not connect to host
|
||||
xpjcunkuan.com: could not connect to host
|
||||
xtremenutrition.com.br: could not connect to host
|
||||
xyfun.net: could not connect to host
|
||||
zenfusion.fr: could not connect to host
|
||||
zenghx.tk: could not connect to host
|
||||
zmk.fr: could not connect to host
|
||||
@ -407,7 +441,7 @@ zzw.ca: could not connect to host
|
||||
166166.com: could not connect to host
|
||||
16deza.com: did not receive HSTS header
|
||||
16packets.com: could not connect to host
|
||||
173vpn.cn: did not receive HSTS header
|
||||
173vpn.cn: could not connect to host
|
||||
188betwarriors.co.uk: could not connect to host
|
||||
188trafalgar.ca: did not receive HSTS header
|
||||
1921958389.rsc.cdn77.org: did not receive HSTS header
|
||||
@ -914,8 +948,6 @@ approlys.fr: did not receive HSTS header
|
||||
apps-for-fishing.com: could not connect to host
|
||||
appsbystudio.co.uk: did not receive HSTS header
|
||||
appsdash.io: could not connect to host
|
||||
aquaron.com: did not receive HSTS header
|
||||
aquaundine.net: could not connect to host
|
||||
aquilalab.com: could not connect to host
|
||||
arabdigitalexpression.org: did not receive HSTS header
|
||||
aradulconteaza.ro: could not connect to host
|
||||
@ -1237,6 +1269,7 @@ bgmn.net: max-age too low: 0
|
||||
bhatia.at: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no]
|
||||
bi.search.yahoo.com: did not receive HSTS header
|
||||
biblerhymes.com: did not receive HSTS header
|
||||
bibliaon.com: did not receive HSTS header
|
||||
bidon.ca: did not receive HSTS header
|
||||
bieberium.de: could not connect to host
|
||||
biego.cn: did not receive HSTS header
|
||||
@ -1321,7 +1354,7 @@ blog.cyveillance.com: did not receive HSTS header
|
||||
blog.torproject.org: max-age too low: 1000
|
||||
blogabout.ru: did not receive HSTS header
|
||||
bloglikepro.com: could not connect to host
|
||||
bloomzoomy.ru: max-age too low: 172800
|
||||
bloomzoomy.ru: could not connect to host
|
||||
blowjs.com: could not connect to host
|
||||
bltc.co: could not connect to host
|
||||
blubbablasen.de: could not connect to host
|
||||
@ -1522,7 +1555,6 @@ cabsites.com: could not connect to host
|
||||
cabusar.fr: did not receive HSTS header
|
||||
caconnect.org: could not connect to host
|
||||
cadao.me: did not receive HSTS header
|
||||
cadusilva.com: did not receive HSTS header
|
||||
caesreon.com: could not connect to host
|
||||
cafe-murr.de: could not connect to host
|
||||
cafe-scientifique.org.ec: could not connect to host
|
||||
@ -1530,7 +1562,7 @@ cafe-service.ru: max-age too low: 10
|
||||
caim.cz: did not receive HSTS header
|
||||
caizx.com: did not receive HSTS header
|
||||
cajapopcorn.com: did not receive HSTS header
|
||||
cake.care: could not connect to host
|
||||
cake.care: did not receive HSTS header
|
||||
calcularpagerank.com.br: could not connect to host
|
||||
calendarr.com: did not receive HSTS header
|
||||
calgaryconstructionjobs.com: could not connect to host
|
||||
@ -1781,6 +1813,7 @@ cloudwalk.io: did not receive HSTS header
|
||||
clounix.online: could not connect to host
|
||||
clovissantos.com: could not connect to host
|
||||
clowde.in: could not connect to host
|
||||
clubalfa.it: did not receive HSTS header
|
||||
clubmix.co.kr: could not connect to host
|
||||
cluster.id: did not receive HSTS header
|
||||
clustermaze.net: could not connect to host
|
||||
@ -1861,6 +1894,7 @@ comparetravelinsurance.com.au: did not receive HSTS header
|
||||
compassionate-biology.com: could not connect to host
|
||||
compiledworks.com: could not connect to host
|
||||
completionist.audio: could not connect to host
|
||||
complexart.ro: did not receive HSTS header
|
||||
complymd.com: did not receive HSTS header
|
||||
compraneta.com: did not receive HSTS header
|
||||
comprehensiveihc.com: could not connect to host
|
||||
@ -2077,7 +2111,6 @@ danielcowie.me: could not connect to host
|
||||
danieldk.eu: did not receive HSTS header
|
||||
danielheal.net: could not connect to host
|
||||
danieliancu.com: could not connect to host
|
||||
danielverlaan.nl: did not receive HSTS header
|
||||
danielworthy.com: did not receive HSTS header
|
||||
danijobs.com: could not connect to host
|
||||
danishenanigans.com: could not connect to host
|
||||
@ -2207,8 +2240,6 @@ deuxvia.com: could not connect to host
|
||||
dev: could not connect to host
|
||||
dev-aegon.azurewebsites.net: did not receive HSTS header
|
||||
dev-bluep.pantheonsite.io: did not receive HSTS header
|
||||
dev-pulse-mtn.pantheonsite.io: did not receive HSTS header
|
||||
devafterdark.com: could not connect to host
|
||||
devct.cz: did not receive HSTS header
|
||||
devcu.com: could not connect to host
|
||||
devcu.net: could not connect to host
|
||||
@ -2575,6 +2606,7 @@ empleostampico.com: did not receive HSTS header
|
||||
employeestore.org: did not receive HSTS header
|
||||
employer.gov: could not connect to host
|
||||
empty-r.com: could not connect to host
|
||||
enaia.fr: did not receive HSTS header
|
||||
encode.space: could not connect to host
|
||||
encode.uk.com: did not receive HSTS header
|
||||
encoder.pw: could not connect to host
|
||||
@ -2778,6 +2810,7 @@ famio.cn: could not connect to host
|
||||
fantasyfootballpundit.com: did not receive HSTS header
|
||||
fanyl.cn: could not connect to host
|
||||
farces.com: did not receive HSTS header
|
||||
farhadexchange.com: did not receive HSTS header
|
||||
fashion.net: did not receive HSTS header
|
||||
fashioncare.cz: did not receive HSTS header
|
||||
fashionholic.my: did not receive HSTS header
|
||||
@ -2794,6 +2827,7 @@ fatwin.pw: could not connect to host
|
||||
fatzebra.com.au: max-age too low: 0
|
||||
fayolle.info: did not receive HSTS header
|
||||
fbox.li: could not connect to host
|
||||
fcsic.gov: did not receive HSTS header
|
||||
fdj.im: could not connect to host
|
||||
fdt.name: did not receive HSTS header
|
||||
feard.space: could not connect to host
|
||||
@ -2860,6 +2894,7 @@ firmenverzeichnis.nu: could not connect to host
|
||||
firstdogonthemoon.com.au: did not receive HSTS header
|
||||
firstforex.co.uk: did not receive HSTS header
|
||||
firstlook.org: did not receive HSTS header
|
||||
fistu.la: did not receive HSTS header
|
||||
fit4medien.de: did not receive HSTS header
|
||||
fitbylo.com: did not receive HSTS header
|
||||
fitea.cz: did not receive HSTS header
|
||||
@ -2892,7 +2927,6 @@ florafiora.com.br: did not receive HSTS header
|
||||
florian-lillpopp.de: max-age too low: 10
|
||||
florianlillpopp.de: max-age too low: 10
|
||||
floridaescapes.co.uk: did not receive HSTS header
|
||||
florispoort.nl: did not receive HSTS header
|
||||
flouartistique.ch: could not connect to host
|
||||
flow.pe: could not connect to host
|
||||
flowersandclouds.com: could not connect to host
|
||||
@ -2951,6 +2985,7 @@ fralef.me: did not receive HSTS header
|
||||
francevpn.xyz: could not connect to host
|
||||
francois-vidit.com: did not receive HSTS header
|
||||
frangor.info: did not receive HSTS header
|
||||
frank.fyi: did not receive HSTS header
|
||||
frankierprofi.de: did not receive HSTS header
|
||||
frankwei.xyz: did not receive HSTS header
|
||||
franta.biz: did not receive HSTS header
|
||||
@ -2988,7 +3023,6 @@ frsis2017.com: could not connect to host
|
||||
frugro.be: did not receive HSTS header
|
||||
fruitusers.com: could not connect to host
|
||||
frumious.fyi: could not connect to host
|
||||
frusky.net: did not receive HSTS header
|
||||
fsapubs.gov: could not connect to host
|
||||
fsinf.at: did not receive HSTS header
|
||||
fspphoto.com: could not connect to host
|
||||
@ -3600,6 +3634,7 @@ hpepub.org: could not connect to host
|
||||
hppub.info: could not connect to host
|
||||
hppub.org: could not connect to host
|
||||
hppub.site: could not connect to host
|
||||
hqq.tv: did not receive HSTS header
|
||||
hr-intranet.com: could not connect to host
|
||||
hrackydomino.cz: did not receive HSTS header
|
||||
hrk.io: could not connect to host
|
||||
@ -3891,7 +3926,7 @@ iskaz.rs: did not receive HSTS header
|
||||
ismetroonfiretoday.com: could not connect to host
|
||||
isogen5.com: could not connect to host
|
||||
isogram.nl: could not connect to host
|
||||
israkurort.com: did not receive HSTS header
|
||||
israkurort.com: could not connect to host
|
||||
istanbultravelguide.info: could not connect to host
|
||||
istaspirtslietas.lv: did not receive HSTS header
|
||||
it-cave.com: could not connect to host
|
||||
@ -4055,6 +4090,7 @@ joakimalgroy.com: could not connect to host
|
||||
jobflyapp.com: could not connect to host
|
||||
jobshq.com: did not receive HSTS header
|
||||
jobss.co.uk: did not receive HSTS header
|
||||
joedavison.me: did not receive HSTS header
|
||||
johannes-sprink.de: could not connect to host
|
||||
johnbrownphotography.ch: did not receive HSTS header
|
||||
johncardell.com: did not receive HSTS header
|
||||
@ -4320,7 +4356,7 @@ kredietpaspoort.nl: could not connect to host
|
||||
kredite.sale: could not connect to host
|
||||
krestanskydarek.cz: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISiteSecurityService.processHeader]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: /builds/slave/m-cen-l64-periodicupdate-00000/getHSTSPreloadList.js :: processStsHeader :: line 119" data: no]
|
||||
kriegt.es: did not receive HSTS header
|
||||
kristjanrang.eu: did not receive HSTS header
|
||||
kristjanrang.eu: could not connect to host
|
||||
kristofferkoch.com: could not connect to host
|
||||
krizevackapajdasija.hr: could not connect to host
|
||||
krizevci.info: did not receive HSTS header
|
||||
@ -4404,7 +4440,7 @@ langenbach.rocks: could not connect to host
|
||||
langendries.eu: could not connect to host
|
||||
langhun.me: did not receive HSTS header
|
||||
laniakean.com: did not receive HSTS header
|
||||
lanzainc.xyz: could not connect to host
|
||||
lanzainc.xyz: did not receive HSTS header
|
||||
laobox.fr: could not connect to host
|
||||
laospage.com: max-age too low: 2592000
|
||||
laplaceduvillage.net: could not connect to host
|
||||
@ -4584,7 +4620,7 @@ locktheirphone.com: could not connect to host
|
||||
locomotive.ca: did not receive HSTS header
|
||||
locvis.ru: could not connect to host
|
||||
loftboard.eu: could not connect to host
|
||||
log2n.uk: did not receive HSTS header
|
||||
log2n.uk: could not connect to host
|
||||
logario.com.br: could not connect to host
|
||||
logicaladvertising.com: could not connect to host
|
||||
login.corp.google.com: max-age too low: 7776000 (error ignored - included regardless)
|
||||
@ -4783,6 +4819,7 @@ markayapilandirma.com: could not connect to host
|
||||
markcp.me: could not connect to host
|
||||
market.android.com: did not receive HSTS header (error ignored - included regardless)
|
||||
marketespace.fr: did not receive HSTS header
|
||||
markhaehnel.de: max-age too low: 172800
|
||||
markorszulak.com: did not receive HSTS header
|
||||
markrobin.de: did not receive HSTS header
|
||||
marksill.com: could not connect to host
|
||||
@ -5466,6 +5503,7 @@ novelabs.eu: could not connect to host
|
||||
novurania.com: did not receive HSTS header
|
||||
nowak.ninja: did not receive HSTS header
|
||||
noworrywp.com: could not connect to host
|
||||
nowprotein.com: did not receive HSTS header
|
||||
nozoe.jp: could not connect to host
|
||||
np.search.yahoo.com: did not receive HSTS header
|
||||
npol.de: could not connect to host
|
||||
@ -5530,7 +5568,7 @@ obsydian.org: could not connect to host
|
||||
occentus.net: did not receive HSTS header
|
||||
ochaken.cf: could not connect to host
|
||||
octocat.ninja: could not connect to host
|
||||
oddmouse.com: did not receive HSTS header
|
||||
oddmouse.com: could not connect to host
|
||||
odin.xxx: could not connect to host
|
||||
odinoffice.no: did not receive HSTS header
|
||||
odysseyandco.com: could not connect to host
|
||||
@ -5707,7 +5745,7 @@ p-rickroll-o.pw: could not connect to host
|
||||
p.linode.com: could not connect to host
|
||||
p1c.pw: could not connect to host
|
||||
p3.marketing: did not receive HSTS header
|
||||
p3in.com: could not connect to host
|
||||
p3in.com: did not receive HSTS header
|
||||
p8r.de: could not connect to host
|
||||
pa.search.yahoo.com: did not receive HSTS header
|
||||
pablocamino.tk: could not connect to host
|
||||
@ -5800,6 +5838,7 @@ pbbr.com: did not receive HSTS header
|
||||
pbprint.ru: did not receive HSTS header
|
||||
pc-nf.de: did not receive HSTS header
|
||||
pcat.io: could not connect to host
|
||||
pccentral.nl: did not receive HSTS header
|
||||
pcfun.net: could not connect to host
|
||||
pchax.net: could not connect to host
|
||||
pchospital.cc: did not receive HSTS header
|
||||
@ -6420,6 +6459,7 @@ roeper.party: could not connect to host
|
||||
roesemann.email: could not connect to host
|
||||
roguelikecenter.fr: did not receive HSTS header
|
||||
rolandreed.cn: did not receive HSTS header
|
||||
rolandslate.com: did not receive HSTS header
|
||||
rolemaster.net: could not connect to host
|
||||
roleplayhome.com: could not connect to host
|
||||
rolroer.co.za: could not connect to host
|
||||
@ -6571,6 +6611,7 @@ schermreparatierotterdam.nl: did not receive HSTS header
|
||||
schmitt.ovh: could not connect to host
|
||||
schnell-abnehmen.tips: did not receive HSTS header
|
||||
schnell-gold.com: could not connect to host
|
||||
schoepski.de: did not receive HSTS header
|
||||
schooltrends.co.uk: did not receive HSTS header
|
||||
schorel.ovh: could not connect to host
|
||||
schorelweb.nl: did not receive HSTS header
|
||||
@ -6867,6 +6908,7 @@ slashdesign.it: did not receive HSTS header
|
||||
slashem.me: did not receive HSTS header
|
||||
slattery.co: could not connect to host
|
||||
slauber.de: did not receive HSTS header
|
||||
sleeklounge.com: did not receive HSTS header
|
||||
sleep10.com: could not connect to host
|
||||
slicketl.com: did not receive HSTS header
|
||||
slightfuture.click: could not connect to host
|
||||
@ -7074,7 +7116,6 @@ statuschecks.net: could not connect to host
|
||||
stayokhotelscdc-mailing.com: could not connect to host
|
||||
stcomex.com: did not receive HSTS header
|
||||
steelbea.ms: could not connect to host
|
||||
stefanovski.io: could not connect to host
|
||||
stefanweiser.de: did not receive HSTS header
|
||||
stepbystep3d.com: did not receive HSTS header
|
||||
stephanierxo.com: did not receive HSTS header
|
||||
@ -7223,7 +7264,7 @@ syncclinicalstudy.com: could not connect to host
|
||||
syncer.jp: did not receive HSTS header
|
||||
synchrocube.com: could not connect to host
|
||||
syncserve.net: did not receive HSTS header
|
||||
syneic.com: could not connect to host
|
||||
syneic.com: did not receive HSTS header
|
||||
syno.gq: could not connect to host
|
||||
syntaxoff.com: could not connect to host
|
||||
syntheticmotoroil.org: did not receive HSTS header
|
||||
@ -7551,6 +7592,7 @@ tjeckien.guide: could not connect to host
|
||||
tjullrich.de: could not connect to host
|
||||
tkappertjedemetamorfose.nl: could not connect to host
|
||||
tkonstantopoulos.tk: could not connect to host
|
||||
tlach.cz: did not receive HSTS header
|
||||
tlcdn.net: could not connect to host
|
||||
tlo.hosting: could not connect to host
|
||||
tlo.link: could not connect to host
|
||||
@ -7868,6 +7910,7 @@ uscitizenship.info: did not receive HSTS header
|
||||
uscntalk.com: could not connect to host
|
||||
uscurrency.gov: did not receive HSTS header
|
||||
used-in.jp: could not connect to host
|
||||
user-new.com: did not receive HSTS header
|
||||
usercare.com: did not receive HSTS header
|
||||
userify.com: max-age too low: 0
|
||||
uslab.io: could not connect to host
|
||||
@ -7880,6 +7923,7 @@ utopian-surgery.com: could not connect to host
|
||||
utopianconcept.com: did not receive HSTS header
|
||||
utopianhomespa.com: did not receive HSTS header
|
||||
utopianrealms.org: did not receive HSTS header
|
||||
uttnetgroup.fr: did not receive HSTS header
|
||||
utumno.ch: did not receive HSTS header
|
||||
utvbloggen.se: max-age too low: 604800
|
||||
uvarov.pw: could not connect to host
|
||||
@ -8607,6 +8651,7 @@ zmy.im: did not receive HSTS header
|
||||
zocken.com: did not receive HSTS header
|
||||
zoe.vc: could not connect to host
|
||||
zohar.link: could not connect to host
|
||||
zolotoy-standart.com.ua: did not receive HSTS header
|
||||
zomiac.pp.ua: could not connect to host
|
||||
zoneminder.com: did not receive HSTS header
|
||||
zoners.si: could not connect to host
|
||||
|
@ -8,7 +8,7 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1518543721375000);
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1518587810091000);
|
||||
%%
|
||||
0.me.uk, 1
|
||||
00001.am, 1
|
||||
@ -326,7 +326,7 @@ const PRTime gPreloadListExpirationTime = INT64_C(1518543721375000);
|
||||
500k.nl, 1
|
||||
500p.xyz, 1
|
||||
50plusnet.nl, 1
|
||||
518maicai.com, 0
|
||||
518maicai.com, 1
|
||||
525.info, 1
|
||||
52neptune.com, 1
|
||||
5432.cc, 1
|
||||
@ -1647,8 +1647,10 @@ aqualogy.de, 1
|
||||
aquapoint.kiev.ua, 1
|
||||
aquarium-supplement.net, 1
|
||||
aquariumaccessories.shop, 1
|
||||
aquaron.com, 1
|
||||
aquaselect.eu, 1
|
||||
aquatechnologygroup.com, 1
|
||||
aquaundine.net, 1
|
||||
aquavitaedayspa.com.au, 1
|
||||
aquila.co.uk, 1
|
||||
aquilaguild.com, 1
|
||||
@ -2786,7 +2788,6 @@ biathloncup.ru, 1
|
||||
bible-maroc.com, 1
|
||||
bible.ru, 1
|
||||
bibleonline.ru, 1
|
||||
bibliaon.com, 1
|
||||
biblio.wiki, 1
|
||||
biblioblog.fr, 1
|
||||
bibliomarkt.ch, 1
|
||||
@ -3826,6 +3827,7 @@ cadman.pw, 1
|
||||
cadooz.com, 1
|
||||
cadorama.fr, 1
|
||||
cadoth.net, 1
|
||||
cadusilva.com, 1
|
||||
caerostris.com, 1
|
||||
caesarkabalan.com, 1
|
||||
cafechesscourt.com, 1
|
||||
@ -4807,7 +4809,6 @@ clu-in.org, 1
|
||||
club-is.ru, 1
|
||||
club-reduc.com, 1
|
||||
club103.ch, 1
|
||||
clubalfa.it, 1
|
||||
clubdeslecteurs.net, 1
|
||||
clubedalutashop.com, 1
|
||||
clubempleos.com, 1
|
||||
@ -5084,7 +5085,6 @@ completesecurityessex.co.uk, 1
|
||||
completesecurityessex.com, 1
|
||||
completesportperformance.com, 1
|
||||
completionist.me, 1
|
||||
complexart.ro, 1
|
||||
complexsystems.fail, 1
|
||||
compliance-management.ch, 1
|
||||
compliance-systeme.de, 1
|
||||
@ -5832,6 +5832,7 @@ danielschreurs.com, 1
|
||||
danielstach.cz, 1
|
||||
danielthompson.info, 1
|
||||
danieltollot.de, 1
|
||||
danielverlaan.nl, 1
|
||||
danielvoogsgerd.nl, 1
|
||||
danielzuzevich.com, 1
|
||||
danilapisarev.com, 1
|
||||
@ -6322,9 +6323,11 @@ deux.solutions, 1
|
||||
deuxsol.co, 1
|
||||
deuxsol.com, 1
|
||||
deuxsolutions.com, 1
|
||||
dev-pulse-mtn.pantheonsite.io, 1
|
||||
dev-talk.eu, 1
|
||||
dev-talk.net, 1
|
||||
dev-tek.de, 1
|
||||
devafterdark.com, 1
|
||||
devalps.eu, 1
|
||||
devb.nl, 1
|
||||
devdesco.com, 1
|
||||
@ -7659,7 +7662,6 @@ en-crypt.me, 1
|
||||
en-maktoob.search.yahoo.com, 0
|
||||
en4rab.co.uk, 1
|
||||
enaah.de, 1
|
||||
enaia.fr, 1
|
||||
enaim.de, 1
|
||||
enamae.net, 1
|
||||
encfs.win, 1
|
||||
@ -8383,7 +8385,6 @@ faretravel.co.uk, 1
|
||||
farfallapets.com.br, 1
|
||||
farfetchos.com, 1
|
||||
fargtorget.se, 1
|
||||
farhadexchange.com, 1
|
||||
farhood.org, 1
|
||||
farkas.bz, 1
|
||||
farm24.co.uk, 1
|
||||
@ -8454,7 +8455,6 @@ fcburk.de, 1
|
||||
fcforum.net, 1
|
||||
fckd.net, 1
|
||||
fcprovadia.com, 1
|
||||
fcsic.gov, 1
|
||||
fdlibre.eu, 1
|
||||
fdsys.gov, 0
|
||||
feac.us, 1
|
||||
@ -8704,7 +8704,6 @@ fishermansbendcorporation.com.au, 1
|
||||
fishermansbendtownhouses.com.au, 1
|
||||
fishserver.net, 1
|
||||
fishtacos.blog, 1
|
||||
fistu.la, 1
|
||||
fit-4u.ch, 1
|
||||
fit365.jp, 1
|
||||
fitchannel.com, 1
|
||||
@ -8822,6 +8821,7 @@ florinapp.com, 1
|
||||
florinlungu.it, 1
|
||||
florismoo.nl, 1
|
||||
florismouwen.com, 0
|
||||
florispoort.nl, 1
|
||||
florisvdk.net, 1
|
||||
floriswesterman.nl, 1
|
||||
flosch.at, 1
|
||||
@ -9061,7 +9061,6 @@ francoiscarrier.com, 1
|
||||
francoislepage.com, 1
|
||||
francoz.me, 1
|
||||
frandor.co.uk, 1
|
||||
frank.fyi, 1
|
||||
franke-chemie.de, 1
|
||||
franken-lehrmittel.de, 1
|
||||
frankenlehrmittel.de, 1
|
||||
@ -9234,6 +9233,7 @@ frugalfamilyhome.com, 1
|
||||
frugalmechanic.com, 1
|
||||
fruition.co.jp, 1
|
||||
frusky.de, 1
|
||||
frusky.net, 1
|
||||
frydrychit.cz, 1
|
||||
fs-fitness.eu, 1
|
||||
fs-gamenet.de, 1
|
||||
@ -10076,7 +10076,7 @@ graffen.dk, 1
|
||||
grafmurr.de, 1
|
||||
grailians.com, 1
|
||||
graingert.co.uk, 1
|
||||
graliv.net, 1
|
||||
graliv.net, 0
|
||||
gramati.com.br, 1
|
||||
granary-demo.appspot.com, 0
|
||||
grandcapital.cn, 1
|
||||
@ -10282,7 +10282,7 @@ guidechecking.com, 1
|
||||
guideo.ch, 1
|
||||
guides-peche64.com, 1
|
||||
guidetoiceland.is, 0
|
||||
guildgearscore.cf, 1
|
||||
guildgearscore.cf, 0
|
||||
guildofmusicsupervisors.co.uk, 1
|
||||
guillaume-leduc.fr, 1
|
||||
guillaumecote.me, 1
|
||||
@ -11165,7 +11165,6 @@ hpisavageforum.com, 1
|
||||
hpkp-faq.de, 1
|
||||
hpnow.com.br, 1
|
||||
hqhost.net, 0
|
||||
hqq.tv, 1
|
||||
hqwebhosting.tk, 1
|
||||
hr98.tk, 1
|
||||
hrabogados.com, 1
|
||||
@ -11357,7 +11356,7 @@ iaeste.no, 1
|
||||
iainsimms.me, 1
|
||||
ialis.me, 1
|
||||
iamcarrico.com, 1
|
||||
iamprophet.pw, 0
|
||||
iamprophet.pw, 1
|
||||
iamsoareyou.se, 1
|
||||
iamtheib.me, 1
|
||||
iamusingtheinter.net, 1
|
||||
@ -11578,7 +11577,7 @@ ilya.pp.ua, 1
|
||||
im-c-shop.com, 1
|
||||
im-design.com.ua, 1
|
||||
im2net.com, 1
|
||||
im66.net, 1
|
||||
im66.net, 0
|
||||
ima-tourcoing.fr, 1
|
||||
imacs.org, 1
|
||||
imadalin.ro, 1
|
||||
@ -12658,7 +12657,6 @@ joduska.me, 1
|
||||
jodyboucher.com, 1
|
||||
joe-pagan.com, 1
|
||||
joecod.es, 1
|
||||
joedavison.me, 1
|
||||
joedinardo.com, 1
|
||||
joedroll.com, 1
|
||||
joehenry.co.uk, 1
|
||||
@ -15279,7 +15277,6 @@ marketingdesignu.cz, 1
|
||||
marketio.co, 1
|
||||
marketizare.ro, 1
|
||||
marketnsight.com, 1
|
||||
markhaehnel.de, 1
|
||||
markido.com, 1
|
||||
markitzeroday.com, 1
|
||||
markllego.com, 1
|
||||
@ -17546,7 +17543,7 @@ nomifensine.com, 1
|
||||
nomsy.net, 1
|
||||
noname-ev.de, 1
|
||||
noncombatant.org, 1
|
||||
noob-box.net, 1
|
||||
noob-box.net, 0
|
||||
noobunbox.net, 1
|
||||
noodles.net.nz, 1
|
||||
noodplan.co.za, 1
|
||||
@ -17649,7 +17646,6 @@ nowcost.com, 1
|
||||
nowhere.dk, 1
|
||||
nowlas.org, 1
|
||||
nowloading.co, 1
|
||||
nowprotein.com, 1
|
||||
noxlogic.nl, 1
|
||||
noyocenter.org, 1
|
||||
npath.de, 1
|
||||
@ -18654,7 +18650,6 @@ pbscreens.com, 1
|
||||
pbytes.com, 1
|
||||
pc-rescue.me, 1
|
||||
pc-tweak.de, 1
|
||||
pccentral.nl, 1
|
||||
pcel.com, 1
|
||||
pcf92.fr, 1
|
||||
pcfeuerwehr.de, 1
|
||||
@ -20788,7 +20783,6 @@ rokort.dk, 1
|
||||
rokudenashi.de, 1
|
||||
roland.io, 1
|
||||
rolandkolodziej.com, 1
|
||||
rolandslate.com, 1
|
||||
rolandszabo.com, 1
|
||||
rolliwelt.de, 1
|
||||
rolodato.com, 1
|
||||
@ -21425,7 +21419,6 @@ schnellsuche.de, 1
|
||||
schnouki.net, 1
|
||||
schnyder-werbung.ch, 1
|
||||
schoeck-elektro.de, 1
|
||||
schoepski.de, 1
|
||||
schoknecht.net, 1
|
||||
schoknecht.one, 1
|
||||
schokokeks.org, 1
|
||||
@ -22452,7 +22445,6 @@ slash64.uk, 1
|
||||
slashbits.no, 1
|
||||
slaughterhouse.fr, 1
|
||||
slaws.io, 1
|
||||
sleeklounge.com, 1
|
||||
sleeplessbeastie.eu, 1
|
||||
sleepmap.de, 1
|
||||
sleepstar.co.uk, 1
|
||||
@ -23185,6 +23177,7 @@ steenackers.be, 1
|
||||
stefan-bayer.eu, 1
|
||||
stefan-schlueter.de, 1
|
||||
stefanbayer.de, 1
|
||||
stefanovski.io, 0
|
||||
stefany.eu, 1
|
||||
steidlewirt.de, 1
|
||||
steigerplank.com, 0
|
||||
@ -24659,7 +24652,6 @@ tkjg.fi, 1
|
||||
tkn.tokyo, 1
|
||||
tkts.cl, 1
|
||||
tkusano.jp, 1
|
||||
tlach.cz, 1
|
||||
tlehseasyads.com, 1
|
||||
tlo.xyz, 1
|
||||
tloxygen.com, 1
|
||||
@ -25688,7 +25680,6 @@ usd.de, 1
|
||||
use.be, 1
|
||||
usebean.com, 1
|
||||
usedesk.ru, 1
|
||||
user-new.com, 1
|
||||
useresponse.com, 1
|
||||
usetypo3.com, 1
|
||||
useyourloaf.com, 1
|
||||
@ -25725,7 +25716,6 @@ utopialgb.org.uk, 1
|
||||
utopians.dk, 1
|
||||
utopicestudios.com, 1
|
||||
utox.io, 1
|
||||
uttnetgroup.fr, 0
|
||||
utugnn.ru, 1
|
||||
utw.me, 1
|
||||
uvocorp.com, 1
|
||||
@ -26540,7 +26530,7 @@ webseitendesigner.com, 0
|
||||
webseitenserver.com, 1
|
||||
websenat.de, 1
|
||||
websharks.org, 1
|
||||
websiteadvice.com.au, 1
|
||||
websiteadvice.com.au, 0
|
||||
websitedesign.bg, 1
|
||||
websiteforlease.ca, 1
|
||||
websitesdallas.com, 1
|
||||
@ -27979,7 +27969,6 @@ zojadravai.com, 1
|
||||
zoki.art, 1
|
||||
zokster.net, 1
|
||||
zolokar.xyz, 1
|
||||
zolotoy-standart.com.ua, 1
|
||||
zombiesecured.com, 1
|
||||
zomerschoen.nl, 1
|
||||
zone-produkte.de, 1
|
||||
|
@ -310,10 +310,27 @@ ClientEngine.prototype = {
|
||||
async updateKnownStaleClients() {
|
||||
this._log.debug("Updating the known stale clients");
|
||||
await this._refreshKnownStaleClients();
|
||||
for (let client of Object.values(this._store._remoteClients)) {
|
||||
if (client.fxaDeviceId && this._knownStaleFxADeviceIds.includes(client.fxaDeviceId)) {
|
||||
let localFxADeviceId = await fxAccounts.getDeviceId();
|
||||
// Process newer records first, so that if we hit a record with a device ID
|
||||
// we've seen before, we can mark it stale immediately.
|
||||
let clientList = Object.values(this._store._remoteClients).sort((a, b) =>
|
||||
b.serverLastModified - a.serverLastModified);
|
||||
let seenDeviceIds = new Set([localFxADeviceId]);
|
||||
for (let client of clientList) {
|
||||
// Clients might not have an `fxaDeviceId` if they fail the FxA
|
||||
// registration process.
|
||||
if (!client.fxaDeviceId) {
|
||||
continue;
|
||||
}
|
||||
if (this._knownStaleFxADeviceIds.includes(client.fxaDeviceId)) {
|
||||
this._log.info(`Hiding stale client ${client.id} - in known stale clients list`);
|
||||
client.stale = true;
|
||||
} else if (seenDeviceIds.has(client.fxaDeviceId)) {
|
||||
this._log.info(`Hiding stale client ${client.id}` +
|
||||
` - duplicate device id ${client.fxaDeviceId}`);
|
||||
client.stale = true;
|
||||
} else {
|
||||
seenDeviceIds.add(client.fxaDeviceId);
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -369,6 +386,7 @@ ClientEngine.prototype = {
|
||||
await this._removeRemoteClient(id);
|
||||
}
|
||||
}
|
||||
let localFxADeviceId = await fxAccounts.getDeviceId();
|
||||
// Bug 1264498: Mobile clients don't remove themselves from the clients
|
||||
// collection when the user disconnects Sync, so we mark as stale clients
|
||||
// with the same name that haven't synced in over a week.
|
||||
@ -376,7 +394,10 @@ ClientEngine.prototype = {
|
||||
// bug 1287687)
|
||||
delete this._incomingClients[this.localID];
|
||||
let names = new Set([this.localName]);
|
||||
for (let [id, serverLastModified] of Object.entries(this._incomingClients)) {
|
||||
let seenDeviceIds = new Set([localFxADeviceId]);
|
||||
let idToLastModifiedList = Object.entries(this._incomingClients)
|
||||
.sort((a, b) => b[1] - a[1]);
|
||||
for (let [id, serverLastModified] of idToLastModifiedList) {
|
||||
let record = this._store._remoteClients[id];
|
||||
// stash the server last-modified time on the record.
|
||||
record.serverLastModified = serverLastModified;
|
||||
@ -385,6 +406,9 @@ ClientEngine.prototype = {
|
||||
record.stale = true;
|
||||
}
|
||||
if (!names.has(record.name)) {
|
||||
if (record.fxaDeviceId) {
|
||||
seenDeviceIds.add(record.fxaDeviceId);
|
||||
}
|
||||
names.add(record.name);
|
||||
continue;
|
||||
}
|
||||
@ -392,6 +416,14 @@ ClientEngine.prototype = {
|
||||
if (remoteAge > STALE_CLIENT_REMOTE_AGE) {
|
||||
this._log.info(`Hiding stale client ${id} with age ${remoteAge}`);
|
||||
record.stale = true;
|
||||
continue;
|
||||
}
|
||||
if (record.fxaDeviceId && seenDeviceIds.has(record.fxaDeviceId)) {
|
||||
this._log.info(`Hiding stale client ${record.id}` +
|
||||
` - duplicate device id ${record.fxaDeviceId}`);
|
||||
record.stale = true;
|
||||
} else if (record.fxaDeviceId) {
|
||||
seenDeviceIds.add(record.fxaDeviceId);
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
|
@ -870,6 +870,68 @@ add_task(async function test_clients_not_in_fxa_list() {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
add_task(async function test_dupe_device_ids() {
|
||||
_("Ensure that we mark devices with duplicate fxaDeviceIds but older lastModified as stale.");
|
||||
|
||||
await engine._store.wipe();
|
||||
await generateNewKeys(Service.collectionKeys);
|
||||
|
||||
let server = await serverForFoo(engine);
|
||||
await SyncTestingInfrastructure(server);
|
||||
|
||||
let remoteId = Utils.makeGUID();
|
||||
let remoteId2 = Utils.makeGUID();
|
||||
let remoteDeviceId = Utils.makeGUID();
|
||||
|
||||
_("Create remote client records");
|
||||
server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({
|
||||
id: remoteId,
|
||||
name: "Remote client",
|
||||
type: "desktop",
|
||||
commands: [],
|
||||
version: "48",
|
||||
fxaDeviceId: remoteDeviceId,
|
||||
protocols: ["1.5"],
|
||||
}), Date.now() / 1000 - 30000));
|
||||
server.insertWBO("foo", "clients", new ServerWBO(remoteId2, encryptPayload({
|
||||
id: remoteId2,
|
||||
name: "Remote client",
|
||||
type: "desktop",
|
||||
commands: [],
|
||||
version: "48",
|
||||
fxaDeviceId: remoteDeviceId,
|
||||
protocols: ["1.5"],
|
||||
}), Date.now() / 1000));
|
||||
|
||||
let fxAccounts = engine.fxAccounts;
|
||||
engine.fxAccounts = {
|
||||
notifyDevices() { return Promise.resolve(true); },
|
||||
getDeviceId() { return fxAccounts.getDeviceId(); },
|
||||
getDeviceList() { return Promise.resolve([{ id: remoteDeviceId }]); }
|
||||
};
|
||||
|
||||
try {
|
||||
_("Syncing.");
|
||||
await syncClientsEngine(server);
|
||||
|
||||
ok(engine._store._remoteClients[remoteId].stale);
|
||||
ok(!engine._store._remoteClients[remoteId2].stale);
|
||||
|
||||
} finally {
|
||||
engine.fxAccounts = fxAccounts;
|
||||
await cleanup();
|
||||
|
||||
try {
|
||||
let collection = server.getCollection("foo", "clients");
|
||||
collection.remove(remoteId);
|
||||
} finally {
|
||||
await promiseStopServer(server);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
add_task(async function test_send_uri_to_client_for_display() {
|
||||
_("Ensure sendURIToClientForDisplay() sends command properly.");
|
||||
|
||||
|
44
servo/Cargo.lock
generated
44
servo/Cargo.lock
generated
@ -177,11 +177,6 @@ dependencies = [
|
||||
"syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "0.7.0"
|
||||
@ -2398,15 +2393,6 @@ dependencies = [
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pulldown-cmark"
|
||||
version = "0.0.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "push-trait"
|
||||
version = "0.6.0"
|
||||
@ -2648,7 +2634,7 @@ dependencies = [
|
||||
"smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"style 0.0.1",
|
||||
"style_traits 0.0.1",
|
||||
"swapper 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"swapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"time 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tinyfiledialogs 2.5.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"unicode-segmentation 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -3066,15 +3052,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
name = "size_of_test"
|
||||
version = "0.0.1"
|
||||
|
||||
[[package]]
|
||||
name = "skeptic"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "slab"
|
||||
version = "0.3.0"
|
||||
@ -3264,11 +3241,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swapper"
|
||||
version = "0.0.4"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"skeptic 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
@ -3346,14 +3320,6 @@ dependencies = [
|
||||
"gcc 0.3.47 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tempdir"
|
||||
version = "0.3.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tendril"
|
||||
version = "0.4.0"
|
||||
@ -3802,7 +3768,6 @@ dependencies = [
|
||||
"checksum binary-space-partition 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "88ceb0d16c4fd0e42876e298d7d3ce3780dd9ebdcbe4199816a32c77e08597ff"
|
||||
"checksum bincode 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e103c8b299b28a9c6990458b7013dc4a8356a9b854c51b9883241f5866fac36e"
|
||||
"checksum bindgen 0.29.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0c338079dafc81bef7d581f494b906603d12359c4306979eae6ca081925a4984"
|
||||
"checksum bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4f67931368edf3a9a51d29886d245f1c3db2f1ef0dcc9e35ff70341b78c10d23"
|
||||
"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d"
|
||||
"checksum bitflags 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1370e9fc2a6ae53aea8b7a5110edbd08836ed87c88736dfabccade1c2b44bff4"
|
||||
"checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5"
|
||||
@ -3980,7 +3945,6 @@ dependencies = [
|
||||
"checksum png 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b5c59debbb04e708775b004dce99d66984d5448625d63408ad502014d2880cd"
|
||||
"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||
"checksum procedural-masquerade 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c93cdc1fb30af9ddf3debc4afbdb0f35126cbd99daa229dd76cdd5349b41d989"
|
||||
"checksum pulldown-cmark 0.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1058d7bb927ca067656537eec4e02c2b4b70eaaa129664c5b90c111e20326f41"
|
||||
"checksum push-trait 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fdc13b1a53bc505b526086361221aaa612fefb9b0ecf2853f9d31f807764e004"
|
||||
"checksum quasi 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18c45c4854d6d1cf5d531db97c75880feb91c958b0720f4ec1057135fec358b3"
|
||||
"checksum quasi_codegen 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9e25fa23c044c1803f43ca59c98dac608976dd04ce799411edd58ece776d4"
|
||||
@ -4022,7 +3986,6 @@ dependencies = [
|
||||
"checksum signpost 0.1.0 (git+https://github.com/pcwalton/signpost.git)" = "<none>"
|
||||
"checksum simd 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a94d14a2ae1f1f110937de5fb69e494372560181c7e1739a097fcc2cee37ba0"
|
||||
"checksum siphasher 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0df90a788073e8d0235a67e50441d47db7c8ad9debd91cbf43736a2a92d36537"
|
||||
"checksum skeptic 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dd7d8dc1315094150052d0ab767840376335a98ac66ef313ff911cdf439a5b69"
|
||||
"checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23"
|
||||
"checksum smallbitvec 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "79b776f00dfe01df905fa3b2eaa1659522e99e3fc4a7b1334171622205c4bdcf"
|
||||
"checksum smallvec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8fcd03faf178110ab0334d74ca9631d77f94c8c11cc77fcb59538abf0025695d"
|
||||
@ -4031,7 +3994,7 @@ dependencies = [
|
||||
"checksum string_cache_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "479cde50c3539481f33906a387f2bd17c8e87cb848c35b6021d41fb81ff9b4d7"
|
||||
"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
|
||||
"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694"
|
||||
"checksum swapper 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca610b32bb8bfc5e7f705480c3a1edfeb70b6582495d343872c8bee0dcf758c"
|
||||
"checksum swapper 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e454d048db5527d000bfddb77bd072bbf3a1e2ae785f16d9bd116e07c2ab45eb"
|
||||
"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad"
|
||||
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
|
||||
"checksum synstructure 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cf318c34a2f8381a4f3d4db2c91b45bca2b1cd8cbe56caced900647be164800c"
|
||||
@ -4039,7 +4002,6 @@ dependencies = [
|
||||
"checksum syntex_errors 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "867cc5c2d7140ae7eaad2ae9e8bf39cb18a67ca651b7834f88d46ca98faadb9c"
|
||||
"checksum syntex_pos 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "13ad4762fe52abc9f4008e85c4fb1b1fe3aa91ccb99ff4826a439c7c598e1047"
|
||||
"checksum syntex_syntax 0.58.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6e0e4dbae163dd98989464c23dd503161b338790640e11537686f2ef0f25c791"
|
||||
"checksum tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "87974a6f5c1dfb344d733055601650059a3363de2a6104819293baff662132d6"
|
||||
"checksum tendril 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9de21546595a0873061940d994bbbc5c35f024ae4fd61ec5c5b159115684f508"
|
||||
"checksum term 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d168af3930b369cfe245132550579d47dfd873d69470755a19c2c6568dbbd989"
|
||||
"checksum term_size 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "07b6c1ac5b3fffd75073276bca1ceed01f67a28537097a2a9539e116e50fb21a"
|
||||
|
@ -1,7 +1,6 @@
|
||||
use hash_map::HashMap;
|
||||
use std::borrow::Borrow;
|
||||
use std::hash::{BuildHasher, Hash};
|
||||
use table::SafeHash;
|
||||
|
||||
use FailedAllocationError;
|
||||
|
||||
@ -12,9 +11,9 @@ const CANARY: usize = 0x42cafe9942cafe99;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
enum JournalEntry {
|
||||
Insert(SafeHash),
|
||||
GetOrInsertWith(SafeHash),
|
||||
Remove(SafeHash),
|
||||
Insert(usize),
|
||||
GOIW(usize),
|
||||
Remove(usize),
|
||||
DidClear(usize),
|
||||
}
|
||||
|
||||
@ -37,17 +36,23 @@ impl<K: Hash + Eq, V, S: BuildHasher> DiagnosticHashMap<K, V, S>
|
||||
&self.map
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[inline(never)]
|
||||
pub fn begin_mutation(&mut self) {
|
||||
self.map.verify();
|
||||
assert!(self.readonly);
|
||||
self.readonly = false;
|
||||
self.verify();
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
#[inline(never)]
|
||||
pub fn end_mutation(&mut self) {
|
||||
self.map.verify();
|
||||
assert!(!self.readonly);
|
||||
self.readonly = true;
|
||||
self.verify();
|
||||
}
|
||||
|
||||
fn verify(&self) {
|
||||
let mut position = 0;
|
||||
let mut bad_canary: Option<(usize, *const usize)> = None;
|
||||
for (_,v) in self.map.iter() {
|
||||
@ -105,7 +110,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> DiagnosticHashMap<K, V, S>
|
||||
default: F
|
||||
) -> Result<&mut V, FailedAllocationError> {
|
||||
assert!(!self.readonly);
|
||||
self.journal.push(JournalEntry::GetOrInsertWith(self.map.make_hash(&key)));
|
||||
self.journal.push(JournalEntry::GOIW(self.map.make_hash(&key).inspect()));
|
||||
let entry = self.map.try_entry(key)?;
|
||||
Ok(&mut entry.or_insert_with(|| (CANARY, default())).1)
|
||||
}
|
||||
@ -113,7 +118,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> DiagnosticHashMap<K, V, S>
|
||||
#[inline(always)]
|
||||
pub fn try_insert(&mut self, k: K, v: V) -> Result<Option<V>, FailedAllocationError> {
|
||||
assert!(!self.readonly);
|
||||
self.journal.push(JournalEntry::Insert(self.map.make_hash(&k)));
|
||||
self.journal.push(JournalEntry::Insert(self.map.make_hash(&k).inspect()));
|
||||
let old = self.map.try_insert(k, (CANARY, v))?;
|
||||
Ok(old.map(|x| x.1))
|
||||
}
|
||||
@ -124,7 +129,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> DiagnosticHashMap<K, V, S>
|
||||
Q: Hash + Eq
|
||||
{
|
||||
assert!(!self.readonly);
|
||||
self.journal.push(JournalEntry::Remove(self.map.make_hash(k)));
|
||||
self.journal.push(JournalEntry::Remove(self.map.make_hash(k).inspect()));
|
||||
self.map.remove(k).map(|x| x.1)
|
||||
}
|
||||
|
||||
@ -141,19 +146,22 @@ impl<K: Hash + Eq, V, S: BuildHasher> DiagnosticHashMap<K, V, S>
|
||||
|
||||
#[inline(never)]
|
||||
fn report_corruption(
|
||||
&mut self,
|
||||
&self,
|
||||
canary: usize,
|
||||
canary_addr: *const usize,
|
||||
position: usize
|
||||
) {
|
||||
use ::std::ffi::CString;
|
||||
let key = b"HashMapJournal\0";
|
||||
let value = CString::new(format!("{:?}", self.journal)).unwrap();
|
||||
unsafe {
|
||||
Gecko_AddBufferToCrashReport(
|
||||
self.journal.as_ptr() as *const _,
|
||||
self.journal.len() * ::std::mem::size_of::<JournalEntry>(),
|
||||
Gecko_AnnotateCrashReport(
|
||||
key.as_ptr() as *const ::std::os::raw::c_char,
|
||||
value.as_ptr(),
|
||||
);
|
||||
}
|
||||
panic!(
|
||||
"HashMap Corruption (sz={}, cap={}, pairsz={}, cnry={:#x}, pos={}, base_addr={:?}, cnry_addr={:?})",
|
||||
"HashMap Corruption (sz={}, cap={}, pairsz={}, cnry={:#x}, pos={}, base_addr={:?}, cnry_addr={:?}, jrnl_len={})",
|
||||
self.map.len(),
|
||||
self.map.raw_capacity(),
|
||||
::std::mem::size_of::<(K, (usize, V))>(),
|
||||
@ -161,6 +169,7 @@ impl<K: Hash + Eq, V, S: BuildHasher> DiagnosticHashMap<K, V, S>
|
||||
position,
|
||||
self.map.raw_buffer(),
|
||||
canary_addr,
|
||||
self.journal.len(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -205,6 +214,6 @@ impl<K: Hash + Eq, V, S: BuildHasher> Drop for DiagnosticHashMap<K, V, S>
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
pub fn Gecko_AddBufferToCrashReport(addr: *const ::std::os::raw::c_void,
|
||||
bytes: usize);
|
||||
pub fn Gecko_AnnotateCrashReport(key_str: *const ::std::os::raw::c_char,
|
||||
value_str: *const ::std::os::raw::c_char);
|
||||
}
|
||||
|
@ -694,6 +694,12 @@ impl<K, V, S> HashMap<K, V, S>
|
||||
self.table.raw_buffer()
|
||||
}
|
||||
|
||||
/// Verify that the table metadata is internally consistent.
|
||||
#[inline]
|
||||
pub fn verify(&self) {
|
||||
self.table.verify();
|
||||
}
|
||||
|
||||
/// Reserves capacity for at least `additional` more elements to be inserted
|
||||
/// in the `HashMap`. The collection may reserve more space to avoid
|
||||
/// frequent reallocations.
|
||||
|
@ -247,13 +247,21 @@ impl<K, V> RawBucket<K, V> {
|
||||
(self.hash(), self.pair())
|
||||
}
|
||||
|
||||
fn assert_bounds(&self, bytes_allocated: usize) {
|
||||
fn assert_bounds(&self, bytes_allocated: usize, size: Option<usize>) {
|
||||
let base = self.hash_start as *mut u8;
|
||||
let (h, p) = unsafe { self.hash_pair() };
|
||||
assert!((h as *mut u8) < (p as *mut u8), "HashMap Corruption - hash offset not below pair offset");
|
||||
let end = unsafe { p.offset(1) } as *mut u8;
|
||||
assert!(end > base, "HashMap Corruption - end={:?}, base={:?}", end, base);
|
||||
assert!(end <= unsafe { base.offset(bytes_allocated as isize) }, "HashMap Corruption - end={:?}, base={:?}", end, base);
|
||||
assert!(end > base, "HashMap Corruption - end={:?}, base={:?}, idx={}, alloc={}, size={:?}", end, base, self.idx, bytes_allocated, size);
|
||||
assert!(
|
||||
end <= unsafe { base.offset(bytes_allocated as isize) },
|
||||
"HashMap Corruption - end={:?}, base={:?}, idx={}, alloc={}, size={:?}",
|
||||
end,
|
||||
base,
|
||||
self.idx,
|
||||
bytes_allocated,
|
||||
size,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -431,13 +439,13 @@ impl<K, V, M: Deref<Target = RawTable<K, V>>> Bucket<K, V, M> {
|
||||
/// Modifies the bucket in place to make it point to the next slot.
|
||||
pub fn next(&mut self) {
|
||||
self.raw.idx = self.raw.idx.wrapping_add(1) & self.table.capacity_mask;
|
||||
self.raw.assert_bounds(self.table.bytes_allocated);
|
||||
self.raw.assert_bounds(self.table.bytes_allocated, None);
|
||||
}
|
||||
|
||||
/// Modifies the bucket in place to make it point to the previous slot.
|
||||
pub fn prev(&mut self) {
|
||||
self.raw.idx = self.raw.idx.wrapping_sub(1) & self.table.capacity_mask;
|
||||
self.raw.assert_bounds(self.table.bytes_allocated);
|
||||
self.raw.assert_bounds(self.table.bytes_allocated, None);
|
||||
}
|
||||
}
|
||||
|
||||
@ -813,6 +821,7 @@ impl<K, V> RawTable<K, V> {
|
||||
}
|
||||
|
||||
fn raw_bucket_at(&self, index: usize) -> RawBucket<K, V> {
|
||||
self.verify();
|
||||
let hashes_size = self.capacity() * size_of::<HashUint>();
|
||||
let pairs_size = self.capacity() * size_of::<(K, V)>();
|
||||
|
||||
@ -833,7 +842,7 @@ impl<K, V> RawTable<K, V> {
|
||||
}
|
||||
};
|
||||
|
||||
bucket.assert_bounds(self.bytes_allocated);
|
||||
bucket.assert_bounds(self.bytes_allocated, Some(self.size));
|
||||
bucket
|
||||
}
|
||||
|
||||
@ -843,6 +852,20 @@ impl<K, V> RawTable<K, V> {
|
||||
self.hashes.ptr() as *const u8
|
||||
}
|
||||
|
||||
/// Verify that the table metadata is internally consistent.
|
||||
#[inline]
|
||||
pub fn verify(&self) {
|
||||
assert!(
|
||||
self.capacity() == 0 || self.capacity().is_power_of_two(),
|
||||
"HashMap Corruption: mask={}, sz={}, alloc={}", self.capacity_mask, self.size, self.bytes_allocated,
|
||||
);
|
||||
assert_eq!(
|
||||
self.capacity() * (size_of::<usize>() + size_of::<(K, V)>()),
|
||||
self.bytes_allocated,
|
||||
"HashMap Corruption: mask={}, sz={}, alloc={}", self.capacity_mask, self.size, self.bytes_allocated,
|
||||
);
|
||||
}
|
||||
|
||||
/// Creates a new raw table from a given capacity. All buckets are
|
||||
/// initially empty.
|
||||
pub fn new(capacity: usize) -> Result<RawTable<K, V>, FailedAllocationError> {
|
||||
@ -933,7 +956,7 @@ impl<K, V> RawTable<K, V> {
|
||||
}
|
||||
}
|
||||
raw.idx = raw.idx.checked_sub(1).unwrap();
|
||||
raw.assert_bounds(self.bytes_allocated);
|
||||
raw.assert_bounds(self.bytes_allocated, Some(self.size));
|
||||
}
|
||||
}
|
||||
|
||||
@ -993,12 +1016,12 @@ impl<'a, K, V> Iterator for RawBuckets<'a, K, V> {
|
||||
self.elems_left = self.elems_left.checked_sub(1).unwrap();
|
||||
if self.elems_left != 0 {
|
||||
self.raw.as_mut().unwrap().idx += 1;
|
||||
self.raw.as_ref().unwrap().assert_bounds(self.bytes_allocated);
|
||||
self.raw.as_ref().unwrap().assert_bounds(self.bytes_allocated, None);
|
||||
}
|
||||
return Some(item);
|
||||
}
|
||||
self.raw.as_mut().unwrap().idx += 1;
|
||||
self.raw.as_ref().unwrap().assert_bounds(self.bytes_allocated);
|
||||
self.raw.as_ref().unwrap().assert_bounds(self.bytes_allocated, None);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1207,9 +1230,9 @@ impl<K: Clone, V: Clone> Clone for RawTable<K, V> {
|
||||
}
|
||||
|
||||
buckets.idx += 1;
|
||||
buckets.assert_bounds(self.bytes_allocated);
|
||||
buckets.assert_bounds(self.bytes_allocated, None);
|
||||
new_buckets.idx += 1;
|
||||
new_buckets.assert_bounds(new_ht.bytes_allocated);
|
||||
new_buckets.assert_bounds(new_ht.bytes_allocated, None);
|
||||
}
|
||||
|
||||
new_ht.size = self.size();
|
||||
|
@ -84,7 +84,7 @@ servo_url = {path = "../url"}
|
||||
smallvec = "0.4"
|
||||
style = {path = "../style"}
|
||||
style_traits = {path = "../style_traits"}
|
||||
swapper = "0.0.4"
|
||||
swapper = "0.1"
|
||||
time = "0.1.12"
|
||||
unicode-segmentation = "1.1.0"
|
||||
url = {version = "1.2", features = ["heap_size", "query_encoding"]}
|
||||
|
@ -389,11 +389,11 @@ impl<T: ?Sized> Drop for Arc<T> {
|
||||
|
||||
impl<T: ?Sized + PartialEq> PartialEq for Arc<T> {
|
||||
fn eq(&self, other: &Arc<T>) -> bool {
|
||||
*(*self) == *(*other)
|
||||
Self::ptr_eq(self, other) || *(*self) == *(*other)
|
||||
}
|
||||
|
||||
fn ne(&self, other: &Arc<T>) -> bool {
|
||||
*(*self) != *(*other)
|
||||
!Self::ptr_eq(self, other) && *(*self) != *(*other)
|
||||
}
|
||||
}
|
||||
impl<T: ?Sized + PartialOrd> PartialOrd for Arc<T> {
|
||||
|
@ -2944,7 +2944,9 @@ extern "C" {
|
||||
primary_style: ServoStyleContextBorrowed);
|
||||
}
|
||||
extern "C" {
|
||||
pub fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed,
|
||||
pub fn Servo_HasAuthorSpecifiedRules(style: ServoStyleContextBorrowed,
|
||||
element: RawGeckoElementBorrowed,
|
||||
pseudo_type: CSSPseudoElementType,
|
||||
rule_type_mask: u32,
|
||||
author_colors_allowed: bool) -> bool;
|
||||
}
|
||||
|
@ -7,6 +7,8 @@
|
||||
//! The rule tree.
|
||||
|
||||
use applicable_declarations::ApplicableDeclarationList;
|
||||
#[cfg(feature = "gecko")]
|
||||
use gecko::selector_parser::PseudoElement;
|
||||
#[cfg(feature = "servo")]
|
||||
use heapsize::HeapSizeOf;
|
||||
#[cfg(feature = "gecko")]
|
||||
@ -1077,6 +1079,7 @@ impl StrongRuleNode {
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn has_author_specified_rules<E>(&self,
|
||||
mut element: E,
|
||||
mut pseudo: Option<PseudoElement>,
|
||||
guards: &StylesheetGuards,
|
||||
rule_type_mask: u32,
|
||||
author_colors_allowed: bool)
|
||||
@ -1291,14 +1294,20 @@ impl StrongRuleNode {
|
||||
if !have_explicit_ua_inherit { break }
|
||||
|
||||
// Continue to the parent element and search for the inherited properties.
|
||||
element = match element.inheritance_parent() {
|
||||
Some(parent) => parent,
|
||||
None => break
|
||||
};
|
||||
if let Some(pseudo) = pseudo.take() {
|
||||
if pseudo.inherits_from_default_values() {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
element = match element.inheritance_parent() {
|
||||
Some(parent) => parent,
|
||||
None => break
|
||||
};
|
||||
|
||||
let parent_data = element.mutate_data().unwrap();
|
||||
let parent_rule_node = parent_data.styles.primary().rules().clone();
|
||||
element_rule_node = Cow::Owned(parent_rule_node);
|
||||
let parent_data = element.mutate_data().unwrap();
|
||||
let parent_rule_node = parent_data.styles.primary().rules().clone();
|
||||
element_rule_node = Cow::Owned(parent_rule_node);
|
||||
}
|
||||
|
||||
properties = inherited_properties;
|
||||
}
|
||||
|
@ -373,7 +373,7 @@ impl CalcNode {
|
||||
ret.em = Some(ret.em.unwrap_or(0.) + em * factor);
|
||||
}
|
||||
FontRelativeLength::Ex(ex) => {
|
||||
ret.ex = Some(ret.em.unwrap_or(0.) + ex * factor);
|
||||
ret.ex = Some(ret.ex.unwrap_or(0.) + ex * factor);
|
||||
}
|
||||
FontRelativeLength::Ch(ch) => {
|
||||
ret.ch = Some(ret.ch.unwrap_or(0.) + ch * factor);
|
||||
|
@ -1863,26 +1863,24 @@ pub extern "C" fn Servo_SetExplicitStyle(element: RawGeckoElementBorrowed,
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub extern "C" fn Servo_HasAuthorSpecifiedRules(element: RawGeckoElementBorrowed,
|
||||
pub extern "C" fn Servo_HasAuthorSpecifiedRules(style: ServoStyleContextBorrowed,
|
||||
element: RawGeckoElementBorrowed,
|
||||
pseudo_type: CSSPseudoElementType,
|
||||
rule_type_mask: u32,
|
||||
author_colors_allowed: bool)
|
||||
-> bool
|
||||
{
|
||||
let element = GeckoElement(element);
|
||||
|
||||
let data =
|
||||
element.borrow_data()
|
||||
.expect("calling Servo_HasAuthorSpecifiedRules on an unstyled element");
|
||||
|
||||
let primary_style = data.styles.primary();
|
||||
let pseudo = PseudoElement::from_pseudo_type(pseudo_type);
|
||||
|
||||
let guard = (*GLOBAL_STYLE_DATA).shared_lock.read();
|
||||
let guards = StylesheetGuards::same(&guard);
|
||||
|
||||
primary_style.rules().has_author_specified_rules(element,
|
||||
&guards,
|
||||
rule_type_mask,
|
||||
author_colors_allowed)
|
||||
style.rules().has_author_specified_rules(element,
|
||||
pseudo,
|
||||
&guards,
|
||||
rule_type_mask,
|
||||
author_colors_allowed)
|
||||
}
|
||||
|
||||
fn get_pseudo_style(
|
||||
|
@ -66,6 +66,8 @@ talos:
|
||||
- talos-tp5o
|
||||
- talos-perf-reftest
|
||||
- talos-perf-reftest-singletons
|
||||
- talos-tp6
|
||||
- talos-tp6-stylo-threads
|
||||
|
||||
awsy:
|
||||
- awsy
|
||||
@ -99,9 +101,9 @@ reftest-stylo:
|
||||
- reftest-stylo
|
||||
|
||||
qr-talos:
|
||||
# - talos-chrome # fails with layers-free
|
||||
- talos-chrome
|
||||
- talos-dromaeojs
|
||||
# - talos-g1 # fails with layers-free
|
||||
- talos-g1
|
||||
# - talos-g2 # doesn't work with QR yet
|
||||
- talos-g3
|
||||
- talos-g4
|
||||
@ -144,6 +146,7 @@ linux-talos-stylo-disabled:
|
||||
- talos-tp5o-stylo-disabled
|
||||
- talos-perf-reftest-stylo-disabled
|
||||
- talos-perf-reftest-singletons-stylo-disabled
|
||||
- talos-tp6-stylo-disabled
|
||||
|
||||
windows-reftest-gpu:
|
||||
- reftest-gpu
|
||||
|
@ -1025,31 +1025,19 @@ reftest-gpu:
|
||||
description: "Reftest GPU run"
|
||||
suite: reftest/reftest-gpu
|
||||
treeherder-symbol: tc-R(Rg)
|
||||
chunks:
|
||||
by-test-platform:
|
||||
# Remove special casing when debug isn't using BBB anymore
|
||||
windows7-32.*/debug: 1
|
||||
default: 8
|
||||
chunks: 8
|
||||
run-on-projects:
|
||||
by-test-platform:
|
||||
windows10.*: []
|
||||
windows8-64.*: []
|
||||
default: built-projects
|
||||
worker-type:
|
||||
by-test-platform:
|
||||
windows7-32.*/debug: buildbot-bridge/buildbot-bridge
|
||||
default: null
|
||||
instance-size: default
|
||||
virtualization: virtual-with-gpu
|
||||
max-run-time: 3600
|
||||
mozharness:
|
||||
script: desktop_unittest.py
|
||||
no-read-buildbot-config: true
|
||||
chunked:
|
||||
# Remove special casing when debug isn't using BBB anymore
|
||||
by-test-platform:
|
||||
windows7-32.*/debug: false
|
||||
default: true
|
||||
chunked: true
|
||||
config:
|
||||
by-test-platform:
|
||||
windows.*:
|
||||
@ -1757,9 +1745,9 @@ talos-tp6:
|
||||
treeherder-symbol: tc-T(tp6)
|
||||
run-on-projects:
|
||||
by-test-platform:
|
||||
windows.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try', 'date']
|
||||
windows.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
|
||||
macosx.*: ['mozilla-beta', 'autoland', 'try']
|
||||
default: []
|
||||
default: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
|
||||
max-run-time: 3600
|
||||
mozharness:
|
||||
script: talos_script.py
|
||||
@ -1787,7 +1775,7 @@ talos-tp6-stylo-disabled:
|
||||
by-test-platform:
|
||||
windows.*: ['mozilla-beta', 'mozilla-central', 'try']
|
||||
macosx.*: ['mozilla-beta', 'mozilla-central', 'try']
|
||||
default: []
|
||||
default: ['mozilla-beta', 'mozilla-central', 'try']
|
||||
max-run-time: 3600
|
||||
mozharness:
|
||||
script: talos_script.py
|
||||
@ -1813,7 +1801,7 @@ talos-tp6-stylo-threads:
|
||||
by-test-platform:
|
||||
windows.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
|
||||
macosx.*: ['mozilla-beta', 'autoland', 'try']
|
||||
default: []
|
||||
default: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
|
||||
max-run-time: 3600
|
||||
mozharness:
|
||||
script: talos_script.py
|
||||
@ -1836,7 +1824,7 @@ talos-xperf:
|
||||
treeherder-symbol: tc-T(x)
|
||||
run-on-projects:
|
||||
by-test-platform:
|
||||
windows7-32.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try', 'date']
|
||||
windows7-32.*: ['mozilla-beta', 'mozilla-central', 'mozilla-inbound', 'autoland', 'try']
|
||||
default: []
|
||||
max-run-time: 3600
|
||||
mozharness:
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2011-2014 Software Freedom Conservancy
|
||||
// Copyright 2011-2017 Software Freedom Conservancy
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
|
@ -417,12 +417,9 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
|
||||
self.info("Skipping: mitmproxy is not required")
|
||||
return
|
||||
|
||||
# tp6 is supported in production only on win and macosx
|
||||
os_name = self.platform_name()
|
||||
if 'win' not in os_name and os_name != 'macosx':
|
||||
self.fatal("Aborting: this test is not supported on this platform.")
|
||||
|
||||
# on windows we need to install a pytyon 3 virtual env; on macosx we
|
||||
# on windows we need to install a pytyon 3 virtual env; on macosx and linux we
|
||||
# use a mitmdump pre-built binary that doesn't need an external python 3
|
||||
if 'win' in os_name:
|
||||
# setup python 3.x virtualenv
|
||||
@ -457,16 +454,20 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
|
||||
self.py3_install_modules(modules=['mitmproxy'])
|
||||
self.mitmdump = os.path.join(self.py3_path_to_executables(), 'mitmdump')
|
||||
else:
|
||||
# on macosx we use a prebuilt mitmproxy release binary
|
||||
# on macosx and linux64 we use a prebuilt mitmproxy release binary
|
||||
mitmproxy_path = os.path.join(self.talos_path, 'talos', 'mitmproxy')
|
||||
self.mitmdump = os.path.join(mitmproxy_path, 'mitmdump')
|
||||
if not os.path.exists(self.mitmdump):
|
||||
# download the mitmproxy release binary; will be overridden by the --no-download
|
||||
if '--no-download' not in self.config['talos_extra_options']:
|
||||
self.query_mitmproxy_rel_bin('osx')
|
||||
if 'osx' in self.platform_name():
|
||||
_platform = 'osx'
|
||||
else:
|
||||
_platform = 'linux64'
|
||||
self.query_mitmproxy_rel_bin(_platform)
|
||||
if self.mitmproxy_rel_bin is None:
|
||||
self.fatal("Aborting: mitmproxy_release_bin_osx not found in talos.json")
|
||||
self.download_mitmproxy_binary('osx')
|
||||
self.download_mitmproxy_binary(_platform)
|
||||
else:
|
||||
self.info("Not downloading mitmproxy rel binary because no-download was specified")
|
||||
self.info('The mitmdump macosx binary is found at: %s' % self.mitmdump)
|
||||
@ -487,15 +488,18 @@ class Talos(TestingMixin, MercurialScript, BlobUploadMixin, TooltoolMixin,
|
||||
dest = os.path.join(self.talos_path, 'talos', 'mitmproxy')
|
||||
_manifest = "mitmproxy-rel-bin-%s.manifest" % platform
|
||||
manifest_file = os.path.join(self.talos_path, 'talos', 'mitmproxy', _manifest)
|
||||
self.tooltool_fetch(
|
||||
manifest_file,
|
||||
output_dir=dest,
|
||||
cache=self.config.get('tooltool_cache')
|
||||
)
|
||||
archive = os.path.join(dest, self.mitmproxy_rel_bin)
|
||||
tar = self.query_exe('tar')
|
||||
unzip_cmd = [tar, '-xvzf', archive, '-C', dest]
|
||||
self.run_command(unzip_cmd, halt_on_failure=True)
|
||||
|
||||
if platform in ['osx', 'linux64']:
|
||||
self.tooltool_fetch(
|
||||
manifest_file,
|
||||
output_dir=dest,
|
||||
cache=self.config.get('tooltool_cache')
|
||||
)
|
||||
|
||||
archive = os.path.join(dest, self.mitmproxy_rel_bin)
|
||||
tar = self.query_exe('tar')
|
||||
unzip_cmd = [tar, '-xvzf', archive, '-C', dest]
|
||||
self.run_command(unzip_cmd, halt_on_failure=True)
|
||||
|
||||
def query_mitmproxy_recording_set(self):
|
||||
"""Mitmproxy requires external playback archives to be downloaded and extracted"""
|
||||
|
@ -119,6 +119,7 @@
|
||||
"tp6-e10s": {
|
||||
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
|
||||
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
|
||||
"mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
|
||||
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
|
||||
"talos_options": [
|
||||
"--mitmproxy",
|
||||
@ -129,6 +130,7 @@
|
||||
"tp6-stylo-disabled-e10s": {
|
||||
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
|
||||
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
|
||||
"mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
|
||||
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
|
||||
"talos_options": [
|
||||
"--disable-stylo",
|
||||
@ -140,6 +142,7 @@
|
||||
"tp6-stylo-threads-e10s": {
|
||||
"tests": ["tp6_google", "tp6_youtube", "tp6_amazon", "tp6_facebook"],
|
||||
"mitmproxy_release_bin_osx": "mitmproxy-2.0.2-osx.tar.gz",
|
||||
"mitmproxy_release_bin_linux64": "mitmproxy-2.0.2-linux.tar.gz",
|
||||
"mitmproxy_recording_set": "mitmproxy-recording-set-win10.zip",
|
||||
"talos_options": [
|
||||
"--stylo-threads=1",
|
||||
|
@ -0,0 +1,9 @@
|
||||
[
|
||||
{
|
||||
"filename": "mitmproxy-2.0.2-linux.tar.gz",
|
||||
"size": 48997542,
|
||||
"digest": "b032e04b8763206a19f80b78062efa59dc901ad32fd8d6cf2d20e22744711352da61e75d93a0d93d645179153534f72a154f73432837db415c9b0cd9d981f012",
|
||||
"algorithm": "sha512",
|
||||
"unpack": false
|
||||
}
|
||||
]
|
@ -132,13 +132,10 @@ def start_mitmproxy_playback(mitmdump_path,
|
||||
sys.path.insert(1, mitmdump_path)
|
||||
# mitmproxy needs some DLL's that are a part of Firefox itself, so add to path
|
||||
env["PATH"] = os.path.dirname(browser_path) + ";" + env["PATH"]
|
||||
elif mozinfo.os == 'mac':
|
||||
else:
|
||||
# mac and linux
|
||||
param2 = param + ' ' + ' '.join(mitmproxy_recordings)
|
||||
env["PATH"] = os.path.dirname(browser_path)
|
||||
else:
|
||||
# TODO: support other platforms, Bug 1366355
|
||||
LOG.error('Aborting: talos mitmproxy is currently only supported on Windows and Mac')
|
||||
sys.exit()
|
||||
|
||||
command = [mitmdump_path, '-k', '-s', param2]
|
||||
|
||||
@ -160,10 +157,10 @@ def start_mitmproxy_playback(mitmdump_path,
|
||||
def stop_mitmproxy_playback(mitmproxy_proc):
|
||||
"""Stop the mitproxy server playback"""
|
||||
LOG.info("Stopping mitmproxy playback, klling process %d" % mitmproxy_proc.pid)
|
||||
if mozinfo.os == 'mac':
|
||||
mitmproxy_proc.terminate()
|
||||
else:
|
||||
if mozinfo.os == 'win':
|
||||
mitmproxy_proc.kill()
|
||||
else:
|
||||
mitmproxy_proc.terminate()
|
||||
time.sleep(10)
|
||||
if mitmproxy_proc.pid in psutil.pids():
|
||||
# I *think* we can still continue, as process will be automatically
|
||||
|
@ -84,7 +84,7 @@ var observer = {
|
||||
return;
|
||||
}
|
||||
|
||||
log("onLocationChange handled:", aLocation.spec, aWebProgress.DOMWindow.document);
|
||||
log("onLocationChange handled:", aLocation.displaySpec, aWebProgress.DOMWindow.document);
|
||||
|
||||
LoginManagerContent._onNavigation(aWebProgress.DOMWindow.document);
|
||||
},
|
||||
@ -1387,7 +1387,7 @@ var LoginUtils = {
|
||||
return "javascript:";
|
||||
|
||||
// Build this manually instead of using prePath to avoid including the userPass portion.
|
||||
realm = uri.scheme + "://" + uri.hostPort;
|
||||
realm = uri.scheme + "://" + uri.displayHostPort;
|
||||
} catch (e) {
|
||||
// bug 159484 - disallow url types that don't support a hostPort.
|
||||
// (although we handle "javascript:..." as a special case above.)
|
||||
|
@ -93,7 +93,7 @@ var LoginManagerContextMenu = {
|
||||
*/
|
||||
_findLogins(documentURI) {
|
||||
let searchParams = {
|
||||
hostname: documentURI.prePath,
|
||||
hostname: documentURI.displayPrePath,
|
||||
schemeUpgrades: LoginHelper.schemeUpgrades,
|
||||
};
|
||||
let logins = LoginHelper.searchLoginsWithObject(searchParams);
|
||||
@ -101,7 +101,7 @@ var LoginManagerContextMenu = {
|
||||
"scheme",
|
||||
"timePasswordChanged",
|
||||
];
|
||||
logins = LoginHelper.dedupeLogins(logins, ["username", "password"], resolveBy, documentURI.prePath);
|
||||
logins = LoginHelper.dedupeLogins(logins, ["username", "password"], resolveBy, documentURI.displayPrePath);
|
||||
|
||||
// Sort logins in alphabetical order and by date.
|
||||
logins.sort((loginA, loginB) => {
|
||||
@ -162,7 +162,7 @@ var LoginManagerContextMenu = {
|
||||
_fillTargetField(login, inputElement, browser, documentURI) {
|
||||
LoginManagerParent.fillForm({
|
||||
browser,
|
||||
loginFormOrigin: documentURI.prePath,
|
||||
loginFormOrigin: documentURI.displayPrePath,
|
||||
login,
|
||||
inputElement,
|
||||
}).catch(Cu.reportError);
|
||||
|
@ -362,7 +362,7 @@ LoginManager.prototype = {
|
||||
while (enumerator.hasMoreElements()) {
|
||||
let perm = enumerator.getNext();
|
||||
if (perm.type == PERMISSION_SAVE_LOGINS && perm.capability == Services.perms.DENY_ACTION) {
|
||||
disabledHosts.push(perm.principal.URI.prePath);
|
||||
disabledHosts.push(perm.principal.URI.displayPrePath);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1578,7 +1578,7 @@ LoginManagerPrompter.prototype = {
|
||||
uri = Services.io.newURI(aURI);
|
||||
}
|
||||
|
||||
return uri.scheme + "://" + uri.hostPort;
|
||||
return uri.scheme + "://" + uri.displayHostPort;
|
||||
},
|
||||
|
||||
|
||||
|
@ -467,7 +467,7 @@ LoginManagerStorage_mozStorage.prototype = {
|
||||
if (aOptions.schemeUpgrades && (valueURI = Services.io.newURI(value)) &&
|
||||
valueURI.scheme == "https") {
|
||||
condition += ` OR ${field} = :http${field}`;
|
||||
params["http" + field] = "http://" + valueURI.hostPort;
|
||||
params["http" + field] = "http://" + valueURI.displayHostPort;
|
||||
}
|
||||
} catch (ex) {
|
||||
// newURI will throw for some values (e.g. chrome://FirefoxAccounts)
|
||||
|
@ -154,7 +154,7 @@ add_task(async function test_storage_setLoginSavingEnabled_nonascii_IDN_is_suppo
|
||||
await LoginTestUtils.reloadData();
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
|
||||
|
||||
LoginTestUtils.clearData();
|
||||
|
||||
@ -163,7 +163,7 @@ add_task(async function test_storage_setLoginSavingEnabled_nonascii_IDN_is_suppo
|
||||
await LoginTestUtils.reloadData();
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
|
||||
|
||||
LoginTestUtils.clearData();
|
||||
});
|
||||
|
@ -135,6 +135,9 @@ function serializeNode(aNode, aIsLivemark) {
|
||||
data.title = aNode.title;
|
||||
data.id = aNode.itemId;
|
||||
data.livemark = aIsLivemark;
|
||||
// Add an instanceId so we can tell which instance of an FF session the data
|
||||
// is coming from.
|
||||
data.instanceId = PlacesUtils.instanceId;
|
||||
|
||||
let guid = aNode.bookmarkGuid;
|
||||
if (guid) {
|
||||
@ -2015,6 +2018,11 @@ XPCOMUtils.defineLazyGetter(this, "bundle", function() {
|
||||
createBundle(PLACES_STRING_BUNDLE_URI);
|
||||
});
|
||||
|
||||
// This is just used as a reasonably-random value for copy & paste / drag operations.
|
||||
XPCOMUtils.defineLazyGetter(PlacesUtils, "instanceId", () => {
|
||||
return PlacesUtils.history.makeGuid();
|
||||
});
|
||||
|
||||
/**
|
||||
* Setup internal databases for closing properly during shutdown.
|
||||
*
|
||||
|
@ -105,6 +105,13 @@ const BackgroundPageThumbs = {
|
||||
* @return {Promise} A Promise that resolves when this task completes
|
||||
*/
|
||||
async captureIfMissing(url, options = {}) {
|
||||
// Short circuit this function if pref is enabled, or else we leak observers.
|
||||
// See Bug 1400562
|
||||
if (!PageThumbs._prefEnabled()) {
|
||||
if (options.onDone)
|
||||
options.onDone(url);
|
||||
return url;
|
||||
}
|
||||
// The fileExistsForURL call is an optimization, potentially but unlikely
|
||||
// incorrect, and no big deal when it is. After the capture is done, we
|
||||
// atomically test whether the file exists before writing it.
|
||||
|
@ -435,16 +435,20 @@ HashCompleterRequest.prototype = {
|
||||
let loadFlags = Ci.nsIChannel.INHIBIT_CACHING |
|
||||
Ci.nsIChannel.LOAD_BYPASS_CACHE;
|
||||
|
||||
this.actualGethashUrl = this.gethashUrl;
|
||||
this.request = {
|
||||
url: this.gethashUrl,
|
||||
body: ""
|
||||
};
|
||||
|
||||
if (this.isV4) {
|
||||
// As per spec, we add the request payload to the gethash url.
|
||||
this.actualGethashUrl += "&$req=" + this.buildRequestV4();
|
||||
this.request.url += "&$req=" + this.buildRequestV4();
|
||||
}
|
||||
|
||||
log("actualGethashUrl: " + this.actualGethashUrl);
|
||||
log("actualGethashUrl: " + this.request.url);
|
||||
|
||||
let channel = NetUtil.newChannel({
|
||||
uri: this.actualGethashUrl,
|
||||
uri: this.request.url,
|
||||
loadUsingSystemPrincipal: true
|
||||
});
|
||||
channel.loadFlags = loadFlags;
|
||||
@ -783,7 +787,7 @@ HashCompleterRequest.prototype = {
|
||||
add(this.telemetryProvider, httpStatusToBucket(httpStatus));
|
||||
if (httpStatus == 400) {
|
||||
dump("Safe Browsing server returned a 400 during completion: request= " +
|
||||
this.actualGethashUrl + "\n");
|
||||
this.request.url + ",payload= " + this.request.body + "\n");
|
||||
}
|
||||
|
||||
Services.telemetry.getKeyedHistogramById("URLCLASSIFIER_COMPLETE_TIMEOUT2").
|
||||
|
@ -113,9 +113,7 @@ nsUrlClassifierStreamUpdater::DownloadDone()
|
||||
|
||||
mPendingUpdates.Clear();
|
||||
mDownloadError = false;
|
||||
mSuccessCallback = nullptr;
|
||||
mUpdateErrorCallback = nullptr;
|
||||
mDownloadErrorCallback = nullptr;
|
||||
mCurrentRequest = nullptr;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -286,17 +284,13 @@ nsUrlClassifierStreamUpdater::DownloadUpdates(
|
||||
LOG(("Already updating, queueing update %s from %s", aRequestPayload.Data(),
|
||||
aUpdateUrl.Data()));
|
||||
*_retval = false;
|
||||
PendingRequest *request = mPendingRequests.AppendElement(fallible);
|
||||
UpdateRequest *request = mPendingRequests.AppendElement(fallible);
|
||||
if (!request) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
request->mTables = aRequestTables;
|
||||
request->mRequestPayload = aRequestPayload;
|
||||
request->mIsPostRequest = aIsPostRequest;
|
||||
request->mUrl = aUpdateUrl;
|
||||
request->mSuccessCallback = aSuccessCallback;
|
||||
request->mUpdateErrorCallback = aUpdateErrorCallback;
|
||||
request->mDownloadErrorCallback = aDownloadErrorCallback;
|
||||
BuildUpdateRequest(aRequestTables, aRequestPayload, aIsPostRequest, aUpdateUrl,
|
||||
aSuccessCallback, aUpdateErrorCallback, aDownloadErrorCallback,
|
||||
request);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -329,17 +323,13 @@ nsUrlClassifierStreamUpdater::DownloadUpdates(
|
||||
LOG(("Service busy, already updating, queuing update %s from %s",
|
||||
aRequestPayload.Data(), aUpdateUrl.Data()));
|
||||
*_retval = false;
|
||||
PendingRequest *request = mPendingRequests.AppendElement(fallible);
|
||||
UpdateRequest *request = mPendingRequests.AppendElement(fallible);
|
||||
if (!request) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
request->mTables = aRequestTables;
|
||||
request->mRequestPayload = aRequestPayload;
|
||||
request->mIsPostRequest = aIsPostRequest;
|
||||
request->mUrl = aUpdateUrl;
|
||||
request->mSuccessCallback = aSuccessCallback;
|
||||
request->mUpdateErrorCallback = aUpdateErrorCallback;
|
||||
request->mDownloadErrorCallback = aDownloadErrorCallback;
|
||||
BuildUpdateRequest(aRequestTables, aRequestPayload, aIsPostRequest, aUpdateUrl,
|
||||
aSuccessCallback, aUpdateErrorCallback, aDownloadErrorCallback,
|
||||
request);
|
||||
|
||||
// We cannot guarantee that we will be notified when DBService is done
|
||||
// processing the current update, so we fire a retry timer on our own.
|
||||
@ -366,14 +356,15 @@ nsUrlClassifierStreamUpdater::DownloadUpdates(
|
||||
urlUtil->GetTelemetryProvider(tables.SafeElementAt(0, EmptyCString()),
|
||||
mTelemetryProvider);
|
||||
|
||||
mSuccessCallback = aSuccessCallback;
|
||||
mUpdateErrorCallback = aUpdateErrorCallback;
|
||||
mDownloadErrorCallback = aDownloadErrorCallback;
|
||||
mCurrentRequest = MakeUnique<UpdateRequest>();
|
||||
BuildUpdateRequest(aRequestTables, aRequestPayload, aIsPostRequest, aUpdateUrl,
|
||||
aSuccessCallback, aUpdateErrorCallback, aDownloadErrorCallback,
|
||||
mCurrentRequest.get());
|
||||
|
||||
mIsUpdating = true;
|
||||
*_retval = true;
|
||||
|
||||
LOG(("FetchUpdate: %s", aUpdateUrl.Data()));
|
||||
LOG(("FetchUpdate: %s", mCurrentRequest->mUrl.Data()));
|
||||
|
||||
return FetchUpdate(aUpdateUrl, aRequestPayload, aIsPostRequest, EmptyCString());
|
||||
}
|
||||
@ -446,7 +437,7 @@ nsUrlClassifierStreamUpdater::FetchNextRequest()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PendingRequest request = mPendingRequests[0];
|
||||
UpdateRequest request = mPendingRequests[0];
|
||||
mPendingRequests.RemoveElementAt(0);
|
||||
LOG(("Stream updater: fetching next request: %s, %s",
|
||||
request.mTables.get(), request.mUrl.get()));
|
||||
@ -463,6 +454,28 @@ nsUrlClassifierStreamUpdater::FetchNextRequest()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void
|
||||
nsUrlClassifierStreamUpdater::BuildUpdateRequest(
|
||||
const nsACString &aRequestTables,
|
||||
const nsACString &aRequestPayload,
|
||||
bool aIsPostRequest,
|
||||
const nsACString &aUpdateUrl,
|
||||
nsIUrlClassifierCallback *aSuccessCallback,
|
||||
nsIUrlClassifierCallback *aUpdateErrorCallback,
|
||||
nsIUrlClassifierCallback *aDownloadErrorCallback,
|
||||
UpdateRequest* aRequest)
|
||||
{
|
||||
MOZ_ASSERT(aRequest);
|
||||
|
||||
aRequest->mTables = aRequestTables;
|
||||
aRequest->mRequestPayload = aRequestPayload;
|
||||
aRequest->mIsPostRequest = aIsPostRequest;
|
||||
aRequest->mUrl = aUpdateUrl;
|
||||
aRequest->mSuccessCallback = aSuccessCallback;
|
||||
aRequest->mUpdateErrorCallback = aUpdateErrorCallback;
|
||||
aRequest->mDownloadErrorCallback = aDownloadErrorCallback;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsUrlClassifierStreamUpdater::StreamFinished(nsresult status,
|
||||
uint32_t requestedDelay)
|
||||
@ -507,8 +520,11 @@ nsUrlClassifierStreamUpdater::UpdateSuccess(uint32_t requestedTimeout)
|
||||
}
|
||||
|
||||
// DownloadDone() clears mSuccessCallback, so we save it off here.
|
||||
nsCOMPtr<nsIUrlClassifierCallback> successCallback = mDownloadError ? nullptr : mSuccessCallback.get();
|
||||
nsCOMPtr<nsIUrlClassifierCallback> downloadErrorCallback = mDownloadError ? mDownloadErrorCallback.get() : nullptr;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> successCallback =
|
||||
mDownloadError ? nullptr : mCurrentRequest->mSuccessCallback.get();
|
||||
nsCOMPtr<nsIUrlClassifierCallback> downloadErrorCallback =
|
||||
mDownloadError ? mCurrentRequest->mDownloadErrorCallback.get() : nullptr;
|
||||
|
||||
DownloadDone();
|
||||
|
||||
nsAutoCString strTimeout;
|
||||
@ -535,8 +551,10 @@ nsUrlClassifierStreamUpdater::UpdateError(nsresult result)
|
||||
LOG(("nsUrlClassifierStreamUpdater::UpdateError [this=%p]", this));
|
||||
|
||||
// DownloadDone() clears mUpdateErrorCallback, so we save it off here.
|
||||
nsCOMPtr<nsIUrlClassifierCallback> errorCallback = mDownloadError ? nullptr : mUpdateErrorCallback.get();
|
||||
nsCOMPtr<nsIUrlClassifierCallback> downloadErrorCallback = mDownloadError ? mDownloadErrorCallback.get() : nullptr;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> errorCallback =
|
||||
mDownloadError ? nullptr : mCurrentRequest->mUpdateErrorCallback.get();
|
||||
nsCOMPtr<nsIUrlClassifierCallback> downloadErrorCallback =
|
||||
mDownloadError ? mCurrentRequest->mDownloadErrorCallback.get() : nullptr;
|
||||
DownloadDone();
|
||||
|
||||
nsAutoCString strResult;
|
||||
@ -642,14 +660,9 @@ nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request,
|
||||
mozilla::Telemetry::Accumulate(mozilla::Telemetry::URLCLASSIFIER_UPDATE_REMOTE_STATUS2,
|
||||
mTelemetryProvider, HTTPStatusToBucket(requestStatus));
|
||||
if (requestStatus == 400) {
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsAutoCString spec;
|
||||
rv = httpChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_SUCCEEDED(rv) && uri) {
|
||||
uri->GetAsciiSpec(spec);
|
||||
}
|
||||
printf_stderr("Safe Browsing server returned a 400 during update: request = %s \n",
|
||||
spec.get());
|
||||
printf_stderr("Safe Browsing server returned a 400 during update:"
|
||||
"request url = %s, payload = %s\n",
|
||||
mCurrentRequest->mUrl.get(), mCurrentRequest->mRequestPayload.get());
|
||||
}
|
||||
|
||||
LOG(("nsUrlClassifierStreamUpdater::OnStartRequest %s (%d)", succeeded ?
|
||||
@ -668,7 +681,7 @@ nsUrlClassifierStreamUpdater::OnStartRequest(nsIRequest *request,
|
||||
mDownloadErrorStatusStr = strStatus;
|
||||
status = NS_ERROR_ABORT;
|
||||
} else if (NS_SUCCEEDED(status)) {
|
||||
MOZ_ASSERT(mDownloadErrorCallback);
|
||||
MOZ_ASSERT(mCurrentRequest->mDownloadErrorCallback);
|
||||
mBeganStream = true;
|
||||
LOG(("nsUrlClassifierStreamUpdater::Beginning stream [this=%p]", this));
|
||||
rv = mDBService->BeginStream(mStreamTable);
|
||||
|
@ -71,6 +71,26 @@ private:
|
||||
// Fetches the next request, from mPendingRequests
|
||||
nsresult FetchNextRequest();
|
||||
|
||||
struct UpdateRequest {
|
||||
nsCString mTables;
|
||||
nsCString mRequestPayload;
|
||||
bool mIsPostRequest;
|
||||
nsCString mUrl;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mSuccessCallback;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mUpdateErrorCallback;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mDownloadErrorCallback;
|
||||
};
|
||||
// Utility function to create an update request.
|
||||
void
|
||||
BuildUpdateRequest(const nsACString &aRequestTables,
|
||||
const nsACString &aRequestPayload,
|
||||
bool aIsPostRequest,
|
||||
const nsACString &aUpdateUrl,
|
||||
nsIUrlClassifierCallback *aSuccessCallback,
|
||||
nsIUrlClassifierCallback *aUpdateErrorCallback,
|
||||
nsIUrlClassifierCallback *aDownloadErrorCallback,
|
||||
UpdateRequest* aRequest);
|
||||
|
||||
bool mIsUpdating;
|
||||
bool mInitialized;
|
||||
bool mDownloadError;
|
||||
@ -99,16 +119,8 @@ private:
|
||||
// Timer to abort the download if it takes too long.
|
||||
nsCOMPtr<nsITimer> mTimeoutTimer;
|
||||
|
||||
struct PendingRequest {
|
||||
nsCString mTables;
|
||||
nsCString mRequestPayload;
|
||||
bool mIsPostRequest;
|
||||
nsCString mUrl;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mSuccessCallback;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mUpdateErrorCallback;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mDownloadErrorCallback;
|
||||
};
|
||||
nsTArray<PendingRequest> mPendingRequests;
|
||||
mozilla::UniquePtr<UpdateRequest> mCurrentRequest;
|
||||
nsTArray<UpdateRequest> mPendingRequests;
|
||||
|
||||
struct PendingUpdate {
|
||||
nsCString mUrl;
|
||||
@ -116,9 +128,6 @@ private:
|
||||
};
|
||||
nsTArray<PendingUpdate> mPendingUpdates;
|
||||
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mSuccessCallback;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mUpdateErrorCallback;
|
||||
nsCOMPtr<nsIUrlClassifierCallback> mDownloadErrorCallback;
|
||||
|
||||
// The provider for current update request and should be only used by telemetry
|
||||
// since it would show up as "other" for any other providers.
|
||||
|
@ -38,11 +38,6 @@
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
static size_t inbuf_size = 262144;
|
||||
static size_t outbuf_size = 262144;
|
||||
static uint8_t *inbuf = nullptr;
|
||||
static uint8_t *outbuf = nullptr;
|
||||
|
||||
/**
|
||||
* Performs a verification on the opened MAR file with the passed in
|
||||
* certificate name ID and type ID.
|
||||
@ -183,24 +178,24 @@ ArchiveReader::Open(const NS_tchar *path)
|
||||
if (mArchive)
|
||||
Close();
|
||||
|
||||
if (!inbuf) {
|
||||
inbuf = (uint8_t *)malloc(inbuf_size);
|
||||
if (!inbuf) {
|
||||
if (!mInBuf) {
|
||||
mInBuf = (uint8_t *)malloc(mInBufSize);
|
||||
if (!mInBuf) {
|
||||
// Try again with a smaller buffer.
|
||||
inbuf_size = 1024;
|
||||
inbuf = (uint8_t *)malloc(inbuf_size);
|
||||
if (!inbuf)
|
||||
mInBufSize = 1024;
|
||||
mInBuf = (uint8_t *)malloc(mInBufSize);
|
||||
if (!mInBuf)
|
||||
return ARCHIVE_READER_MEM_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (!outbuf) {
|
||||
outbuf = (uint8_t *)malloc(outbuf_size);
|
||||
if (!outbuf) {
|
||||
if (!mOutBuf) {
|
||||
mOutBuf = (uint8_t *)malloc(mOutBufSize);
|
||||
if (!mOutBuf) {
|
||||
// Try again with a smaller buffer.
|
||||
outbuf_size = 1024;
|
||||
outbuf = (uint8_t *)malloc(outbuf_size);
|
||||
if (!outbuf)
|
||||
mOutBufSize = 1024;
|
||||
mOutBuf = (uint8_t *)malloc(mOutBufSize);
|
||||
if (!mOutBuf)
|
||||
return ARCHIVE_READER_MEM_ERROR;
|
||||
}
|
||||
}
|
||||
@ -227,14 +222,14 @@ ArchiveReader::Close()
|
||||
mArchive = nullptr;
|
||||
}
|
||||
|
||||
if (inbuf) {
|
||||
free(inbuf);
|
||||
inbuf = nullptr;
|
||||
if (mInBuf) {
|
||||
free(mInBuf);
|
||||
mInBuf = nullptr;
|
||||
}
|
||||
|
||||
if (outbuf) {
|
||||
free(outbuf);
|
||||
outbuf = nullptr;
|
||||
if (mOutBuf) {
|
||||
free(mOutBuf);
|
||||
mOutBuf = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,12 +282,12 @@ ArchiveReader::ExtractItemToStream(const MarItem *item, FILE *fp)
|
||||
return UNEXPECTED_XZ_ERROR;
|
||||
}
|
||||
|
||||
strm.in = inbuf;
|
||||
strm.in = mInBuf;
|
||||
strm.in_pos = 0;
|
||||
strm.in_size = 0;
|
||||
strm.out = outbuf;
|
||||
strm.out = mOutBuf;
|
||||
strm.out_pos = 0;
|
||||
strm.out_size = outbuf_size;
|
||||
strm.out_size = mOutBufSize;
|
||||
|
||||
offset = 0;
|
||||
for (;;) {
|
||||
@ -302,7 +297,7 @@ ArchiveReader::ExtractItemToStream(const MarItem *item, FILE *fp)
|
||||
}
|
||||
|
||||
if (offset < (int) item->length && strm.in_pos == strm.in_size) {
|
||||
inlen = mar_read(mArchive, item, offset, inbuf, inbuf_size);
|
||||
inlen = mar_read(mArchive, item, offset, mInBuf, mInBufSize);
|
||||
if (inlen <= 0) {
|
||||
ret = READ_ERROR;
|
||||
break;
|
||||
@ -314,8 +309,8 @@ ArchiveReader::ExtractItemToStream(const MarItem *item, FILE *fp)
|
||||
|
||||
xz_rv = xz_dec_run(dec, &strm);
|
||||
|
||||
if (strm.out_pos == outbuf_size) {
|
||||
if (fwrite(outbuf, 1, strm.out_pos, fp) != strm.out_pos) {
|
||||
if (strm.out_pos == mOutBufSize) {
|
||||
if (fwrite(mOutBuf, 1, strm.out_pos, fp) != strm.out_pos) {
|
||||
ret = WRITE_ERROR_EXTRACT;
|
||||
break;
|
||||
}
|
||||
@ -338,7 +333,7 @@ ArchiveReader::ExtractItemToStream(const MarItem *item, FILE *fp)
|
||||
// Write out the remainder of the decompressed data. In the case of
|
||||
// strm.out_pos == 0 this is needed to create empty files included in the
|
||||
// mar file.
|
||||
if (fwrite(outbuf, 1, strm.out_pos, fp) != strm.out_pos) {
|
||||
if (fwrite(mOutBuf, 1, strm.out_pos, fp) != strm.out_pos) {
|
||||
ret = WRITE_ERROR_EXTRACT;
|
||||
}
|
||||
break;
|
||||
|
@ -20,7 +20,7 @@
|
||||
class ArchiveReader
|
||||
{
|
||||
public:
|
||||
ArchiveReader() : mArchive(nullptr) {}
|
||||
ArchiveReader() {}
|
||||
~ArchiveReader() { Close(); }
|
||||
|
||||
int Open(const NS_tchar *path);
|
||||
@ -35,7 +35,11 @@ public:
|
||||
private:
|
||||
int ExtractItemToStream(const MarItem *item, FILE *fp);
|
||||
|
||||
MarFile *mArchive;
|
||||
MarFile *mArchive = nullptr;
|
||||
uint8_t *mInBuf = nullptr;
|
||||
uint8_t *mOutBuf = nullptr;
|
||||
size_t mInBufSize = 262144;
|
||||
size_t mOutBufSize = 262144;
|
||||
};
|
||||
|
||||
#endif // ArchiveReader_h__
|
||||
|
Loading…
Reference in New Issue
Block a user