mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Merge mozilla-central to autoland r=merge a=merge on a CLOSED TREE
This commit is contained in:
commit
68f2d0d8de
@ -1213,6 +1213,25 @@ var gBrowserInit = {
|
||||
initBrowser.removeAttribute("blank");
|
||||
}
|
||||
|
||||
// Set a sane starting width/height for all resolutions on new profiles.
|
||||
if (Services.prefs.getBoolPref("privacy.resistFingerprinting")) {
|
||||
// When the fingerprinting resistance is enabled, making sure that we don't
|
||||
// have a maximum window to interfere with generating rounded window dimensions.
|
||||
document.documentElement.setAttribute("sizemode", "normal");
|
||||
} else if (!document.documentElement.hasAttribute("width")) {
|
||||
const TARGET_WIDTH = 1280;
|
||||
const TARGET_HEIGHT = 1040;
|
||||
let width = Math.min(screen.availWidth * .9, TARGET_WIDTH);
|
||||
let height = Math.min(screen.availHeight * .9, TARGET_HEIGHT);
|
||||
|
||||
document.documentElement.setAttribute("width", width);
|
||||
document.documentElement.setAttribute("height", height);
|
||||
|
||||
if (width < TARGET_WIDTH && height < TARGET_HEIGHT) {
|
||||
document.documentElement.setAttribute("sizemode", "maximized");
|
||||
}
|
||||
}
|
||||
|
||||
gBrowser.updateBrowserRemoteness(initBrowser, isRemote, {
|
||||
remoteType, sameProcessAsFrameLoader
|
||||
});
|
||||
@ -1275,27 +1294,6 @@ var gBrowserInit = {
|
||||
gDragSpaceObserver.init();
|
||||
}
|
||||
|
||||
let isResistFingerprintingEnabled = Services.prefs.getBoolPref("privacy.resistFingerprinting");
|
||||
|
||||
// Set a sane starting width/height for all resolutions on new profiles.
|
||||
if (isResistFingerprintingEnabled) {
|
||||
// When the fingerprinting resistance is enabled, making sure that we don't
|
||||
// have a maximum window to interfere with generating rounded window dimensions.
|
||||
document.documentElement.setAttribute("sizemode", "normal");
|
||||
} else if (!document.documentElement.hasAttribute("width")) {
|
||||
const TARGET_WIDTH = 1280;
|
||||
const TARGET_HEIGHT = 1040;
|
||||
let width = Math.min(screen.availWidth * .9, TARGET_WIDTH);
|
||||
let height = Math.min(screen.availHeight * .9, TARGET_HEIGHT);
|
||||
|
||||
document.documentElement.setAttribute("width", width);
|
||||
document.documentElement.setAttribute("height", height);
|
||||
|
||||
if (width < TARGET_WIDTH && height < TARGET_HEIGHT) {
|
||||
document.documentElement.setAttribute("sizemode", "maximized");
|
||||
}
|
||||
}
|
||||
|
||||
if (!window.toolbar.visible) {
|
||||
// adjust browser UI for popups
|
||||
gURLBar.setAttribute("readonly", "true");
|
||||
|
@ -28,6 +28,7 @@ skip-if = !e10s
|
||||
[browser_urlbar_keyed_search_reflows.js]
|
||||
skip-if = (os == 'linux') || (os == 'win' && debug) # Disabled on Linux and Windows debug due to perma failures. Bug 1392320.
|
||||
[browser_urlbar_search_reflows.js]
|
||||
skip-if = debug && (os == 'linux' || os == 'win') # Disabled on Linux and Windows debug due to intermittent timeouts. Bug 1414126.
|
||||
[browser_windowclose_reflows.js]
|
||||
[browser_windowopen_flicker.js]
|
||||
skip-if = (debug && os == 'win') # Disabled on windows debug for intermittent leaks
|
||||
|
@ -48,13 +48,6 @@ add_task(async function() {
|
||||
inRange(r.x1, width * .75, width * .9)
|
||||
},
|
||||
|
||||
{name: "bug 1394914 - sidebar toolbar icon should be visible at first paint",
|
||||
condition: r => r.h == 13 && inRange(r.w, 14, 16) && // icon size
|
||||
inRange(r.y1, 40, 80) && // in the toolbar
|
||||
// near the right end of screen
|
||||
inRange(r.x1, width - 100, width - 50)
|
||||
},
|
||||
|
||||
{name: "bug 1403648 - urlbar should be focused at first paint",
|
||||
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
|
||||
// taking 50% to 75% of the window width
|
||||
@ -62,13 +55,6 @@ add_task(async function() {
|
||||
// starting at 15 to 25% of the window width
|
||||
inRange(r.x1, width * .15, width * .25)
|
||||
},
|
||||
|
||||
{name: "bug 1421460 - restore icon should be visible at first paint",
|
||||
condition: r => r.w == 9 && r.h == 9 && // 9x9 icon
|
||||
AppConstants.platform == "win" &&
|
||||
// near the right end of the screen
|
||||
inRange(r.x1, width - 80, width - 70)
|
||||
},
|
||||
];
|
||||
|
||||
let rectText = `${rect.toSource()}, window width: ${width}`;
|
||||
|
@ -98,13 +98,6 @@ add_task(async function() {
|
||||
inRange(r.x1, width * .75, width * .9)
|
||||
},
|
||||
|
||||
{name: "bug 1394914 - sidebar toolbar icon should be visible at first paint",
|
||||
condition: r => r.h == 13 && inRange(r.w, 14, 16) && // icon size
|
||||
inRange(r.y1, 40, 80) && // in the toolbar
|
||||
// near the right end of screen
|
||||
inRange(r.x1, width - 100, width - 50)
|
||||
},
|
||||
|
||||
{name: "bug 1403648 - urlbar should be focused at first paint",
|
||||
condition: r => inRange(r.y2, 60, 80) && // in the toolbar
|
||||
// taking 50% to 75% of the window width
|
||||
|
@ -12,7 +12,17 @@
|
||||
* See https://developer.mozilla.org/en-US/Firefox/Performance_best_practices_for_Firefox_fe_engineers
|
||||
* for tips on how to do that.
|
||||
*/
|
||||
const EXPECTED_REFLOWS = [];
|
||||
const EXPECTED_REFLOWS = [
|
||||
{
|
||||
stack: [
|
||||
"onOverflow@resource:///modules/CustomizableUI.jsm",
|
||||
"init@resource:///modules/CustomizableUI.jsm",
|
||||
"observe@resource:///modules/CustomizableUI.jsm",
|
||||
"_delayedStartup@chrome://browser/content/browser.js",
|
||||
],
|
||||
times: 2, // This number should only ever go down - never up.
|
||||
},
|
||||
];
|
||||
|
||||
if (Services.appinfo.OS == "WINNT") {
|
||||
EXPECTED_REFLOWS.push(
|
||||
|
@ -18,33 +18,14 @@
|
||||
<constructor><![CDATA[
|
||||
let scope = {};
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
||||
let CustomizableUI = scope.CustomizableUI;
|
||||
// Add an early overflow event listener that will mark if the
|
||||
// toolbar overflowed during construction.
|
||||
if (scope.CustomizableUI.isAreaOverflowable(this.id)) {
|
||||
if (CustomizableUI.isAreaOverflowable(this.id)) {
|
||||
this.addEventListener("overflow", this);
|
||||
this.addEventListener("underflow", this);
|
||||
}
|
||||
|
||||
if (document.readyState == "complete") {
|
||||
this._init();
|
||||
} else {
|
||||
// Need to wait until XUL overlays are loaded. See bug 554279.
|
||||
let self = this;
|
||||
document.addEventListener("readystatechange", function onReadyStateChange() {
|
||||
if (document.readyState != "complete")
|
||||
return;
|
||||
document.removeEventListener("readystatechange", onReadyStateChange);
|
||||
self._init();
|
||||
});
|
||||
}
|
||||
]]></constructor>
|
||||
|
||||
<method name="_init">
|
||||
<body><![CDATA[
|
||||
let scope = {};
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm", scope);
|
||||
let CustomizableUI = scope.CustomizableUI;
|
||||
|
||||
// Bug 989289: Forcibly set the now unsupported "mode" and "iconsize"
|
||||
// attributes, just in case they accidentally get restored from
|
||||
// persistence from a user that's been upgrading and downgrading.
|
||||
@ -83,8 +64,7 @@
|
||||
.filter(node => node.getAttribute("skipintoolbarset") != "true" && node.id)
|
||||
.map(node => node.id);
|
||||
CustomizableUI.registerToolbarNode(this, children);
|
||||
]]></body>
|
||||
</method>
|
||||
]]></constructor>
|
||||
|
||||
<method name="handleEvent">
|
||||
<parameter name="aEvent"/>
|
||||
|
@ -1,7 +1,7 @@
|
||||
[
|
||||
{
|
||||
"size": 996696,
|
||||
"digest": "7c09f6144c84a6dd9bdb8d817e7957b432e72138ecb4a2adf6f5754b7ef2a2bd5c53ba113659283644f510a1aab87a1efc09851bc07457978eb0c0a63f4c29a4",
|
||||
"size": 2156788,
|
||||
"digest": "8e3b50c4879f1321655a7b2b613dc6c981580fb5e14af585eda1f79020e98378f67bfdf46bf49c060635b283b1892d0e5ca23ab219af83de0456fbee3e276983",
|
||||
"algorithm": "sha512",
|
||||
"filename": "breakpad-tools.tar.xz",
|
||||
"unpack": true
|
||||
|
@ -1017,7 +1017,7 @@ def compiler(language, host_or_target, c_compiler=None, other_compiler=None,
|
||||
def is_msvc(compiler):
|
||||
return compiler.type == 'msvc'
|
||||
|
||||
imply_option('LINK', linker, reason='LD', when=is_msvc)
|
||||
imply_option('LINKER', linker, reason='LD', when=is_msvc)
|
||||
|
||||
return valid_compiler
|
||||
|
||||
|
@ -429,9 +429,9 @@ def valid_mt(path):
|
||||
set_config('MSMANIFEST_TOOL', depends(valid_mt)(lambda x: bool(x)))
|
||||
|
||||
|
||||
link = check_prog('LINK', ('link.exe',), paths=vc_compiler_path)
|
||||
link = check_prog('LINKER', ('link.exe',), paths=vc_compiler_path)
|
||||
|
||||
add_old_configure_assignment('LINK', link)
|
||||
add_old_configure_assignment('LINKER', link)
|
||||
|
||||
|
||||
# Normally, we'd just have CC, etc. set to absolute paths, but the build system
|
||||
|
@ -418,7 +418,7 @@ EXPAND_LIBS_GEN = $(PYTHON) $(MOZILLA_DIR)/config/expandlibs_gen.py
|
||||
EXPAND_AR = $(EXPAND_LIBS_EXEC) --extract -- $(AR)
|
||||
EXPAND_CC = $(EXPAND_LIBS_EXEC) --uselist -- $(CC)
|
||||
EXPAND_CCC = $(EXPAND_LIBS_EXEC) --uselist -- $(CCC)
|
||||
EXPAND_LINK = $(EXPAND_LIBS_EXEC) --uselist -- $(LINK)
|
||||
EXPAND_LINK = $(EXPAND_LIBS_EXEC) --uselist -- $(LINKER)
|
||||
EXPAND_MKSHLIB_ARGS = --uselist
|
||||
ifdef SYMBOL_ORDER
|
||||
EXPAND_MKSHLIB_ARGS += --symbol-order $(SYMBOL_ORDER)
|
||||
|
@ -591,7 +591,7 @@ endif
|
||||
$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
|
||||
$(EXPAND_LIBS_EXEC) -- $(LINK) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
$(EXPAND_LIBS_EXEC) -- $(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $(HOST_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
ifdef MSMANIFEST_TOOL
|
||||
@if test -f $@.manifest; then \
|
||||
if test -f '$(srcdir)/$@.manifest'; then \
|
||||
@ -650,7 +650,7 @@ endif
|
||||
$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): host_%.$(OBJ_SUFFIX) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
|
||||
$(REPORT_BUILD)
|
||||
ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
|
||||
$(EXPAND_LIBS_EXEC) -- $(LINK) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
$(EXPAND_LIBS_EXEC) -- $(LINKER) -NOLOGO -OUT:$@ -PDB:$(HOST_PDBFILE) $< $(WIN32_EXE_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
else
|
||||
ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
|
||||
$(EXPAND_LIBS_EXEC) -- $(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $< $(HOST_LIBS) $(HOST_EXTRA_LIBS)
|
||||
|
@ -15222,7 +15222,7 @@ nsDocShell::ShouldPrepareForIntercept(nsIURI* aURI, bool aIsNonSubresourceReques
|
||||
}
|
||||
|
||||
ErrorResult rv;
|
||||
*aShouldIntercept = swm->IsControlled(doc, rv);
|
||||
*aShouldIntercept = doc->GetController().isSome();
|
||||
if (NS_WARN_IF(rv.Failed())) {
|
||||
return rv.StealNSResult();
|
||||
}
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "nsHTMLDNSPrefetch.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/ServiceWorkerDescriptor.h"
|
||||
#include "mozilla/dom/ScriptLoader.h"
|
||||
#include "nsParserConstants.h"
|
||||
#include "nsSandboxFlags.h"
|
||||
@ -1109,7 +1110,7 @@ nsContentSink::ProcessOfflineManifest(const nsAString& aManifestSpec)
|
||||
|
||||
// If this document has been interecepted, let's skip the processing of the
|
||||
// manifest.
|
||||
if (nsContentUtils::IsControlledByServiceWorker(mDocument)) {
|
||||
if (mDocument->GetController().isSome()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1978,28 +1978,6 @@ nsContentUtils::ParseLegacyFontSize(const nsAString& aValue)
|
||||
return clamped(value, 1, 7);
|
||||
}
|
||||
|
||||
/* static */
|
||||
bool
|
||||
nsContentUtils::IsControlledByServiceWorker(nsIDocument* aDocument)
|
||||
{
|
||||
if (nsContentUtils::IsInPrivateBrowsing(aDocument)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
RefPtr<workers::ServiceWorkerManager> swm =
|
||||
workers::ServiceWorkerManager::GetInstance();
|
||||
MOZ_ASSERT(swm);
|
||||
|
||||
ErrorResult rv;
|
||||
bool controlled = swm->IsControlled(aDocument, rv);
|
||||
if (NS_WARN_IF(rv.Failed())) {
|
||||
rv.SuppressException();
|
||||
return false;
|
||||
}
|
||||
|
||||
return controlled;
|
||||
}
|
||||
|
||||
/* static */
|
||||
void
|
||||
nsContentUtils::GetOfflineAppManifest(nsIDocument *aDocument, nsIURI **aURI)
|
||||
@ -2008,7 +1986,7 @@ nsContentUtils::GetOfflineAppManifest(nsIDocument *aDocument, nsIURI **aURI)
|
||||
MOZ_ASSERT(aDocument);
|
||||
*aURI = nullptr;
|
||||
|
||||
if (IsControlledByServiceWorker(aDocument)) {
|
||||
if (aDocument->GetController().isSome()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2396,11 +2396,6 @@ public:
|
||||
return sIsScopedStyleEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if this doc is controlled by a ServiceWorker.
|
||||
*/
|
||||
static bool IsControlledByServiceWorker(nsIDocument* aDocument);
|
||||
|
||||
/**
|
||||
* Fire mutation events for changes caused by parsing directly into a
|
||||
* context node.
|
||||
|
@ -212,6 +212,8 @@
|
||||
#include "mozilla/dom/AnimatableBinding.h"
|
||||
#include "mozilla/dom/AnonymousContent.h"
|
||||
#include "mozilla/dom/BindingUtils.h"
|
||||
#include "mozilla/dom/ClientInfo.h"
|
||||
#include "mozilla/dom/ClientState.h"
|
||||
#include "mozilla/dom/DocumentFragment.h"
|
||||
#include "mozilla/dom/DocumentTimeline.h"
|
||||
#include "mozilla/dom/Event.h"
|
||||
@ -225,6 +227,7 @@
|
||||
#include "mozilla/dom/WebComponentsBinding.h"
|
||||
#include "mozilla/dom/CustomElementRegistryBinding.h"
|
||||
#include "mozilla/dom/CustomElementRegistry.h"
|
||||
#include "mozilla/dom/ServiceWorkerDescriptor.h"
|
||||
#include "mozilla/dom/TimeoutManager.h"
|
||||
#include "mozilla/ExtensionPolicyService.h"
|
||||
#include "nsFrame.h"
|
||||
@ -5052,7 +5055,7 @@ nsDocument::SetScriptGlobalObject(nsIScriptGlobalObject *aScriptGlobalObject)
|
||||
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||
if (swm) {
|
||||
ErrorResult error;
|
||||
if (swm->IsControlled(this, error)) {
|
||||
if (GetController().isSome()) {
|
||||
imgLoader* loader = nsContentUtils::GetImgLoaderForDocument(this);
|
||||
if (loader) {
|
||||
loader->ClearCacheForControlledDocument(this);
|
||||
@ -5842,6 +5845,36 @@ nsIDocument::GetAnonRootIfInAnonymousContentContainer(nsINode* aNode) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Maybe<ClientInfo>
|
||||
nsIDocument::GetClientInfo() const
|
||||
{
|
||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||
if (inner) {
|
||||
return Move(inner->GetClientInfo());
|
||||
}
|
||||
return Move(Maybe<ClientInfo>());
|
||||
}
|
||||
|
||||
Maybe<ClientState>
|
||||
nsIDocument::GetClientState() const
|
||||
{
|
||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||
if (inner) {
|
||||
return Move(inner->GetClientState());
|
||||
}
|
||||
return Move(Maybe<ClientState>());
|
||||
}
|
||||
|
||||
Maybe<ServiceWorkerDescriptor>
|
||||
nsIDocument::GetController() const
|
||||
{
|
||||
nsPIDOMWindowInner* inner = GetInnerWindow();
|
||||
if (inner) {
|
||||
return Move(inner->GetController());
|
||||
}
|
||||
return Move(Maybe<ServiceWorkerDescriptor>());
|
||||
}
|
||||
|
||||
//
|
||||
// nsIDOMDocument interface
|
||||
//
|
||||
|
@ -7412,7 +7412,7 @@ nsGlobalWindowInner::Orientation(CallerType aCallerType) const
|
||||
}
|
||||
#endif
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
nsGlobalWindowInner::GetConsole(ErrorResult& aRv)
|
||||
{
|
||||
if (!mConsole) {
|
||||
@ -7422,7 +7422,8 @@ nsGlobalWindowInner::GetConsole(ErrorResult& aRv)
|
||||
}
|
||||
}
|
||||
|
||||
return mConsole;
|
||||
RefPtr<Console> console = mConsole;
|
||||
return console.forget();
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -684,7 +684,7 @@ public:
|
||||
int16_t Orientation(mozilla::dom::CallerType aCallerType) const;
|
||||
#endif
|
||||
|
||||
mozilla::dom::Console* GetConsole(mozilla::ErrorResult& aRv);
|
||||
already_AddRefed<mozilla::dom::Console> GetConsole(mozilla::ErrorResult& aRv);
|
||||
|
||||
// https://w3c.github.io/webappsec-secure-contexts/#dom-window-issecurecontext
|
||||
bool IsSecureContext() const;
|
||||
|
@ -128,6 +128,8 @@ class Animation;
|
||||
class AnonymousContent;
|
||||
class Attr;
|
||||
class BoxObject;
|
||||
class ClientInfo;
|
||||
class ClientState;
|
||||
class CDATASection;
|
||||
class Comment;
|
||||
struct CustomElementDefinition;
|
||||
@ -159,6 +161,7 @@ class ProcessingInstruction;
|
||||
class Promise;
|
||||
class ScriptLoader;
|
||||
class Selection;
|
||||
class ServiceWorkerDescriptor;
|
||||
class StyleSheetList;
|
||||
class SVGDocument;
|
||||
class SVGSVGElement;
|
||||
@ -1124,6 +1127,10 @@ public:
|
||||
// Resolve all SVG pres attrs scheduled in ScheduleSVGForPresAttrEvaluation
|
||||
virtual void ResolveScheduledSVGPresAttrs() = 0;
|
||||
|
||||
mozilla::Maybe<mozilla::dom::ClientInfo> GetClientInfo() const;
|
||||
mozilla::Maybe<mozilla::dom::ClientState> GetClientState() const;
|
||||
mozilla::Maybe<mozilla::dom::ServiceWorkerDescriptor> GetController() const;
|
||||
|
||||
protected:
|
||||
virtual Element *GetRootElementInternal() const = 0;
|
||||
|
||||
|
@ -11,6 +11,8 @@
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
using mozilla::ipc::PrincipalInfo;
|
||||
|
||||
ClientInfo::ClientInfo(const nsID& aId,
|
||||
ClientType aType,
|
||||
const mozilla::ipc::PrincipalInfo& aPrincipalInfo,
|
||||
@ -110,5 +112,31 @@ ClientInfo::ToIPC() const
|
||||
return *mData;
|
||||
}
|
||||
|
||||
bool
|
||||
ClientInfo::IsPrivateBrowsing() const
|
||||
{
|
||||
switch(PrincipalInfo().type()) {
|
||||
case PrincipalInfo::TContentPrincipalInfo:
|
||||
{
|
||||
auto& p = PrincipalInfo().get_ContentPrincipalInfo();
|
||||
return p.attrs().mPrivateBrowsingId != 0;
|
||||
}
|
||||
case PrincipalInfo::TSystemPrincipalInfo:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
case PrincipalInfo::TNullPrincipalInfo:
|
||||
{
|
||||
auto& p = PrincipalInfo().get_NullPrincipalInfo();
|
||||
return p.attrs().mPrivateBrowsingId != 0;
|
||||
}
|
||||
default:
|
||||
{
|
||||
// clients should never be expanded principals
|
||||
MOZ_CRASH("unexpected principal type!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -91,6 +91,10 @@ public:
|
||||
// Convert to the ipdl generated type.
|
||||
const IPCClientInfo&
|
||||
ToIPC() const;
|
||||
|
||||
// Determine if the client is in private browsing mode.
|
||||
bool
|
||||
IsPrivateBrowsing() const;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
@ -80,15 +80,8 @@ public:
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsPIDOMWindowInner* innerWindow = doc->GetInnerWindow();
|
||||
if (NS_WARN_IF(!innerWindow)) {
|
||||
mPromise->Reject(NS_ERROR_FAILURE, __func__);
|
||||
mPromise = nullptr;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Maybe<ClientInfo> info = innerWindow->GetClientInfo();
|
||||
Maybe<ClientState> state = innerWindow->GetClientState();
|
||||
Maybe<ClientInfo> info(doc->GetClientInfo());
|
||||
Maybe<ClientState> state(doc->GetClientState());
|
||||
|
||||
if (NS_WARN_IF(info.isNothing() || state.isNothing())) {
|
||||
mPromise->Reject(NS_ERROR_FAILURE, __func__);
|
||||
|
@ -355,6 +355,11 @@ ClientSource::SetController(const ServiceWorkerDescriptor& aServiceWorker)
|
||||
{
|
||||
NS_ASSERT_OWNINGTHREAD(ClientSource);
|
||||
|
||||
// A client in private browsing mode should never be controlled by
|
||||
// a service worker. The principal origin attributes should guarantee
|
||||
// this invariant.
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mClientInfo.IsPrivateBrowsing());
|
||||
|
||||
if (mController.isSome() && mController.ref() == aServiceWorker) {
|
||||
return;
|
||||
}
|
||||
|
@ -817,9 +817,8 @@ Console::Console(nsPIDOMWindowInner* aWindow)
|
||||
, mOuterID(0)
|
||||
, mInnerID(0)
|
||||
, mStatus(eUnknown)
|
||||
, mCreationTimeStamp(TimeStamp::Now())
|
||||
{
|
||||
MOZ_ASSERT_IF(NS_IsMainThread(), aWindow);
|
||||
|
||||
if (mWindow) {
|
||||
mInnerID = mWindow->WindowID();
|
||||
|
||||
@ -855,9 +854,11 @@ Console::Initialize(ErrorResult& aRv)
|
||||
return;
|
||||
}
|
||||
|
||||
aRv = obs->AddObserver(this, "inner-window-destroyed", true);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return;
|
||||
if (mWindow) {
|
||||
aRv = obs->AddObserver(this, "inner-window-destroyed", true);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
aRv = obs->AddObserver(this, "memory-pressure", true);
|
||||
@ -1223,36 +1224,38 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
||||
|
||||
OriginAttributes oa;
|
||||
|
||||
if (mWindow) {
|
||||
// Save the principal's OriginAttributes in the console event data
|
||||
// so that we will be able to filter messages by origin attributes.
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mWindow);
|
||||
if (NS_WARN_IF(!sop)) {
|
||||
return;
|
||||
}
|
||||
if (NS_IsMainThread()) {
|
||||
if (mWindow) {
|
||||
// Save the principal's OriginAttributes in the console event data
|
||||
// so that we will be able to filter messages by origin attributes.
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(mWindow);
|
||||
if (NS_WARN_IF(!sop)) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (NS_WARN_IF(!principal)) {
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
if (NS_WARN_IF(!principal)) {
|
||||
return;
|
||||
}
|
||||
|
||||
oa = principal->OriginAttributesRef();
|
||||
callData->SetAddonId(principal);
|
||||
oa = principal->OriginAttributesRef();
|
||||
callData->SetAddonId(principal);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!nsContentUtils::IsSystemPrincipal(principal)) {
|
||||
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mWindow);
|
||||
if (webNav) {
|
||||
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(webNav);
|
||||
MOZ_ASSERT(loadContext);
|
||||
if (!nsContentUtils::IsSystemPrincipal(principal)) {
|
||||
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(mWindow);
|
||||
if (webNav) {
|
||||
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(webNav);
|
||||
MOZ_ASSERT(loadContext);
|
||||
|
||||
bool pb;
|
||||
if (NS_SUCCEEDED(loadContext->GetUsePrivateBrowsing(&pb))) {
|
||||
MOZ_ASSERT(pb == !!oa.mPrivateBrowsingId);
|
||||
bool pb;
|
||||
if (NS_SUCCEEDED(loadContext->GetUsePrivateBrowsing(&pb))) {
|
||||
MOZ_ASSERT(pb == !!oa.mPrivateBrowsingId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
@ -1290,67 +1293,11 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
||||
DOMHighResTimeStamp monotonicTimer;
|
||||
|
||||
// Monotonic timer for 'time' and 'timeEnd'
|
||||
if (aMethodName == MethodTime ||
|
||||
aMethodName == MethodTimeEnd ||
|
||||
aMethodName == MethodTimeStamp) {
|
||||
if (mWindow) {
|
||||
nsGlobalWindowInner *win = nsGlobalWindowInner::Cast(mWindow);
|
||||
MOZ_ASSERT(win);
|
||||
|
||||
RefPtr<Performance> performance = win->GetPerformance();
|
||||
if (!performance) {
|
||||
return;
|
||||
}
|
||||
|
||||
monotonicTimer = performance->Now();
|
||||
|
||||
nsDocShell* docShell = static_cast<nsDocShell*>(mWindow->GetDocShell());
|
||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||
bool isTimelineRecording = timelines && timelines->HasConsumer(docShell);
|
||||
|
||||
// The 'timeStamp' recordings do not need an argument; use empty string
|
||||
// if no arguments passed in.
|
||||
if (isTimelineRecording && aMethodName == MethodTimeStamp) {
|
||||
JS::Rooted<JS::Value> value(aCx, aData.Length() == 0
|
||||
? JS_GetEmptyStringValue(aCx)
|
||||
: aData[0]);
|
||||
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
||||
if (!jsString) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoJSString key;
|
||||
if (!key.init(aCx, jsString)) {
|
||||
return;
|
||||
}
|
||||
|
||||
timelines->AddMarkerForDocShell(docShell, Move(
|
||||
MakeUnique<TimestampTimelineMarker>(key)));
|
||||
}
|
||||
// For `console.time(foo)` and `console.timeEnd(foo)`.
|
||||
else if (isTimelineRecording && aData.Length() == 1) {
|
||||
JS::Rooted<JS::Value> value(aCx, aData[0]);
|
||||
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
||||
if (!jsString) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsAutoJSString key;
|
||||
if (!key.init(aCx, jsString)) {
|
||||
return;
|
||||
}
|
||||
|
||||
timelines->AddMarkerForDocShell(docShell, Move(
|
||||
MakeUnique<ConsoleTimelineMarker>(
|
||||
key, aMethodName == MethodTime ? MarkerTracingType::START
|
||||
: MarkerTracingType::END)));
|
||||
}
|
||||
} else {
|
||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
|
||||
monotonicTimer = workerPrivate->TimeStampToDOMHighRes(TimeStamp::Now());
|
||||
}
|
||||
if ((aMethodName == MethodTime ||
|
||||
aMethodName == MethodTimeEnd ||
|
||||
aMethodName == MethodTimeStamp) &&
|
||||
!MonotonicTimer(aCx, aMethodName, aData, &monotonicTimer)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (aMethodName == MethodTime && !aData.IsEmpty()) {
|
||||
@ -1375,7 +1322,17 @@ Console::MethodInternal(JSContext* aCx, MethodName aMethodName,
|
||||
}
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
callData->SetIDs(mOuterID, mInnerID);
|
||||
if (mWindow) {
|
||||
callData->SetIDs(mOuterID, mInnerID);
|
||||
} else {
|
||||
nsAutoString filename;
|
||||
if (callData->mTopStackFrame.isSome()) {
|
||||
filename = callData->mTopStackFrame->mFilename;
|
||||
}
|
||||
|
||||
callData->SetIDs(NS_LITERAL_STRING("jsm"), filename);
|
||||
}
|
||||
|
||||
ProcessCallData(aCx, callData, aData);
|
||||
|
||||
// Just because we don't want to expose
|
||||
@ -2436,7 +2393,7 @@ Console::GetConsole(const GlobalObject& aGlobal)
|
||||
return console.forget();
|
||||
}
|
||||
|
||||
/* static */ Console*
|
||||
/* static */ already_AddRefed<Console>
|
||||
Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
||||
{
|
||||
// Worklet
|
||||
@ -2452,8 +2409,16 @@ Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
||||
if (NS_IsMainThread()) {
|
||||
nsCOMPtr<nsPIDOMWindowInner> innerWindow =
|
||||
do_QueryInterface(aGlobal.GetAsSupports());
|
||||
if (NS_WARN_IF(!innerWindow)) {
|
||||
return nullptr;
|
||||
|
||||
// we are probably running a chrome script.
|
||||
if (!innerWindow) {
|
||||
RefPtr<Console> console = new Console(nullptr);
|
||||
console->Initialize(aRv);
|
||||
if (NS_WARN_IF(aRv.Failed())) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return console.forget();
|
||||
}
|
||||
|
||||
nsGlobalWindowInner* window = nsGlobalWindowInner::Cast(innerWindow);
|
||||
@ -2492,5 +2457,85 @@ Console::GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult& aRv)
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Console::MonotonicTimer(JSContext* aCx, MethodName aMethodName,
|
||||
const Sequence<JS::Value>& aData,
|
||||
DOMHighResTimeStamp* aTimeStamp)
|
||||
{
|
||||
if (mWindow) {
|
||||
nsGlobalWindowInner *win = nsGlobalWindowInner::Cast(mWindow);
|
||||
MOZ_ASSERT(win);
|
||||
|
||||
RefPtr<Performance> performance = win->GetPerformance();
|
||||
if (!performance) {
|
||||
return false;
|
||||
}
|
||||
|
||||
*aTimeStamp = performance->Now();
|
||||
|
||||
nsDocShell* docShell = static_cast<nsDocShell*>(mWindow->GetDocShell());
|
||||
RefPtr<TimelineConsumers> timelines = TimelineConsumers::Get();
|
||||
bool isTimelineRecording = timelines && timelines->HasConsumer(docShell);
|
||||
|
||||
// The 'timeStamp' recordings do not need an argument; use empty string
|
||||
// if no arguments passed in.
|
||||
if (isTimelineRecording && aMethodName == MethodTimeStamp) {
|
||||
JS::Rooted<JS::Value> value(aCx, aData.Length() == 0
|
||||
? JS_GetEmptyStringValue(aCx)
|
||||
: aData[0]);
|
||||
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
||||
if (!jsString) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoJSString key;
|
||||
if (!key.init(aCx, jsString)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
timelines->AddMarkerForDocShell(docShell, Move(
|
||||
MakeUnique<TimestampTimelineMarker>(key)));
|
||||
}
|
||||
// For `console.time(foo)` and `console.timeEnd(foo)`.
|
||||
else if (isTimelineRecording && aData.Length() == 1) {
|
||||
JS::Rooted<JS::Value> value(aCx, aData[0]);
|
||||
JS::Rooted<JSString*> jsString(aCx, JS::ToString(aCx, value));
|
||||
if (!jsString) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsAutoJSString key;
|
||||
if (!key.init(aCx, jsString)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
timelines->AddMarkerForDocShell(docShell, Move(
|
||||
MakeUnique<ConsoleTimelineMarker>(
|
||||
key, aMethodName == MethodTime ? MarkerTracingType::START
|
||||
: MarkerTracingType::END)));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
double duration = (TimeStamp::Now() - mCreationTimeStamp).ToMilliseconds();
|
||||
|
||||
// Round down to the nearest 5us, because if the timer is too accurate
|
||||
// people can do nasty timing attacks with it. See similar code in the
|
||||
// worker Performance implementation.
|
||||
const double maxResolutionMs = 0.005;
|
||||
return nsRFPService::ReduceTimePrecisionAsMSecs(
|
||||
floor(duration / maxResolutionMs) * maxResolutionMs);
|
||||
return true;
|
||||
}
|
||||
|
||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
|
||||
*aTimeStamp = workerPrivate->TimeStampToDOMHighRes(TimeStamp::Now());
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/BindingDeclarations.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/JSObjectHolder.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsCycleCollectionParticipant.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "nsHashKeys.h"
|
||||
@ -159,7 +160,7 @@ private:
|
||||
static already_AddRefed<Console>
|
||||
GetConsole(const GlobalObject& aGlobal);
|
||||
|
||||
static Console*
|
||||
static already_AddRefed<Console>
|
||||
GetConsoleInternal(const GlobalObject& aGlobal, ErrorResult &aRv);
|
||||
|
||||
static void
|
||||
@ -370,6 +371,11 @@ private:
|
||||
bool
|
||||
IsShuttingDown() const;
|
||||
|
||||
bool
|
||||
MonotonicTimer(JSContext* aCx, MethodName aMethodName,
|
||||
const Sequence<JS::Value>& aData,
|
||||
DOMHighResTimeStamp* aTimeStamp);
|
||||
|
||||
// All these nsCOMPtr are touched on main thread only.
|
||||
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
||||
nsCOMPtr<nsIConsoleAPIStorage> mStorage;
|
||||
@ -406,6 +412,10 @@ private:
|
||||
eShuttingDown
|
||||
} mStatus;
|
||||
|
||||
// This is used when Console is created and it's used only for JSM custom
|
||||
// console instance.
|
||||
mozilla::TimeStamp mCreationTimeStamp;
|
||||
|
||||
friend class ConsoleCallData;
|
||||
friend class ConsoleRunnable;
|
||||
friend class ConsoleCallDataRunnable;
|
||||
|
@ -44,5 +44,6 @@ LOCAL_INCLUDES += [
|
||||
|
||||
MOCHITEST_MANIFESTS += [ 'tests/mochitest.ini' ]
|
||||
MOCHITEST_CHROME_MANIFESTS += [ 'tests/chrome.ini' ]
|
||||
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell/xpcshell.ini']
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
@ -2,5 +2,7 @@
|
||||
skip-if = os == 'android'
|
||||
support-files =
|
||||
file_empty.html
|
||||
console.jsm
|
||||
|
||||
[test_console.xul]
|
||||
[test_jsm.xul]
|
||||
|
11
dom/console/tests/console.jsm
Normal file
11
dom/console/tests/console.jsm
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
this.EXPORTED_SYMBOLS = [ "ConsoleTest" ];
|
||||
|
||||
this.ConsoleTest = {
|
||||
go: function() {
|
||||
console.log("Hello world!");
|
||||
}
|
||||
};
|
51
dom/console/tests/test_jsm.xul
Normal file
51
dom/console/tests/test_jsm.xul
Normal file
@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/
|
||||
-->
|
||||
<window title="Console + JSM"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
onload="test();">
|
||||
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
|
||||
|
||||
<script type="application/javascript">
|
||||
<![CDATA[
|
||||
|
||||
const JSM = "chrome://mochitests/content/chrome/dom/console/tests/console.jsm";
|
||||
|
||||
function consoleListener() {
|
||||
SpecialPowers.addObserver(this, "console-api-log-event");
|
||||
}
|
||||
|
||||
consoleListener.prototype = {
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
if (aTopic == "console-api-log-event") {
|
||||
var obj = aSubject.wrappedJSObject;
|
||||
if (obj.innerID == JSM) {
|
||||
is(obj.ID, "jsm", "ID and InnerID are correctly set.");
|
||||
is (obj.arguments[0], "Hello world!", "Message matches");
|
||||
|
||||
SpecialPowers.removeObserver(this, "console-api-log-event");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function test() {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var cl = new consoleListener();
|
||||
Components.utils.import(JSM);
|
||||
ConsoleTest.go();
|
||||
}
|
||||
|
||||
]]>
|
||||
</script>
|
||||
|
||||
<body xmlns="http://www.w3.org/1999/xhtml">
|
||||
</body>
|
||||
</window>
|
31
dom/console/tests/xpcshell/test_basic.js
Normal file
31
dom/console/tests/xpcshell/test_basic.js
Normal file
@ -0,0 +1,31 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
add_task(async function() {
|
||||
do_check_true("console" in this);
|
||||
|
||||
let p = new Promise(resolve => {
|
||||
function consoleListener() {
|
||||
Services.obs.addObserver(this, "console-api-log-event");
|
||||
}
|
||||
|
||||
consoleListener.prototype = {
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
let obj = aSubject.wrappedJSObject;
|
||||
do_check_true(obj.arguments[0] === 42, "Message received!");
|
||||
do_check_true(obj.ID === "jsm", "The ID is JSM");
|
||||
do_check_true(obj.innerID.endsWith("test_basic.js"), "The innerID matches");
|
||||
|
||||
Services.obs.removeObserver(this, "console-api-log-event");
|
||||
resolve();
|
||||
}
|
||||
};
|
||||
|
||||
new consoleListener();
|
||||
});
|
||||
|
||||
console.log(42);
|
||||
await p;
|
||||
});
|
5
dom/console/tests/xpcshell/xpcshell.ini
Normal file
5
dom/console/tests/xpcshell/xpcshell.ini
Normal file
@ -0,0 +1,5 @@
|
||||
[DEFAULT]
|
||||
head =
|
||||
support-files =
|
||||
|
||||
[test_basic.js]
|
@ -290,6 +290,8 @@ bool EventStateManager::WheelPrefs::sWheelEventsEnabledOnPlugins = true;
|
||||
EventStateManager::DeltaAccumulator*
|
||||
EventStateManager::DeltaAccumulator::sInstance = nullptr;
|
||||
|
||||
bool EventStateManager::sIsInputEventsSuppressed = false;
|
||||
|
||||
EventStateManager::EventStateManager()
|
||||
: mLockCursor(0)
|
||||
, mLastFrameConsumedSetCursor(false)
|
||||
|
@ -315,6 +315,22 @@ public:
|
||||
// wheel (as opposed to, say, a selection or touch scroll).
|
||||
static bool CanVerticallyScrollFrameWithWheel(nsIFrame* aFrame);
|
||||
|
||||
static void SuppressInputEvents()
|
||||
{
|
||||
MOZ_ASSERT(!sIsInputEventsSuppressed);
|
||||
sIsInputEventsSuppressed = true;
|
||||
}
|
||||
|
||||
static void UnsuppressInputEvents()
|
||||
{
|
||||
sIsInputEventsSuppressed = false;
|
||||
}
|
||||
|
||||
static bool IsInputEventsSuppressed()
|
||||
{
|
||||
return sIsInputEventsSuppressed;
|
||||
}
|
||||
|
||||
// Holds the point in screen coords that a mouse event was dispatched to,
|
||||
// before we went into pointer lock mode. This is constantly updated while
|
||||
// the pointer is not locked, but we don't update it while the pointer is
|
||||
@ -1088,6 +1104,8 @@ private:
|
||||
// at the end of the input.
|
||||
static TimeStamp sLatestUserInputStart;
|
||||
|
||||
static bool sIsInputEventsSuppressed;
|
||||
|
||||
RefPtr<OverOutElementsWrapper> mMouseEnterLeaveHelper;
|
||||
nsRefPtrHashtable<nsUint32HashKey, OverOutElementsWrapper> mPointersEnterLeaveHelper;
|
||||
|
||||
|
@ -2300,7 +2300,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
||||
rootPoint = anEvent.mRefPoint + widget->WidgetToScreenOffset();
|
||||
}
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
Window root = GDK_ROOT_WINDOW();
|
||||
Window root = gfxPlatform::IsHeadless() ? X11None : GDK_ROOT_WINDOW();
|
||||
#else
|
||||
Window root = X11None; // Could XQueryTree, but this is not important.
|
||||
#endif
|
||||
@ -2387,7 +2387,7 @@ nsEventStatus nsPluginInstanceOwner::ProcessEvent(const WidgetGUIEvent& anEvent)
|
||||
{
|
||||
XKeyEvent &event = pluginEvent.xkey;
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
event.root = GDK_ROOT_WINDOW();
|
||||
event.root = gfxPlatform::IsHeadless() ? X11None : GDK_ROOT_WINDOW();
|
||||
event.time = anEvent.mTime;
|
||||
const GdkEventKey* gdkEvent =
|
||||
static_cast<const GdkEventKey*>(anEvent.mPluginEvent);
|
||||
|
@ -8,7 +8,7 @@
|
||||
* https://console.spec.whatwg.org/#console-namespace
|
||||
*/
|
||||
|
||||
[Exposed=(Window,Worker,WorkerDebugger,Worklet),
|
||||
[Exposed=(Window,Worker,WorkerDebugger,Worklet,System),
|
||||
ClassString="Console",
|
||||
ProtoObjectHack]
|
||||
namespace console {
|
||||
|
@ -2372,15 +2372,12 @@ ServiceWorkerManager::StartControllingADocument(ServiceWorkerRegistrationInfo* a
|
||||
// document here, our goal is to move ServiceWorkerManager to a separate
|
||||
// process. Using the ClientHandle supports this remote operation.
|
||||
ServiceWorkerInfo* activeWorker = aRegistration->GetActive();
|
||||
nsPIDOMWindowInner* innerWindow = aDoc->GetInnerWindow();
|
||||
if (activeWorker && innerWindow) {
|
||||
Maybe<ClientInfo> clientInfo = innerWindow->GetClientInfo();
|
||||
if (clientInfo.isSome()) {
|
||||
RefPtr<ClientHandle> clientHandle =
|
||||
ClientManager::CreateHandle(clientInfo.ref(),
|
||||
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||
ref = Move(clientHandle->Control(activeWorker->Descriptor()));
|
||||
}
|
||||
Maybe<ClientInfo> clientInfo = aDoc->GetClientInfo();
|
||||
if (activeWorker && clientInfo.isSome()) {
|
||||
RefPtr<ClientHandle> clientHandle =
|
||||
ClientManager::CreateHandle(clientInfo.ref(),
|
||||
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||
ref = Move(clientHandle->Control(activeWorker->Descriptor()));
|
||||
}
|
||||
|
||||
Telemetry::Accumulate(Telemetry::SERVICE_WORKER_CONTROLLED_DOCUMENTS, 1);
|
||||
@ -2787,28 +2784,6 @@ ServiceWorkerManager::IsAvailable(nsIPrincipal* aPrincipal,
|
||||
return registration && registration->GetActive();
|
||||
}
|
||||
|
||||
bool
|
||||
ServiceWorkerManager::IsControlled(nsIDocument* aDoc, ErrorResult& aRv)
|
||||
{
|
||||
MOZ_ASSERT(aDoc);
|
||||
|
||||
if (nsContentUtils::IsInPrivateBrowsing(aDoc)) {
|
||||
// Handle the case where a service worker was previously registered in
|
||||
// a non-private window (bug 1255621).
|
||||
return false;
|
||||
}
|
||||
|
||||
RefPtr<ServiceWorkerRegistrationInfo> registration;
|
||||
nsresult rv = GetDocumentRegistration(aDoc, getter_AddRefs(registration));
|
||||
if (NS_WARN_IF(NS_FAILED(rv) && rv != NS_ERROR_NOT_AVAILABLE)) {
|
||||
// It's OK to ignore the case where we don't have a registration.
|
||||
aRv.Throw(rv);
|
||||
return false;
|
||||
}
|
||||
|
||||
return !!registration;
|
||||
}
|
||||
|
||||
nsresult
|
||||
ServiceWorkerManager::GetDocumentRegistration(nsIDocument* aDoc,
|
||||
ServiceWorkerRegistrationInfo** aRegistrationInfo)
|
||||
@ -3273,7 +3248,7 @@ ServiceWorkerManager::UpdateClientControllers(ServiceWorkerRegistrationInfo* aRe
|
||||
RefPtr<ServiceWorkerInfo> activeWorker = aRegistration->GetActive();
|
||||
MOZ_DIAGNOSTIC_ASSERT(activeWorker);
|
||||
|
||||
AutoTArray<nsCOMPtr<nsPIDOMWindowInner>, 16> innerWindows;
|
||||
AutoTArray<nsCOMPtr<nsIDocument>, 16> docList;
|
||||
for (auto iter = mControlledDocuments.Iter(); !iter.Done(); iter.Next()) {
|
||||
if (iter.UserData() != aRegistration) {
|
||||
continue;
|
||||
@ -3284,24 +3259,20 @@ ServiceWorkerManager::UpdateClientControllers(ServiceWorkerRegistrationInfo* aRe
|
||||
continue;
|
||||
}
|
||||
|
||||
nsPIDOMWindowInner* innerWindow = doc->GetInnerWindow();
|
||||
if (NS_WARN_IF(!innerWindow)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
innerWindows.AppendElement(innerWindow);
|
||||
docList.AppendElement(doc.forget());
|
||||
}
|
||||
|
||||
// Fire event after iterating mControlledDocuments is done to prevent
|
||||
// modification by reentering from the event handlers during iteration.
|
||||
for (auto& innerWindow : innerWindows) {
|
||||
Maybe<ClientInfo> clientInfo = innerWindow->GetClientInfo();
|
||||
if (clientInfo.isSome()) {
|
||||
RefPtr<ClientHandle> clientHandle =
|
||||
ClientManager::CreateHandle(clientInfo.ref(),
|
||||
innerWindow->EventTargetFor(TaskCategory::Other));
|
||||
clientHandle->Control(activeWorker->Descriptor());
|
||||
for (auto& doc : docList) {
|
||||
Maybe<ClientInfo> clientInfo = doc->GetClientInfo();
|
||||
if (clientInfo.isNothing()) {
|
||||
continue;
|
||||
}
|
||||
RefPtr<ClientHandle> clientHandle =
|
||||
ClientManager::CreateHandle(clientInfo.ref(),
|
||||
SystemGroup::EventTargetFor(TaskCategory::Other));
|
||||
clientHandle->Control(activeWorker->Descriptor());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,9 +125,6 @@ public:
|
||||
bool
|
||||
IsAvailable(nsIPrincipal* aPrincipal, nsIURI* aURI);
|
||||
|
||||
bool
|
||||
IsControlled(nsIDocument* aDocument, ErrorResult& aRv);
|
||||
|
||||
// Return true if the given content process could potentially be executing
|
||||
// service worker code with the given principal. At the current time, this
|
||||
// just means that we have any registration for the origin, regardless of
|
||||
|
@ -136,7 +136,7 @@ WorkerGlobalScope::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
MOZ_CRASH("We should never get here!");
|
||||
}
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
WorkerGlobalScope::GetConsole(ErrorResult& aRv)
|
||||
{
|
||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||
@ -148,7 +148,8 @@ WorkerGlobalScope::GetConsole(ErrorResult& aRv)
|
||||
}
|
||||
}
|
||||
|
||||
return mConsole;
|
||||
RefPtr<Console> console = mConsole;
|
||||
return console.forget();
|
||||
}
|
||||
|
||||
Crypto*
|
||||
@ -1045,7 +1046,7 @@ WorkerDebuggerGlobalScope::SetConsoleEventHandler(JSContext* aCx,
|
||||
console->SetConsoleEventHandler(aHandler);
|
||||
}
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
WorkerDebuggerGlobalScope::GetConsole(ErrorResult& aRv)
|
||||
{
|
||||
mWorkerPrivate->AssertIsOnWorkerThread();
|
||||
@ -1058,7 +1059,8 @@ WorkerDebuggerGlobalScope::GetConsole(ErrorResult& aRv)
|
||||
}
|
||||
}
|
||||
|
||||
return mConsole;
|
||||
RefPtr<Console> console = mConsole;
|
||||
return console.forget();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -92,7 +92,7 @@ public:
|
||||
return this;
|
||||
}
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
GetConsole(ErrorResult& aRv);
|
||||
|
||||
Console*
|
||||
@ -410,7 +410,7 @@ public:
|
||||
SetConsoleEventHandler(JSContext* aCx, AnyCallback* aHandler,
|
||||
ErrorResult& aRv);
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
GetConsole(ErrorResult& aRv);
|
||||
|
||||
Console*
|
||||
|
@ -54,7 +54,7 @@ WorkletGlobalScope::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
WorkletGlobalScope::GetConsole(ErrorResult& aRv)
|
||||
{
|
||||
if (!mConsole) {
|
||||
@ -64,7 +64,8 @@ WorkletGlobalScope::GetConsole(ErrorResult& aRv)
|
||||
}
|
||||
}
|
||||
|
||||
return mConsole;
|
||||
RefPtr<Console> console = mConsole;
|
||||
return console.forget();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
return GetWrapper();
|
||||
}
|
||||
|
||||
Console*
|
||||
already_AddRefed<Console>
|
||||
GetConsole(ErrorResult& aRv);
|
||||
|
||||
void
|
||||
|
@ -168,7 +168,7 @@ ImageCacheKey::GetControlledDocumentToken(nsIDocument* aDocument)
|
||||
RefPtr<ServiceWorkerManager> swm = ServiceWorkerManager::GetInstance();
|
||||
if (aDocument && swm) {
|
||||
ErrorResult rv;
|
||||
if (swm->IsControlled(aDocument, rv)) {
|
||||
if (aDocument->GetController().isSome()) {
|
||||
pointer = aDocument;
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "mozilla/EndianUtils.h"
|
||||
#include "mozilla/Move.h"
|
||||
|
||||
#include "mozilla/gfx/Swizzle.h"
|
||||
|
||||
#include "RasterImage.h"
|
||||
|
||||
using namespace mozilla::gfx;
|
||||
@ -618,6 +620,13 @@ nsICODecoder::FinishMask()
|
||||
for (size_t i = 3 ; i < bmpDecoder->GetImageDataLength() ; i += 4) {
|
||||
imageData[i] = mMaskBuffer[i];
|
||||
}
|
||||
int32_t stride = mDownscaler->TargetSize().width * sizeof(uint32_t);
|
||||
DebugOnly<bool> ret =
|
||||
// We know the format is B8G8R8A8 because we always assume bmp's inside
|
||||
// ico's are transparent.
|
||||
PremultiplyData(imageData, stride, SurfaceFormat::B8G8R8A8,
|
||||
imageData, stride, SurfaceFormat::B8G8R8A8, mDownscaler->TargetSize());
|
||||
MOZ_ASSERT(ret);
|
||||
}
|
||||
|
||||
return Transition::To(ICOState::FINISHED_RESOURCE, 0);
|
||||
|
14
image/test/reftest/downscaling/1404366-1.html
Normal file
14
image/test/reftest/downscaling/1404366-1.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<!--
|
||||
1404366-1.ico is an ico file that contains a 32x32 0RGB (0 for all alpha values) bmp
|
||||
where the color values are all white. It also contains a mask. The mask alternates
|
||||
one pixel fully transparent, one pixel fully opaque. The result of drawing this on
|
||||
a white background should be white. This is testing that we premultiply the color
|
||||
values by the alpha derived from the mark when downscaling. If we do not skia will
|
||||
get confused and likely draw non white pixels.
|
||||
-->
|
||||
<img src="1404366-1.ico" style="width: 12px; height: 12px;">
|
||||
</body>
|
||||
</html>
|
BIN
image/test/reftest/downscaling/1404366-1.ico
Normal file
BIN
image/test/reftest/downscaling/1404366-1.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
@ -210,5 +210,6 @@ fuzzy(18,128) == downscale-32px.html?-png-in.ico downscale-32px-ref.html
|
||||
== huge-1.html?32768x100.jpg,100,100 huge-1.html?100x100.jpg,100,100
|
||||
== huge-1.html?32768x100.jpg,32768,100 huge-1.html?100x100.jpg,32768,100
|
||||
|
||||
# Only need to run this with downscaling on
|
||||
# Only need to run these with downscaling on
|
||||
!= 1421191-1.html about:blank
|
||||
== 1404366-1.html about:blank
|
||||
|
@ -23,14 +23,16 @@ available on linux64, and is built via the following procedure:
|
||||
% export PATH=$PATH:$(pwd)/depot_tools
|
||||
% mkdir breakpad
|
||||
% cd breakpad
|
||||
# python must be python2.7
|
||||
% fetch breakpad
|
||||
% cd src
|
||||
% git fetch https://github.com/hotsphink/breakpad injector
|
||||
% git checkout injector
|
||||
% git checkout FETCH_HEAD
|
||||
% cd ..
|
||||
% mkdir obj
|
||||
% cd obj
|
||||
% ../src/configure
|
||||
# Possibly set $PATH to include a recent gcc
|
||||
% ../src/configure --enable-static
|
||||
% mkdir ../root
|
||||
% make install DESTDIR=$(pwd)/../root
|
||||
|
||||
|
@ -367,14 +367,17 @@ if not args.nobuild:
|
||||
if use_minidump:
|
||||
# Convert symbols to breakpad format.
|
||||
hostdir = os.path.join(OBJDIR, "dist", "host", "bin")
|
||||
os.makedirs(hostdir)
|
||||
if not os.path.isdir(hostdir):
|
||||
os.makedirs(hostdir)
|
||||
shutil.copy(os.path.join(DIR.tooltool, "breakpad-tools", "dump_syms"),
|
||||
os.path.join(hostdir, 'dump_syms'))
|
||||
run_command([
|
||||
'make',
|
||||
'recurse_syms',
|
||||
'MOZ_SOURCE_REPO=file://' + DIR.source,
|
||||
'RUST_TARGET=0', 'RUSTC_COMMIT=0'
|
||||
'RUST_TARGET=0', 'RUSTC_COMMIT=0',
|
||||
'MOZ_CRASHREPORTER=1',
|
||||
'MOZ_AUTOMATION_BUILD_SYMBOLS=1',
|
||||
], check=True)
|
||||
|
||||
COMMAND_PREFIX = []
|
||||
|
@ -206,12 +206,18 @@ case "$target" in
|
||||
AC_SUBST(MSVC_C_RUNTIME_DLL)
|
||||
AC_SUBST(MSVC_CXX_RUNTIME_DLL)
|
||||
|
||||
# Check linker version
|
||||
_LD_FULL_VERSION=`"${LINK}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||
fi
|
||||
# Check linker version, except in lld builds
|
||||
case "$LINKER" in
|
||||
*lld*)
|
||||
;;
|
||||
*)
|
||||
_LD_FULL_VERSION=`"${LINKER}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
INCREMENTAL_LINKER=1
|
||||
|
||||
@ -675,8 +681,8 @@ case "$target" in
|
||||
RANLIB='echo not_ranlib'
|
||||
STRIP='echo not_strip'
|
||||
PKG_SKIP_STRIP=1
|
||||
MKSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
WIN32_SUBSYSTEM_VERSION=6.01
|
||||
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
||||
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
||||
|
@ -2,7 +2,7 @@
|
||||
# waitpid to dispatch tasks. This avoids several deadlocks that are possible
|
||||
# with fork/exec + threads + Python.
|
||||
|
||||
import errno, os, select, sys
|
||||
import errno, os, select, signal, sys
|
||||
from datetime import datetime, timedelta
|
||||
from progressbar import ProgressBar
|
||||
from results import NullTestOutput, TestOutput, escape_cmdline
|
||||
@ -131,14 +131,16 @@ def remove_task(tasks, pid):
|
||||
|
||||
def timed_out(task, timeout):
|
||||
"""
|
||||
Return True if the given task has been running for longer than |timeout|.
|
||||
|timeout| may be falsy, indicating an infinite timeout (in which case
|
||||
timed_out always returns False).
|
||||
Return a timedelta with the amount we are overdue, or False if the timeout
|
||||
has not yet been reached (or timeout is falsy, indicating there is no
|
||||
timeout.)
|
||||
"""
|
||||
if timeout:
|
||||
now = datetime.now()
|
||||
return (now - task.start) > timedelta(seconds=timeout)
|
||||
return False
|
||||
if not timeout:
|
||||
return False
|
||||
|
||||
elapsed = datetime.now() - task.start
|
||||
over = elapsed - timedelta(seconds=timeout)
|
||||
return over if over.total_seconds() > 0 else False
|
||||
|
||||
def reap_zombies(tasks, timeout):
|
||||
"""
|
||||
@ -181,11 +183,17 @@ def reap_zombies(tasks, timeout):
|
||||
|
||||
def kill_undead(tasks, timeout):
|
||||
"""
|
||||
Signal all children that are over the given timeout.
|
||||
Signal all children that are over the given timeout. Use SIGABRT first to
|
||||
generate a stack dump. If it still doesn't die for another 30 seconds, kill
|
||||
with SIGKILL.
|
||||
"""
|
||||
for task in tasks:
|
||||
if timed_out(task, timeout):
|
||||
os.kill(task.pid, 9)
|
||||
over = timed_out(task, timeout)
|
||||
if over:
|
||||
if over.total_seconds() < 30:
|
||||
os.kill(task.pid, signal.SIGABRT)
|
||||
else:
|
||||
os.kill(task.pid, signal.SIGKILL)
|
||||
|
||||
def run_all_tests(tests, prefix, pb, options):
|
||||
# Copy and reverse for fast pop off end.
|
||||
|
@ -6931,6 +6931,16 @@ PresShell::HandleEvent(nsIFrame* aFrame,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (EventStateManager::IsInputEventsSuppressed() &&
|
||||
(aEvent->mClass == eMouseEventClass ||
|
||||
aEvent->mClass == eWheelEventClass ||
|
||||
aEvent->mClass == ePointerEventClass ||
|
||||
aEvent->mClass == eTouchEventClass ||
|
||||
aEvent->mClass == eKeyboardEventClass ||
|
||||
aEvent->mClass == eCompositionEventClass)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
RecordMouseLocation(aEvent);
|
||||
|
||||
if (AccessibleCaretEnabled(mDocument->GetDocShell())) {
|
||||
|
@ -27,7 +27,7 @@ function doShiftDrag(){
|
||||
// key, follows by two mouse move events.
|
||||
|
||||
// Press on left-top corner of the canvas element.
|
||||
wu.sendMouseEvent('mousedown', canvasRect.left, canvasRect.top, 0, 1, 4);
|
||||
wu.sendMouseEvent('mousedown', canvasRect.left + 1, canvasRect.top + 1, 0, 1, 4);
|
||||
// Move to the center of this cavas element.
|
||||
wu.sendMouseEvent('mousemove', canvasRect.left + (canvasRect.width / 2),
|
||||
canvasRect.top + (canvasRect.height / 2), 0, 0, 4);
|
||||
|
@ -315,7 +315,7 @@ add_task(async function test_activeTab_pageAction_popup() {
|
||||
const popupTabId = popupTab.id;
|
||||
|
||||
let onceTabClosed = new Promise(resolve => {
|
||||
BrowserApp.deck.addEventListener("TabClose", resolve, {once: true});
|
||||
BrowserApp.deck.addEventListener("TabClose", () => setTimeout(resolve, 0), {once: true});
|
||||
});
|
||||
|
||||
// Switch to the parent tab of the popup tab.
|
||||
@ -444,7 +444,7 @@ add_task(async function test_activeTab_browserAction_popup() {
|
||||
const popupTabId = popupTab.id;
|
||||
|
||||
let onceTabClosed = new Promise(resolve => {
|
||||
BrowserApp.deck.addEventListener("TabClose", resolve, {once: true});
|
||||
BrowserApp.deck.addEventListener("TabClose", () => setTimeout(resolve, 0), {once: true});
|
||||
});
|
||||
|
||||
// Switch to the parent tab of the popup tab.
|
||||
|
@ -45,12 +45,10 @@ public class GeckoDisplay {
|
||||
|
||||
/**
|
||||
* Optional callback. The display's coordinates on the screen has changed. Must be
|
||||
* called on the application main thread. Together with the transformation matrix, the
|
||||
* screen origin determines how a point on the display maps to a point on the screen.
|
||||
* called on the application main thread.
|
||||
*
|
||||
* @param left The X coordinate of the display on the screen, in screen pixels.
|
||||
* @param top The Y coordinate of the display on the screen, in screen pixels.
|
||||
* @see #transformationMatrixChanged(Matrix)
|
||||
*/
|
||||
public void screenOriginChanged(final int left, final int top) {
|
||||
mSession.onScreenOriginChanged(left, top);
|
||||
|
@ -117,11 +117,7 @@ LoadInfo::LoadInfo(nsIPrincipal* aLoadingPrincipal,
|
||||
// Ensure that all network requests for a window client have the ClientInfo
|
||||
// properly set.
|
||||
// TODO: The ClientInfo is not set properly for worker initiated requests yet.
|
||||
nsCOMPtr<nsPIDOMWindowInner> contextInner =
|
||||
aLoadingContext->OwnerDoc()->GetInnerWindow();
|
||||
if (contextInner) {
|
||||
mClientInfo = contextInner->GetClientInfo();
|
||||
}
|
||||
mClientInfo = aLoadingContext->OwnerDoc()->GetClientInfo();
|
||||
|
||||
nsCOMPtr<nsPIDOMWindowOuter> contextOuter = aLoadingContext->OwnerDoc()->GetWindow();
|
||||
if (contextOuter) {
|
||||
|
@ -395,6 +395,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err,
|
||||
// We will disable Fast Open.
|
||||
SOCKET_LOG(("TCPFastOpenFinish - sendto not implemented.\n"));
|
||||
fastOpenNotSupported = true;
|
||||
tfoStatus = TFO_DISABLED;
|
||||
}
|
||||
} else {
|
||||
// We have some data ready in the buffer we will send it with the syn
|
||||
@ -432,6 +433,7 @@ TCPFastOpenFinish(PRFileDesc *fd, PRErrorCode &err,
|
||||
} else {
|
||||
result = PR_GetError();
|
||||
}
|
||||
tfoStatus = TFO_DISABLED;
|
||||
} else {
|
||||
tfoStatus = TFO_TRIED;
|
||||
}
|
||||
|
@ -20,17 +20,51 @@ namespace net {
|
||||
**/
|
||||
|
||||
typedef enum {
|
||||
TFO_NOT_TRIED,
|
||||
TFO_TRIED,
|
||||
TFO_DATA_SENT,
|
||||
TFO_NOT_SET, // This is only as a control.
|
||||
// A connection not using TFO will have the TFO state set upon
|
||||
// connection creation (in nsHalfOpenSocket::SetupConn).
|
||||
// A connection using TFO will have the TFO state set after
|
||||
// the connection is established or canceled.
|
||||
TFO_UNKNOWN, // This is before the primary socket is built, i.e. before
|
||||
// TCPFastOpenFinish is called.
|
||||
TFO_DISABLED, // tfo is disabled because of a tfo error on a previous
|
||||
// connection to the host (i.e. !mEnt->mUseFastOpen).
|
||||
// If TFO is not supported by the OS, it is disabled by
|
||||
// the pref or too many consecutive errors occurred, this value
|
||||
// is not reported. This is set before StartFastOpen is called.
|
||||
TFO_DISABLED_CONNECT, // Connection is using CONNECT. This is set before
|
||||
// StartFastOpen is called.
|
||||
// The following 3 are set just after TCPFastOpenFinish.
|
||||
TFO_NOT_TRIED, // For some reason TCPFastOpenLayer does not have any data to
|
||||
// send with the syn packet. This should never happen.
|
||||
TFO_TRIED, // TCP has sent a TFO cookie request.
|
||||
TFO_DATA_SENT, // On Linux, TCP has send data as well. (On Linux we do not
|
||||
// know whether data has been accepted).
|
||||
// On Windows, TCP has send data or only a TFO cookie request
|
||||
// and the data or TFO cookie has been accepted by the server.
|
||||
// The following value is only used on windows and is set after
|
||||
// PR_ConnectContinue. That is the point when we know if TFO data was been
|
||||
// accepted.
|
||||
TFO_DATA_COOKIE_NOT_ACCEPTED, // This is only on Windows. TFO data or TFO
|
||||
// cookie request has not been accepted.
|
||||
// The following 3 are set during socket error recover
|
||||
// (nsSocketTransport::RecoverFromError).
|
||||
TFO_FAILED_CONNECTION_REFUSED,
|
||||
TFO_FAILED_NET_TIMEOUT,
|
||||
TFO_FAILED_UNKNOW_ERROR,
|
||||
TFO_FAILED_BACKUP_CONNECTION,
|
||||
// The following 4 are set when backup connection finishes before the primary
|
||||
// connection.
|
||||
TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED,
|
||||
TFO_FAILED_BACKUP_CONNECTION_TFO_TRIED,
|
||||
TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_SENT,
|
||||
TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED,
|
||||
// The following 4 are set when the recovery connection fails as well.
|
||||
TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO,
|
||||
TFO_FAILED_NET_TIMEOUT__NO_TFO_FAILED_TOO,
|
||||
TFO_FAILED_NET_TIMEOUT_NO_TFO_FAILED_TOO,
|
||||
TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO,
|
||||
TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO,
|
||||
TFO_BACKUP_CONN, // This is a backup conn, for a halfOpenSock that was used
|
||||
// TFO.
|
||||
TFO_FAILED,
|
||||
TFO_HTTP // TFO is disabled for non-secure connections.
|
||||
} TFOResult;
|
||||
|
@ -799,7 +799,7 @@ nsSocketTransport::nsSocketTransport()
|
||||
, mKeepaliveProbeCount(-1)
|
||||
, mFastOpenCallback(nullptr)
|
||||
, mFastOpenLayerHasBufferedData(false)
|
||||
, mFastOpenStatus(TFO_NOT_TRIED)
|
||||
, mFastOpenStatus(TFO_NOT_SET)
|
||||
, mFirstRetryError(NS_OK)
|
||||
, mDoNotRetryToConnect(false)
|
||||
{
|
||||
@ -2214,9 +2214,9 @@ nsSocketTransport::OnSocketReady(PRFileDesc *fd, int16_t outFlags)
|
||||
BOOL option = 0;
|
||||
int len = sizeof(option);
|
||||
PRInt32 rv = getsockopt((SOCKET)osfd, IPPROTO_TCP, TCP_FASTOPEN, (char*)&option, &len);
|
||||
if ((rv != 0) && !option) {
|
||||
if (!rv && !option) {
|
||||
// On error, I will let the normal necko paths pickup the error.
|
||||
mFastOpenCallback->SetFastOpenStatus(TFO_NOT_TRIED);
|
||||
mFastOpenCallback->SetFastOpenStatus(TFO_DATA_COOKIE_NOT_ACCEPTED);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -1100,6 +1100,19 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
|
||||
// DoOnStopRequest() calls ReleaseListeners()
|
||||
}
|
||||
|
||||
// If unknownDecoder is involved and the received content is short we will
|
||||
// know whether we need to divert to parent only after OnStopRequest of the
|
||||
// listeners chain is called in DoOnStopRequest. At that moment
|
||||
// unknownDecoder will call OnStartRequest of the real listeners of the
|
||||
// channel including the OnStopRequest of UrlLoader which decides whether we
|
||||
// need to divert to parent.
|
||||
// If we are diverting to parent we should not do a cleanup.
|
||||
if (mDivertingToParent) {
|
||||
LOG(("HttpChannelChild::OnStopRequest - We are diverting to parent, "
|
||||
"postpone cleaning up."));
|
||||
return;
|
||||
}
|
||||
|
||||
CleanupBackgroundChannel();
|
||||
|
||||
// If there is a possibility we might want to write alt data to the cache
|
||||
|
@ -87,7 +87,7 @@ nsHttpConnection::nsHttpConnection()
|
||||
, mEarlyDataNegotiated(false)
|
||||
, mDid0RTTSpdy(false)
|
||||
, mFastOpen(false)
|
||||
, mFastOpenStatus(TFO_NOT_TRIED)
|
||||
, mFastOpenStatus(TFO_NOT_SET)
|
||||
, mForceSendDuringFastOpenPending(false)
|
||||
, mReceivedSocketWouldBlockDuringFastOpen(false)
|
||||
{
|
||||
@ -127,12 +127,12 @@ nsHttpConnection::~nsHttpConnection()
|
||||
|
||||
if ((mFastOpenStatus != TFO_FAILED) &&
|
||||
(mFastOpenStatus != TFO_HTTP) &&
|
||||
((mFastOpenStatus != TFO_NOT_TRIED) ||
|
||||
((mFastOpenStatus != TFO_DISABLED) ||
|
||||
gHttpHandler->UseFastOpen())) {
|
||||
// TFO_FAILED will be reported in the replacement connection with more
|
||||
// details.
|
||||
// Otherwise report only if TFO is enabled and supported.
|
||||
Telemetry::Accumulate(Telemetry::TCP_FAST_OPEN_2, mFastOpenStatus);
|
||||
Telemetry::Accumulate(Telemetry::TCP_FAST_OPEN_3, mFastOpenStatus);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2446,11 +2446,20 @@ void
|
||||
nsHttpConnection::SetFastOpenStatus(uint8_t tfoStatus) {
|
||||
mFastOpenStatus = tfoStatus;
|
||||
if ((mFastOpenStatus >= TFO_FAILED_CONNECTION_REFUSED) &&
|
||||
(mFastOpenStatus <= TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED) &&
|
||||
mSocketTransport) {
|
||||
nsresult firstRetryError;
|
||||
if (NS_SUCCEEDED(mSocketTransport->GetFirstRetryError(&firstRetryError)) &&
|
||||
(NS_FAILED(firstRetryError))) {
|
||||
mFastOpenStatus = tfoStatus + 4;
|
||||
if ((mFastOpenStatus >= TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED) &&
|
||||
(mFastOpenStatus <= TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED)) {
|
||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO;
|
||||
} else {
|
||||
// We add +7 to tranform TFO_FAILED_CONNECTION_REFUSED into
|
||||
// TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO, etc.
|
||||
// If the list in TCPFastOpenLayer.h changes please addapt +7.
|
||||
mFastOpenStatus = tfoStatus + 7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3855,6 +3855,7 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
|
||||
, mHasConnected(false)
|
||||
, mPrimaryConnectedOK(false)
|
||||
, mBackupConnectedOK(false)
|
||||
, mBackupConnStatsSet(false)
|
||||
, mFreeToUse(true)
|
||||
, mPrimaryStreamStatus(NS_OK)
|
||||
, mFastOpenInProgress(false)
|
||||
@ -3875,7 +3876,7 @@ nsHalfOpenSocket::nsHalfOpenSocket(nsConnectionEntry *ent,
|
||||
}
|
||||
|
||||
if (mEnt->mConnInfo->FirstHopSSL()) {
|
||||
mFastOpenStatus = TFO_NOT_TRIED;
|
||||
mFastOpenStatus = TFO_UNKNOWN;
|
||||
} else {
|
||||
mFastOpenStatus = TFO_HTTP;
|
||||
}
|
||||
@ -3985,8 +3986,12 @@ nsHalfOpenSocket::SetupStreams(nsISocketTransport **transport,
|
||||
tmpFlags |= nsISocketTransport::DISABLE_RFC1918;
|
||||
}
|
||||
|
||||
if (!isBackup && mEnt->mUseFastOpen) {
|
||||
socketTransport->SetFastOpenCallback(this);
|
||||
if (!isBackup) {
|
||||
if (mEnt->mUseFastOpen) {
|
||||
socketTransport->SetFastOpenCallback(this);
|
||||
} else {
|
||||
mFastOpenStatus = TFO_DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
socketTransport->SetConnectionFlags(tmpFlags);
|
||||
@ -4310,9 +4315,30 @@ nsHalfOpenSocket::OnOutputStreamReady(nsIAsyncOutputStream *out)
|
||||
|
||||
mFastOpenInProgress = false;
|
||||
mConnectionNegotiatingFastOpen = nullptr;
|
||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION;
|
||||
if (mFastOpenStatus == TFO_NOT_TRIED) {
|
||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED;
|
||||
} else if (mFastOpenStatus == TFO_TRIED) {
|
||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_TRIED;
|
||||
} else if (mFastOpenStatus == TFO_DATA_SENT) {
|
||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_SENT;
|
||||
} else {
|
||||
// This is TFO_DATA_COOKIE_NOT_ACCEPTED (I think this cannot
|
||||
// happened, because the primary connection will be already
|
||||
// connected or in recovery and mFastOpenInProgress==false).
|
||||
mFastOpenStatus = TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED;
|
||||
}
|
||||
}
|
||||
|
||||
if (((mFastOpenStatus == TFO_DISABLED) ||
|
||||
(mFastOpenStatus == TFO_HTTP)) && !mBackupConnStatsSet) {
|
||||
// Collect telemetry for backup connection being faster than primary
|
||||
// connection. We want to collect this telemetry only for cases where
|
||||
// TFO is not used.
|
||||
mBackupConnStatsSet = true;
|
||||
Telemetry::ScalarSet(Telemetry::ScalarID::NETWORK_HTTP_BACKUP_CONN_WON,
|
||||
(out == mBackupStreamOut));
|
||||
}
|
||||
|
||||
nsresult rv = SetupConn(out, false);
|
||||
if (mEnt) {
|
||||
mEnt->mDoNotDestroy = false;
|
||||
@ -4332,6 +4358,8 @@ nsHalfOpenSocket::FastOpenEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mEnt->mConnInfo->FirstHopSSL());
|
||||
|
||||
// If mEnt is present this HalfOpen must be in the mHalfOpens,
|
||||
// but we want to be sure!!!
|
||||
if (!mEnt->mHalfOpens.Contains(this)) {
|
||||
@ -4342,6 +4370,7 @@ nsHalfOpenSocket::FastOpenEnabled()
|
||||
// fast open was turned off.
|
||||
LOG(("nsHalfOpenSocket::FastEnabled - fast open was turned off.\n"));
|
||||
mEnt->mUseFastOpen = false;
|
||||
mFastOpenStatus = TFO_DISABLED;
|
||||
return false;
|
||||
}
|
||||
// We can use FastOpen if we have a transaction or if it is ssl
|
||||
@ -4350,25 +4379,11 @@ nsHalfOpenSocket::FastOpenEnabled()
|
||||
// the connection will be 100% ready for the next transaction to use it.
|
||||
// Make an exception for SSL tunneled HTTP proxy as the NullHttpTransaction
|
||||
// does not know how to drive Connect.
|
||||
RefPtr<PendingTransactionInfo> info = FindTransactionHelper(false);
|
||||
|
||||
if ((!info) &&
|
||||
(!mEnt->mConnInfo->FirstHopSSL() || mEnt->mConnInfo->UsingConnect())) {
|
||||
LOG(("nsHalfOpenSocket::FastOpenEnabled - It is a connection without "
|
||||
"transaction and first hop is not ssl.\n"));
|
||||
if (mEnt->mConnInfo->UsingConnect()) {
|
||||
LOG(("nsHalfOpenSocket::FastOpenEnabled - It is using Connect."));
|
||||
mFastOpenStatus = TFO_DISABLED_CONNECT;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((info) && !mEnt->mConnInfo->FirstHopSSL()) {
|
||||
// The following function call will check whether is possible to send
|
||||
// data during fast open
|
||||
if (!info->mTransaction->CanDo0RTT()) {
|
||||
LOG(("nsHalfOpenSocket::FastOpenEnabled - it is not safe to restart "
|
||||
"transaction.\n"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -4556,7 +4571,13 @@ nsHalfOpenSocket::SetFastOpenConnected(nsresult aError, bool aWillRetry)
|
||||
mStreamOut = nullptr;
|
||||
mStreamIn = nullptr;
|
||||
|
||||
Abandon();
|
||||
// If backup transport has already started put this HalfOpen back to
|
||||
// mEnt list.
|
||||
if (mBackupTransport) {
|
||||
mFastOpenStatus = TFO_BACKUP_CONN;
|
||||
mEnt->mHalfOpens.AppendElement(this);
|
||||
gHttpHandler->ConnMgr()->mNumHalfOpenConns++;
|
||||
}
|
||||
}
|
||||
|
||||
mFastOpenInProgress = false;
|
||||
@ -4576,6 +4597,7 @@ nsHttpConnectionMgr::
|
||||
nsHalfOpenSocket::SetFastOpenStatus(uint8_t tfoStatus)
|
||||
{
|
||||
MOZ_ASSERT(mFastOpenInProgress);
|
||||
mFastOpenStatus = tfoStatus;
|
||||
mConnectionNegotiatingFastOpen->SetFastOpenStatus(tfoStatus);
|
||||
mConnectionNegotiatingFastOpen->Transaction()->SetFastOpenStatus(tfoStatus);
|
||||
}
|
||||
@ -4804,6 +4826,10 @@ nsHalfOpenSocket::SetupConn(nsIAsyncOutputStream *out,
|
||||
}
|
||||
} else {
|
||||
conn->SetFastOpenStatus(mFastOpenStatus);
|
||||
mFastOpenStatus = TFO_BACKUP_CONN; // Set this to TFO_BACKUP_CONN so
|
||||
// that if a backup connection is
|
||||
// established we do not report
|
||||
// values twice.
|
||||
}
|
||||
|
||||
// If this halfOpenConn was speculative, but at the ende the conn got a
|
||||
|
@ -476,6 +476,7 @@ private:
|
||||
|
||||
bool mPrimaryConnectedOK;
|
||||
bool mBackupConnectedOK;
|
||||
bool mBackupConnStatsSet;
|
||||
|
||||
// A nsHalfOpenSocket can be made for a concrete non-null transaction,
|
||||
// but the transaction can be dispatch to another connection. In that
|
||||
|
@ -78,6 +78,7 @@
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#include <windows.h>
|
||||
#include "mozilla/WindowsVersion.h"
|
||||
#endif
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
@ -308,6 +309,8 @@ nsHttpHandler::SetFastOpenOSSupport()
|
||||
mFastOpenSupported = false;
|
||||
#if !defined(XP_WIN) && !defined(XP_LINUX) && !defined(ANDROID) && !defined(HAS_CONNECTX)
|
||||
return;
|
||||
#elif defined(XP_WIN)
|
||||
mFastOpenSupported = IsWindows10BuildOrLater(16299);
|
||||
#else
|
||||
|
||||
nsAutoCString version;
|
||||
@ -332,9 +335,7 @@ nsHttpHandler::SetFastOpenOSSupport()
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
// set min version minus 1.
|
||||
#ifdef XP_WIN
|
||||
int min_version[] = {10, 0};
|
||||
#elif XP_MACOSX
|
||||
#if XP_MACOSX
|
||||
int min_version[] = {15, 0};
|
||||
#elif ANDROID
|
||||
int min_version[] = {4, 4};
|
||||
@ -366,16 +367,6 @@ nsHttpHandler::SetFastOpenOSSupport()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (mFastOpenSupported) {
|
||||
// We have some problems with lavasoft software and tcp fast open.
|
||||
if (GetModuleHandleW(L"pmls64.dll") || GetModuleHandleW(L"rlls64.dll")) {
|
||||
mFastOpenSupported = false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LOG(("nsHttpHandler::SetFastOpenOSSupport %s supported.\n",
|
||||
mFastOpenSupported ? "" : "not"));
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ server.start(-1);
|
||||
var baseURL = "http://localhost:" + server.identity.primaryPort + "/";
|
||||
var maxConnections = 0;
|
||||
var debug = false;
|
||||
var dummyResponseQueue = new Array();
|
||||
var responseQueue = new Array();
|
||||
|
||||
function log(msg) {
|
||||
if (!debug) {
|
||||
@ -48,10 +50,10 @@ function serverStopListener() {
|
||||
server.stop();
|
||||
}
|
||||
|
||||
function createHttpRequest(requestId, priority, isBlocking) {
|
||||
function createHttpRequest(requestId, priority, isBlocking, callback) {
|
||||
let uri = baseURL;
|
||||
var chan = make_channel(uri);
|
||||
var listner = new HttpResponseListener(requestId);
|
||||
var listner = new HttpResponseListener(requestId, callback);
|
||||
chan.setRequestHeader("X-ID", requestId, false);
|
||||
chan.setRequestHeader("Cache-control", "no-store", false);
|
||||
chan.QueryInterface(Ci.nsISupportsPriority).priority = priority;
|
||||
@ -63,10 +65,10 @@ function createHttpRequest(requestId, priority, isBlocking) {
|
||||
log("Create http request id=" + requestId);
|
||||
}
|
||||
|
||||
function setup_dummyHttpRequests() {
|
||||
function setup_dummyHttpRequests(callback) {
|
||||
log("setup_dummyHttpRequests");
|
||||
for (var i = 0; i < maxConnections ; i++) {
|
||||
createHttpRequest(i, i, false);
|
||||
createHttpRequest(i, i, false, callback);
|
||||
do_test_pending();
|
||||
}
|
||||
}
|
||||
@ -99,9 +101,10 @@ function check_response_id(responses)
|
||||
}
|
||||
}
|
||||
|
||||
function HttpResponseListener(id)
|
||||
function HttpResponseListener(id, onStopCallback)
|
||||
{
|
||||
this.id = id
|
||||
this.stopCallback = onStopCallback;
|
||||
};
|
||||
|
||||
HttpResponseListener.prototype =
|
||||
@ -115,10 +118,12 @@ HttpResponseListener.prototype =
|
||||
onStopRequest: function (request, ctx, status) {
|
||||
log("STOP id=" + this.id);
|
||||
do_test_finished();
|
||||
if (this.stopCallback) {
|
||||
this.stopCallback();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var responseQueue = new Array();
|
||||
function setup_http_server()
|
||||
{
|
||||
log("setup_http_server");
|
||||
@ -134,13 +139,18 @@ function setup_http_server()
|
||||
|
||||
response.processAsync();
|
||||
response.setHeader("X-ID", id);
|
||||
responseQueue.push(response);
|
||||
|
||||
if (responseQueue.length == maxConnections && !allDummyHttpRequestReceived) {
|
||||
if (!allDummyHttpRequestReceived) {
|
||||
dummyResponseQueue.push(response);
|
||||
} else {
|
||||
responseQueue.push(response);
|
||||
}
|
||||
|
||||
if (dummyResponseQueue.length == maxConnections) {
|
||||
log("received all dummy http requets");
|
||||
allDummyHttpRequestReceived = true;
|
||||
setup_HttpRequests();
|
||||
processResponses();
|
||||
processDummyResponse();
|
||||
} else if (responseQueue.length == maxConnections) {
|
||||
log("received all http requets");
|
||||
check_response_id(responseQueue);
|
||||
@ -155,6 +165,14 @@ function setup_http_server()
|
||||
|
||||
}
|
||||
|
||||
function processDummyResponse() {
|
||||
if (!dummyResponseQueue.length) {
|
||||
return;
|
||||
}
|
||||
var resposne = dummyResponseQueue.pop();
|
||||
resposne.finish();
|
||||
}
|
||||
|
||||
function processResponses() {
|
||||
while (responseQueue.length) {
|
||||
var resposne = responseQueue.pop();
|
||||
@ -164,5 +182,5 @@ function processResponses() {
|
||||
|
||||
function run_test() {
|
||||
setup_http_server();
|
||||
setup_dummyHttpRequests();
|
||||
setup_dummyHttpRequests(processDummyResponse);
|
||||
}
|
||||
|
@ -242,12 +242,18 @@ case "$target" in
|
||||
WIN32_REDIST_DIR=`cd "$WIN32_REDIST_DIR" && pwd -W`
|
||||
fi
|
||||
|
||||
# Check linker version
|
||||
_LD_FULL_VERSION=`"${LINK}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||
fi
|
||||
# Check linker version, except in lld builds
|
||||
case "$LINKER" in
|
||||
*lld*)
|
||||
;;
|
||||
*)
|
||||
_LD_FULL_VERSION=`"${LINKER}" -v 2>&1 | sed -nre "$_MSVC_VER_FILTER"`
|
||||
_LD_MAJOR_VERSION=`echo ${_LD_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
|
||||
if test "$_LD_MAJOR_VERSION" != "$_CC_SUITE"; then
|
||||
AC_MSG_ERROR([The linker major version, $_LD_FULL_VERSION, does not match the compiler suite version, $_CC_SUITE.])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
INCREMENTAL_LINKER=1
|
||||
|
||||
@ -901,8 +907,8 @@ case "$target" in
|
||||
RANLIB='echo not_ranlib'
|
||||
STRIP='echo not_strip'
|
||||
PKG_SKIP_STRIP=1
|
||||
MKSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LINK) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
MKCSHLIB='$(LINKER) -NOLOGO -DLL -OUT:$@ -PDB:$(LINK_PDBFILE) $(DSO_LDOPTS)'
|
||||
WIN32_SUBSYSTEM_VERSION=6.01
|
||||
WIN32_CONSOLE_EXE_LDFLAGS=-SUBSYSTEM:CONSOLE,$WIN32_SUBSYSTEM_VERSION
|
||||
WIN32_GUI_EXE_LDFLAGS=-SUBSYSTEM:WINDOWS,$WIN32_SUBSYSTEM_VERSION
|
||||
|
@ -1159,4 +1159,4 @@ static const TransportSecurityPreload kPublicKeyPinningPreloadList[] = {
|
||||
|
||||
static const int32_t kUnknownId = -1;
|
||||
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1522175596241000);
|
||||
static const PRTime kPreloadPKPinsExpirationTime = INT64_C(1522262045635000);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,7 +8,7 @@
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <stdint.h>
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1524594783507000);
|
||||
const PRTime gPreloadListExpirationTime = INT64_C(1524681233383000);
|
||||
%%
|
||||
0-1.party, 1
|
||||
0.me.uk, 1
|
||||
@ -1695,6 +1695,7 @@ angelinahair.com, 1
|
||||
angeloventuri.com, 1
|
||||
anginf.de, 1
|
||||
anglertanke.de, 1
|
||||
anglesya.win, 1
|
||||
anglictina-sojcak.cz, 1
|
||||
anglictinasojcak.cz, 1
|
||||
anglingactive.co.uk, 1
|
||||
@ -1726,6 +1727,7 @@ anime1.pw, 1
|
||||
anime1.top, 1
|
||||
animeai.com, 1
|
||||
animefluxxx.com, 1
|
||||
animesharp.com, 1
|
||||
animorphsfanforum.com, 1
|
||||
anipassion.com, 1
|
||||
anita-mukorom.hu, 1
|
||||
@ -2466,6 +2468,7 @@ augustiner-kantorei-erfurt.de, 1
|
||||
augustiner-kantorei.de, 1
|
||||
aukaraoke.su, 1
|
||||
aulaschrank.gq, 1
|
||||
aulo.in, 0
|
||||
aunali1.com, 1
|
||||
auntie-eileens.com.au, 1
|
||||
auplidespages.fr, 1
|
||||
@ -2963,7 +2966,7 @@ bazos.cz, 1
|
||||
bazos.sk, 1
|
||||
bazziergraphik.com, 1
|
||||
bb37roma.it, 1
|
||||
bbb1991.me, 1
|
||||
bbb1991.me, 0
|
||||
bbcastles.com, 1
|
||||
bbdos.ru, 1
|
||||
bbgeschenke.ch, 1
|
||||
@ -3781,6 +3784,7 @@ blockmetry.com, 1
|
||||
blockstream.com, 1
|
||||
blockxit.de, 1
|
||||
bloemendal.me, 1
|
||||
blog-grupom2.es, 1
|
||||
blog.gov.uk, 1
|
||||
blog.gparent.org, 1
|
||||
blog.linode.com, 0
|
||||
@ -3942,7 +3946,7 @@ bondskampeerder.nl, 1
|
||||
bonesserver.com, 1
|
||||
bonfi.net, 1
|
||||
bonifacius.be, 1
|
||||
bonigo.de, 0
|
||||
bonigo.de, 1
|
||||
bonita.com.br, 1
|
||||
bonnant-associes.ch, 1
|
||||
bonnant-partners.ch, 1
|
||||
@ -4354,6 +4358,7 @@ brightonbank.com, 1
|
||||
brightonbouncycastles.net, 1
|
||||
brightonchilli.org.uk, 1
|
||||
brightstarkids.co.uk, 0
|
||||
brightstarkids.com.au, 0
|
||||
brightstarkids.net, 0
|
||||
brightstarkids.sg, 0
|
||||
brigidaarie.com, 1
|
||||
@ -4626,6 +4631,7 @@ buypapercheap.net, 1
|
||||
buyseo.store, 1
|
||||
buyshoe.org, 1
|
||||
buytheway.co.za, 1
|
||||
buzz.tools, 1
|
||||
buzzconf.io, 1
|
||||
buzzdeck.com, 1
|
||||
buzzprint.it, 1
|
||||
@ -5639,7 +5645,6 @@ chronoproject.com, 1
|
||||
chronoshop.cz, 1
|
||||
chrpaul.de, 1
|
||||
chrstn.eu, 1
|
||||
chs.us, 1
|
||||
chsh.moe, 1
|
||||
chsterz.de, 1
|
||||
chua.family, 1
|
||||
@ -5722,7 +5727,7 @@ cirugiasplasticas.com.mx, 1
|
||||
cirujanooral.com, 1
|
||||
cirurgicagervasio.com.br, 1
|
||||
cirurgicalucena.com.br, 1
|
||||
ciscodude.net, 0
|
||||
ciscodude.net, 1
|
||||
cisoaid.com, 1
|
||||
ciss.ltd, 1
|
||||
cisy.me, 1
|
||||
@ -6030,7 +6035,6 @@ coda.moe, 1
|
||||
coda.today, 1
|
||||
coda.world, 1
|
||||
code-golf.io, 1
|
||||
code-judge.tk, 1
|
||||
code-poets.co.uk, 1
|
||||
code-well.com, 1
|
||||
code.facebook.com, 0
|
||||
@ -7107,6 +7111,7 @@ dandymrsb.com, 1
|
||||
daneandthepain.com, 1
|
||||
dango.in, 1
|
||||
daniel-baumann.ch, 1
|
||||
daniel-du.com, 1
|
||||
daniel-kulbe.de, 1
|
||||
daniel-ruf.de, 1
|
||||
daniel-seifert.com, 1
|
||||
@ -7822,7 +7827,6 @@ diamondyze.nl, 1
|
||||
diamorphine.com, 1
|
||||
diamsmedia.ch, 1
|
||||
dianefriedli.ch, 1
|
||||
diannaobos.com, 1
|
||||
dianurse.com, 1
|
||||
diare-na-miru.cz, 1
|
||||
diario-egipto.com, 1
|
||||
@ -7848,7 +7852,6 @@ dicionarioetimologico.com.br, 1
|
||||
dick.red, 1
|
||||
dickieslife.com, 1
|
||||
dickpics.ru, 1
|
||||
dicoding.com, 1
|
||||
didacte.com, 1
|
||||
didche.net, 1
|
||||
diddens.de, 1
|
||||
@ -7990,6 +7993,7 @@ dipling.de, 1
|
||||
dipulse.it, 1
|
||||
dir2epub.com, 1
|
||||
dir2epub.org, 1
|
||||
direct2uk.com, 1
|
||||
directebanking.com, 1
|
||||
directinsure.in, 1
|
||||
directlinkfunding.co.uk, 1
|
||||
@ -8023,7 +8027,7 @@ disconformity.net, 1
|
||||
discord-chan.net, 1
|
||||
discordapp.com, 1
|
||||
discordghost.space, 1
|
||||
discotek.club, 1
|
||||
discotek.club, 0
|
||||
discount24.de, 1
|
||||
discountmania.eu, 1
|
||||
discountmetaux.fr, 1
|
||||
@ -8647,7 +8651,6 @@ dustygroove.com, 1
|
||||
dustyspokesbnb.ca, 1
|
||||
dutch.desi, 1
|
||||
dutch1.nl, 1
|
||||
dutchessuganda.com, 1
|
||||
dutchrank.nl, 1
|
||||
dutchwanderers.nl, 1
|
||||
dutchweballiance.nl, 1
|
||||
@ -9459,7 +9462,7 @@ epiteugma.com, 1
|
||||
epizentrum.work, 1
|
||||
epizentrum.works, 1
|
||||
epmcentroitalia.it, 1
|
||||
epoch.com, 0
|
||||
epoch.com, 1
|
||||
epolitiker.com, 1
|
||||
epos-distributor.co.uk, 1
|
||||
eposbirmingham.co.uk, 1
|
||||
@ -9939,7 +9942,6 @@ exploit.party, 1
|
||||
exploit.ph, 1
|
||||
exploited.cz, 1
|
||||
exploodo.rocks, 1
|
||||
exploravacations.in, 1
|
||||
expo-america.ru, 1
|
||||
expo-asia.ru, 1
|
||||
expo-europe.ru, 1
|
||||
@ -10111,6 +10113,7 @@ fallenangeldrinks.eu, 1
|
||||
fallenangelspirits.co.uk, 1
|
||||
fallenangelspirits.com, 1
|
||||
fallenspirits.co.uk, 1
|
||||
fallofthecitadel.com, 1
|
||||
falsum.net, 1
|
||||
fam-kreibich.de, 1
|
||||
fam-stemmer.de, 1
|
||||
@ -11436,7 +11439,6 @@ gamingreinvented.com, 1
|
||||
gamingwithcromulent.com, 1
|
||||
gamingzoneservers.com, 1
|
||||
gamishou.fr, 1
|
||||
gamoice.com, 1
|
||||
gamoloco.com, 1
|
||||
ganado.org, 1
|
||||
gancedo.com.es, 1
|
||||
@ -11850,7 +11852,6 @@ gillmanandsoame.co.uk, 1
|
||||
gillyscastles.co.uk, 1
|
||||
gilmoreid.com.au, 1
|
||||
gilnet.be, 1
|
||||
gilroywestwood.org, 1
|
||||
gina-architektur.design, 1
|
||||
ginie.de, 1
|
||||
ginionusedcars.be, 1
|
||||
@ -14950,7 +14951,6 @@ jamstatic.fr, 0
|
||||
jamyeprice.com, 1
|
||||
jan-and-maaret.de, 1
|
||||
jan-bucher.ch, 1
|
||||
jan-cermak.cz, 1
|
||||
jan-rieger.de, 1
|
||||
jan-von.de, 1
|
||||
janada.cz, 1
|
||||
@ -15528,6 +15528,7 @@ julianickel.de, 1
|
||||
julianmeyer.de, 1
|
||||
juliansimioni.com, 1
|
||||
julianskitchen.ch, 1
|
||||
julianvmodesto.com, 1
|
||||
julianwallmeroth.de, 1
|
||||
julianweigle.de, 1
|
||||
julianxhokaxhiu.com, 1
|
||||
@ -15538,7 +15539,6 @@ julico.nl, 1
|
||||
julie-and-stevens-wedding.com, 1
|
||||
juliedecubber.com, 1
|
||||
juliekoubova.net, 1
|
||||
juliemaurel.fr, 1
|
||||
julienc.io, 1
|
||||
julienpaterne.com, 1
|
||||
julientartarin.com, 1
|
||||
@ -16127,7 +16127,6 @@ kingofthecastlecoventry.co.uk, 1
|
||||
kingofthecastlesentertainments.co.uk, 1
|
||||
kingofthecastlesouthwales.co.uk, 1
|
||||
kingofthecastlesrhyl.co.uk, 1
|
||||
kingopen.cn, 1
|
||||
kingpincages.com, 1
|
||||
kingqueen.org.uk, 1
|
||||
kingstclinic.com, 1
|
||||
@ -17475,7 +17474,6 @@ lionlyrics.com, 1
|
||||
lionsdeal.com, 1
|
||||
lipartydepot.com, 1
|
||||
lipex.com, 1
|
||||
lipo.lol, 1
|
||||
lipoabaltimore.org, 1
|
||||
liqd.net, 1
|
||||
liquid.cz, 1
|
||||
@ -17774,7 +17772,6 @@ loritaboegl.de, 1
|
||||
losebellyfat.pro, 1
|
||||
losless.fr, 1
|
||||
loss.no, 1
|
||||
lostandcash.com, 1
|
||||
lostarq.com, 1
|
||||
lostingames.de, 1
|
||||
lostkeys.co.uk, 1
|
||||
@ -17951,7 +17948,6 @@ lunar6.ch, 1
|
||||
lunarshark.com, 1
|
||||
lunarsoft.net, 1
|
||||
lunartail.nl, 1
|
||||
lunasqu.ee, 1
|
||||
lunchbunch.me, 1
|
||||
lune-indigo.ch, 1
|
||||
lungdoc.us, 0
|
||||
@ -18507,7 +18503,6 @@ martingansler.de, 1
|
||||
martinkup.cz, 1
|
||||
martinkus.eu, 1
|
||||
martinmuc.de, 1
|
||||
martinreed.net, 1
|
||||
martins.im, 1
|
||||
martinsfamilyappliance.com, 1
|
||||
martonmihaly.hu, 1
|
||||
@ -18779,6 +18774,7 @@ mdek.at, 1
|
||||
mdewendt.de, 1
|
||||
mdf-bis.com, 1
|
||||
mdiv.pl, 1
|
||||
mdkr.nl, 1
|
||||
mdma.net, 1
|
||||
mdmed.clinic, 1
|
||||
mdoering.de, 1
|
||||
@ -18840,6 +18836,7 @@ mediatorzy.waw.pl, 1
|
||||
mediawiki.org, 1
|
||||
mediawin.pl, 1
|
||||
medic-world.com, 1
|
||||
medicalcountermeasures.gov, 1
|
||||
medicinesfast.com, 0
|
||||
medicinia.com.br, 1
|
||||
medicinskavranje.edu.rs, 1
|
||||
@ -19335,7 +19332,6 @@ minipainting.net, 1
|
||||
miniskipper.at, 1
|
||||
minitruckin.net, 1
|
||||
minitrucktalk.com, 1
|
||||
minkondom.nu, 1
|
||||
minkymoon.jp, 1
|
||||
minnesotakinkyyouth.org, 1
|
||||
minnesotamathcorps.org, 1
|
||||
@ -19674,7 +19670,6 @@ montsaintaignan.fr, 1
|
||||
montychristie.com, 1
|
||||
moo.la, 1
|
||||
moobo.co.jp, 1
|
||||
moobo.xyz, 1
|
||||
moodfoods.com, 1
|
||||
moodifiers.com, 1
|
||||
moodzshop.com, 1
|
||||
@ -20166,7 +20161,6 @@ myicare.org, 1
|
||||
myimds.com, 1
|
||||
myimmitracker.com, 1
|
||||
myjumparoo.co.uk, 1
|
||||
myjumpsuit.de, 1
|
||||
mykeepsake.xyz, 0
|
||||
myki.co, 1
|
||||
mykontool.de, 1
|
||||
@ -21121,7 +21115,6 @@ noop.ch, 1
|
||||
noordsee.de, 1
|
||||
noorsolidarity.com, 1
|
||||
nootropic.com, 1
|
||||
nootropicsource.com, 1
|
||||
noovell.com, 1
|
||||
nopaste.xyz, 1
|
||||
nopaynocure.com, 1
|
||||
@ -21420,6 +21413,7 @@ oc-sa.ch, 1
|
||||
ocad.com.au, 1
|
||||
ocapic.com, 1
|
||||
occasion-impro.com, 1
|
||||
occentus.net, 1
|
||||
occmon.net, 1
|
||||
ocd2016.com, 1
|
||||
oceandns.eu, 1
|
||||
@ -22623,6 +22617,7 @@ peterfolta.net, 1
|
||||
peterhuetz.at, 1
|
||||
peterhuetz.com, 1
|
||||
peterjohnson.io, 1
|
||||
peterlew.is, 1
|
||||
peternagy.ie, 1
|
||||
petersontoscano.com, 1
|
||||
pethelpers.org, 1
|
||||
@ -23162,7 +23157,6 @@ pokemontabletopadventures.com, 1
|
||||
pokemori.jp, 1
|
||||
pokepon.center, 1
|
||||
pokl.cz, 1
|
||||
pokomichi.com, 1
|
||||
pol-expo.ru, 1
|
||||
polaire.org, 1
|
||||
polandb2b.directory, 1
|
||||
@ -23288,6 +23282,7 @@ post.io, 1
|
||||
post4me.at, 1
|
||||
postal.dk, 1
|
||||
postal3.es, 1
|
||||
postback.io, 1
|
||||
postblue.info, 1
|
||||
postbox.life, 1
|
||||
postcardpayment.com, 1
|
||||
@ -23805,7 +23800,6 @@ puli.com.br, 1
|
||||
pulledporkheaven.com, 1
|
||||
pulsedursley.co.uk, 1
|
||||
pumperszene.com, 1
|
||||
punchkickinteractive.com, 1
|
||||
puneflowermall.com, 1
|
||||
punikonta.de, 1
|
||||
punitsheth.com, 1
|
||||
@ -24682,6 +24676,7 @@ rezultant.ru, 1
|
||||
rezun.cloud, 1
|
||||
rf.tn, 1
|
||||
rfeif.org, 1
|
||||
rgavmf.ru, 1
|
||||
rgbinnovation.com, 1
|
||||
rgcomportement.fr, 1
|
||||
rgservers.com, 1
|
||||
@ -24778,6 +24773,7 @@ rio-weimar.de, 1
|
||||
rioshop.com.br, 1
|
||||
rip-sport.cz, 1
|
||||
ripmixmake.org, 1
|
||||
ripple.com, 1
|
||||
ris.fi, 1
|
||||
risada.nl, 1
|
||||
risaphuketproperty.com, 1
|
||||
@ -25297,6 +25293,7 @@ sabahattin-gucukoglu.com, 1
|
||||
sabatek.pl, 1
|
||||
sabine-forschbach.de, 1
|
||||
sabineforschbach.de, 1
|
||||
sabrinajoiasprontaentrega.com.br, 1
|
||||
sacaentradas.com, 1
|
||||
saccani.net, 1
|
||||
sackers.com, 1
|
||||
@ -26172,6 +26169,7 @@ serverlog.net, 1
|
||||
serveroffline.net, 0
|
||||
serverpedia.de, 1
|
||||
servers4all.co.uk, 1
|
||||
serversftw.com, 1
|
||||
serverstuff.info, 1
|
||||
serversuit.com, 1
|
||||
servertastic.com, 1
|
||||
@ -26691,6 +26689,7 @@ simpte.com, 1
|
||||
simpul.nl, 1
|
||||
sims4hub.ga, 1
|
||||
simsnieuws.nl, 1
|
||||
simtin-net.de, 1
|
||||
simukti.net, 1
|
||||
simumiehet.com, 1
|
||||
simus.fr, 1
|
||||
@ -27876,7 +27875,6 @@ stonewuu.com, 1
|
||||
stony.com, 1
|
||||
stonystratford.org, 1
|
||||
stopakwardhandshakes.org, 1
|
||||
stopbreakupnow.org, 1
|
||||
stopbullying.gov, 1
|
||||
stopfraud.gov, 1
|
||||
stopthethyroidmadness.com, 1
|
||||
@ -29409,7 +29407,6 @@ tintencenter.com, 1
|
||||
tintenfix.net, 1
|
||||
tintenfux.de, 1
|
||||
tintenland.de, 1
|
||||
tintenprofi.de, 1
|
||||
tinyhousefinance.com.au, 1
|
||||
tinylan.com, 1
|
||||
tinyspeck.com, 1
|
||||
@ -30799,6 +30796,7 @@ vapesense.co.uk, 1
|
||||
vapeshopsupply.com, 0
|
||||
vaphone.co, 1
|
||||
vapor.cloud, 0
|
||||
vapordepot.jp, 1
|
||||
varcare.jp, 1
|
||||
varden.info, 1
|
||||
vareillefoundation.fr, 1
|
||||
@ -31004,6 +31002,7 @@ victornet.de, 1
|
||||
victornilsson.pw, 1
|
||||
vicyu.com, 1
|
||||
vid-immobilien.de, 1
|
||||
vida-it.com, 1
|
||||
vida.es, 1
|
||||
vidbooster.com, 1
|
||||
vide-dressing.org, 0
|
||||
@ -31280,7 +31279,7 @@ vorodevops.com, 1
|
||||
vos-fleurs.ch, 1
|
||||
vos-fleurs.com, 1
|
||||
vosgym.jp, 1
|
||||
voshod.org, 0
|
||||
voshod.org, 1
|
||||
vosky.fr, 1
|
||||
vostronet.com, 1
|
||||
voter-info.uk, 1
|
||||
@ -31503,6 +31502,7 @@ waterschaplimburg.nl, 1
|
||||
watertrails.io, 1
|
||||
waterworkscondos.com, 1
|
||||
watsonwork.me, 1
|
||||
wattechweb.com, 1
|
||||
wave-ola.es, 1
|
||||
wavesboardshop.com, 1
|
||||
wavesoftime.com, 1
|
||||
@ -31597,6 +31597,7 @@ webdesigneauclaire.com, 1
|
||||
webdesignerinwarwickshire.co.uk, 1
|
||||
webdesignplay.com, 1
|
||||
webdesignplayground.io, 1
|
||||
webdesignssussex.co.uk, 1
|
||||
webdev-quiz.de, 1
|
||||
webdevops.io, 1
|
||||
webdosh.com, 1
|
||||
@ -32741,7 +32742,6 @@ xn--vck8crc655y34ioha.net, 1
|
||||
xn--vck8crcu789ajtaj92eura.xyz, 1
|
||||
xn--w22a.jp, 1
|
||||
xn--werner-schffer-fib.de, 1
|
||||
xn--wmq.jp, 0
|
||||
xn--xz1a.jp, 1
|
||||
xn--y8j148r.xn--q9jyb4c, 1
|
||||
xn--y8j2eb5631a4qf5n0h.com, 1
|
||||
@ -33014,7 +33014,6 @@ yotilab.com, 1
|
||||
yotilabs.com, 1
|
||||
yotta-zetta.com, 1
|
||||
yotubaiotona.net, 1
|
||||
youcaitian.com, 1
|
||||
youcancraft.de, 1
|
||||
youcanfuckoff.xyz, 1
|
||||
youcanmakeit.at, 1
|
||||
|
@ -2170,11 +2170,12 @@ function synthesizeDragOver(aSrcElement, aDestElement, aDragData, aDropEffect, a
|
||||
|
||||
const obs = _EU_Cc["@mozilla.org/observer-service;1"].getService(_EU_Ci.nsIObserverService);
|
||||
const ds = _EU_Cc["@mozilla.org/widget/dragservice;1"].getService(_EU_Ci.nsIDragService);
|
||||
var sess = ds.getCurrentSession();
|
||||
|
||||
// This method runs before other callbacks, and acts as a way to inject the
|
||||
// initial drag data into the DataTransfer.
|
||||
function fillDrag(event) {
|
||||
ds.startDragSession();
|
||||
|
||||
if (aDragData) {
|
||||
for (var i = 0; i < aDragData.length; i++) {
|
||||
var item = aDragData[i];
|
||||
@ -2189,13 +2190,15 @@ function synthesizeDragOver(aSrcElement, aDestElement, aDragData, aDropEffect, a
|
||||
|
||||
function trapDrag(subject, topic) {
|
||||
if (topic == "on-datatransfer-available") {
|
||||
var sess = ds.getCurrentSession();
|
||||
sess.dataTransfer = _EU_maybeUnwrap(_EU_maybeWrap(subject).mozCloneForEvent("drop"));
|
||||
sess.dataTransfer.dropEffect = subject.dropEffect;
|
||||
obs.removeObserver(trapDrag, "on-datatransfer-available");
|
||||
}
|
||||
}
|
||||
|
||||
// need to use real mouse action
|
||||
aWindow.addEventListener("dragstart", fillDrag, true);
|
||||
aWindow.addEventListener("dragstart", fillDrag, { capture: true, once: true });
|
||||
obs.addObserver(trapDrag, "on-datatransfer-available");
|
||||
synthesizeMouseAtCenter(aSrcElement, { type: "mousedown" }, aWindow);
|
||||
|
||||
@ -2204,10 +2207,8 @@ function synthesizeDragOver(aSrcElement, aDestElement, aDragData, aDropEffect, a
|
||||
var y = rect.height / 2;
|
||||
synthesizeMouse(aSrcElement, x, y, { type: "mousemove" }, aWindow);
|
||||
synthesizeMouse(aSrcElement, x+10, y+10, { type: "mousemove" }, aWindow);
|
||||
aWindow.removeEventListener("dragstart", fillDrag, true);
|
||||
obs.removeObserver(trapDrag, "on-datatransfer-available");
|
||||
|
||||
var dataTransfer = sess.dataTransfer;
|
||||
var dataTransfer = ds.getCurrentSession().dataTransfer;
|
||||
|
||||
// The EventStateManager will fire our dragenter event if it needs to.
|
||||
var event = createDragEventObject("dragover", aDestElement, aDestWindow,
|
||||
@ -2283,11 +2284,6 @@ function synthesizeDrop(aSrcElement, aDestElement, aDragData, aDropEffect, aWind
|
||||
aDestWindow = aWindow;
|
||||
}
|
||||
|
||||
var ds = _EU_Cc["@mozilla.org/widget/dragservice;1"]
|
||||
.getService(_EU_Ci.nsIDragService);
|
||||
|
||||
ds.startDragSession();
|
||||
|
||||
try {
|
||||
var [result, dataTransfer] = synthesizeDragOver(aSrcElement, aDestElement,
|
||||
aDragData, aDropEffect,
|
||||
@ -2296,6 +2292,7 @@ function synthesizeDrop(aSrcElement, aDestElement, aDragData, aDropEffect, aWind
|
||||
return synthesizeDropAfterDragOver(result, dataTransfer, aDestElement,
|
||||
aDestWindow, aDragEvent);
|
||||
} finally {
|
||||
var ds = _EU_Cc["@mozilla.org/widget/dragservice;1"].getService(_EU_Ci.nsIDragService);
|
||||
ds.endDragSession(true, _parseModifiers(aDragEvent));
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,3 @@
|
||||
[border-image-slice-percentage.html]
|
||||
[border-image-slice-001.xht]
|
||||
type: reftest
|
||||
disabled: if (os == "linux") and debug: https://bugzilla.mozilla.org/show_bug.cgi?id=1383061
|
||||
|
@ -1,28 +0,0 @@
|
||||
[execorder.html]
|
||||
type: testharness
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): OK
|
||||
[Unordered module script execution (parsed, unordered #1)]
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
||||
|
||||
[Unordered module script execution (parsed, unordered #2)]
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
||||
|
||||
[Unordered module script execution (dynamic, unordered #1)]
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
||||
|
||||
[Unordered module script execution (dynamic, unordered #2)]
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
||||
|
||||
[Interlaced module/non-module script execution (parsed, async-ordered)]
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
||||
|
||||
[Interlaced module/non-module script execution (dynamic, async-ordered)]
|
||||
expected:
|
||||
if not debug and not e10s and (os == "mac") and (version == "OS X 10.10.5"): PASS
|
||||
|
@ -1,3 +0,0 @@
|
||||
[instantiation-error-1.html]
|
||||
[Test that missing exports lead to SyntaxError events on window and load events on script, and that exceptions are remembered]
|
||||
expected: FAIL
|
@ -1,3 +0,0 @@
|
||||
[instantiation-error-2.html]
|
||||
[Test that missing exports lead to SyntaxError events on window and load events on script, and that exceptions are remembered]
|
||||
expected: FAIL
|
@ -1,3 +1,2 @@
|
||||
[instantiation-error-3.html]
|
||||
[Test that unresolvable cycles lead to SyntaxError events on window and load events on script, and that exceptions are remembered]
|
||||
expected: FAIL
|
||||
disabled: bug 1426195
|
||||
|
@ -1,3 +0,0 @@
|
||||
[instantiation-error-4.html]
|
||||
[Test that loading a graph in which a module is already errored results in that module's error.]
|
||||
expected: FAIL
|
@ -1,3 +0,0 @@
|
||||
[instantiation-error-5.html]
|
||||
[Test that loading a graph in which a module is already errored results in that module's error.]
|
||||
expected: FAIL
|
@ -6,17 +6,19 @@
|
||||
<script>
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
||||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
|
||||
const test_load = async_test(
|
||||
"Test that missing exports lead to SyntaxError events on window and " +
|
||||
"load events on script, and that exceptions are remembered");
|
||||
"load events on script");
|
||||
|
||||
window.log = [];
|
||||
window.addEventListener("error", ev => {
|
||||
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||
log.push(ev.message);
|
||||
});
|
||||
|
||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||
const exn = log[0];
|
||||
assert_array_equals(log, [exn, 1, exn, 2, exn, 3, exn, 4, exn, 5]);
|
||||
assert_equals(exn.constructor, SyntaxError);
|
||||
const msg = log[0];
|
||||
assert_array_equals(log, [msg, 1, msg, 2, msg, 3, msg, 4, msg, 5]);
|
||||
}));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
|
@ -6,17 +6,19 @@
|
||||
<script>
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
||||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
|
||||
const test_load = async_test(
|
||||
"Test that missing exports lead to SyntaxError events on window and " +
|
||||
"load events on script, and that exceptions are remembered");
|
||||
"load events on script");
|
||||
|
||||
window.log = [];
|
||||
window.addEventListener("error", ev => {
|
||||
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||
log.push(ev.message);
|
||||
});
|
||||
|
||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||
const exn = log[0];
|
||||
assert_array_equals(log, [exn, 1, exn, 2, exn, 3, exn, 4, exn, 5]);
|
||||
assert_equals(exn.constructor, SyntaxError);
|
||||
const msg = log[0];
|
||||
assert_array_equals(log, [msg, 1, msg, 2, msg, 3, msg, 4, msg, 5]);
|
||||
}));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
|
@ -6,17 +6,19 @@
|
||||
<script>
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
||||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
|
||||
const test_load = async_test(
|
||||
"Test that unresolvable cycles lead to SyntaxError events on window " +
|
||||
"and load events on script, and that exceptions are remembered");
|
||||
"and load events on script");
|
||||
|
||||
window.log = [];
|
||||
window.addEventListener("error", ev => {
|
||||
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||
log.push(ev.message);
|
||||
});
|
||||
|
||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||
const exn = log[0];
|
||||
assert_array_equals(log, [exn, 1, exn, 2, exn, 3]);
|
||||
assert_equals(exn.constructor, SyntaxError);
|
||||
const msg = log[0];
|
||||
assert_array_equals(log, [msg, 1, msg, 2, msg, 3]);
|
||||
}));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
|
@ -7,16 +7,18 @@
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
||||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
|
||||
const test_load = async_test(
|
||||
"Test that loading a graph in which a module is already " +
|
||||
"errored results in that module's error.");
|
||||
"errored results in an error.");
|
||||
|
||||
window.addEventListener("error", ev => {
|
||||
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||
log.push(ev.message);
|
||||
});
|
||||
|
||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||
const exn = log[0];
|
||||
assert_array_equals(log, [exn, 1, exn, 2]);
|
||||
assert_equals(exn.constructor, SyntaxError);
|
||||
const msg = log[0];
|
||||
assert_array_equals(log, [msg, 1, msg, 2]);
|
||||
}));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
|
@ -6,17 +6,19 @@
|
||||
<script>
|
||||
setup({allow_uncaught_exception: true});
|
||||
|
||||
window.log = [];
|
||||
|
||||
window.addEventListener("error", ev => log.push(ev.error));
|
||||
|
||||
const test_load = async_test(
|
||||
"Test that loading a graph in which a module is already " +
|
||||
"errored results in that module's error.");
|
||||
"errored results an error.");
|
||||
|
||||
window.log = [];
|
||||
window.addEventListener("error", ev => {
|
||||
test_load.step(() => assert_equals(ev.error.constructor, SyntaxError));
|
||||
log.push(ev.message);
|
||||
});
|
||||
|
||||
window.addEventListener("load", test_load.step_func_done(ev => {
|
||||
const exn = log[0];
|
||||
assert_array_equals(log, [exn, 1, exn, 2]);
|
||||
assert_equals(exn.constructor, SyntaxError);
|
||||
const msg = log[0];
|
||||
assert_array_equals(log, [msg, 1, msg, 2]);
|
||||
}));
|
||||
|
||||
function unreachable() { log.push("unexpected"); }
|
||||
|
@ -2423,14 +2423,14 @@
|
||||
"description": "Stats about success rate of HTTP OMT request in content process, keyed by content policy.",
|
||||
"labels": ["success", "successMainThread", "failListener", "failListenerChain", "notRequested"]
|
||||
},
|
||||
"TCP_FAST_OPEN_2": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"TCP_FAST_OPEN_3": {
|
||||
"record_in_processes": ["main"],
|
||||
"expires_in_version": "61",
|
||||
"kind": "enumerated",
|
||||
"n_values": 16,
|
||||
"description": "When a http connection is closed, track whether or not TCP Fast Open was used: 0=TFO_NOT_TRIED(There was no http connection and it was not TLS), 1=TFO_TRIED_NEGOTIATING, 2=TFO_DATA_SENT, 3=TFO_FAILED_CONNECTION_REFUSED, 4=TFO_FAILED_NET_TIMEOUT, 5=TFO_FAILED_UNKNOW_ERROR, 6=TFO_FAILED_BACKUP_CONNECTION, 7=TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO, 8=TFO_FAILED_NET_TIMEOUT__NO_TFO_FAILED_TOO, 9=TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO, 10=TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO.",
|
||||
"n_values": 32,
|
||||
"description": "When a http connection is closed, track whether or not TCP Fast Open was used: 0=TFO_NOT_SET, 1=TFO_UNKNOWN, 2=TFO_DISABLED, 3=TFO_DISABLED_CONNECT, 4=TFO_NOT_TRIED, 5=TFO_TRIED, 6=TFO_DATA_SENT, 7=TFO_DATA_COOKIE_NOT_ACCEPTED, 8=TFO_FAILED_CONNECTION_REFUSED, 9=TFO_FAILED_NET_TIMEOUT, 10=TFO_FAILED_UNKNOW_ERROR, 11=TFO_FAILED_BACKUP_CONNECTION_TFO_NOT_TRIED, 12=TFO_FAILED_BACKUP_CONNECTION_TFO_TRIED, 13=TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_SENT, 14=TFO_FAILED_BACKUP_CONNECTION_TFO_DATA_COOKIE_NOT_ACCEPTED, 15=TFO_FAILED_CONNECTION_REFUSED_NO_TFO_FAILED_TOO, 16=TFO_FAILED_NET_TIMEOUT__NO_TFO_FAILED_TOO, 17=TFO_FAILED_UNKNOW_ERROR_NO_TFO_FAILED_TOO, 18=TFO_FAILED_BACKUP_CONNECTION_NO_TFO_FAILED_TOO, 19=TFO_BACKUP_CONN. Please look at netwerk/base/TCPFastOpenLayer.h for more info",
|
||||
"alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
|
||||
"bug_numbers": [1390881]
|
||||
"bug_numbers": [1402879]
|
||||
},
|
||||
"TCP_FAST_OPEN_STATUS": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
|
@ -1267,6 +1267,21 @@ screenshots:
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
network.http:
|
||||
backup_conn_won:
|
||||
bug_numbers:
|
||||
- 1402811
|
||||
description: >
|
||||
For connection where TFO has not be use, collect telemetry on whether the
|
||||
backup connection or the primary connection was faster.
|
||||
expires: "61"
|
||||
kind: boolean
|
||||
notification_emails:
|
||||
- necko@mozilla.com
|
||||
- ddamjanovic@mozilla.com
|
||||
record_in_processes:
|
||||
- 'main'
|
||||
|
||||
idb.type:
|
||||
persistent_count:
|
||||
bug_numbers:
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "mozilla/dom/TabChild.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/EventStateManager.h"
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/Unused.h"
|
||||
#include "nsContentUtils.h"
|
||||
@ -88,3 +89,21 @@ nsDragServiceProxy::InvokeDragSessionImpl(nsIArray* aArrayTransferables,
|
||||
StartDragSession();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDragServiceProxy::StartDragSession()
|
||||
{
|
||||
// Normally, OS stops firing input events when a drag operation starts. But
|
||||
// there may be some pending input events queued in the content process. We
|
||||
// have to suppress them since spec says that input events must be suppressed
|
||||
// when there is a dnd session.
|
||||
EventStateManager::SuppressInputEvents();
|
||||
return nsBaseDragService::StartDragSession();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDragServiceProxy::EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers)
|
||||
{
|
||||
EventStateManager::UnsuppressInputEvents();
|
||||
return nsBaseDragService::EndDragSession(aDoneDrag, aKeyModifiers);
|
||||
}
|
||||
|
@ -19,6 +19,11 @@ public:
|
||||
virtual nsresult InvokeDragSessionImpl(nsIArray* anArrayTransferables,
|
||||
nsIScriptableRegion* aRegion,
|
||||
uint32_t aActionType) override;
|
||||
|
||||
// nsIDragService
|
||||
NS_IMETHOD StartDragSession() override;
|
||||
NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override;
|
||||
|
||||
private:
|
||||
virtual ~nsDragServiceProxy();
|
||||
};
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "nsCRT.h"
|
||||
#include "nsNativeCharsetUtils.h"
|
||||
#include "nsUTF8Utils.h"
|
||||
#include "nsArray.h"
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <string.h>
|
||||
|
Loading…
Reference in New Issue
Block a user