This commit is contained in:
Ryan VanderMeulen 2017-06-02 11:10:02 -04:00
Родитель 3efd1caff2 f6fbb3325c
Коммит 153d3dc532
55 изменённых файлов: 402 добавлений и 269 удалений

Просмотреть файл

@ -57,6 +57,13 @@
// breaking JAWS compatibility.
testRole("data", ROLE_TEXT_CONTAINER);
// Test that input type="checkbox" and type="radio" are
// exposed as such regardless of appearance style.
testRole("checkbox_regular", ROLE_CHECKBUTTON);
testRole("checkbox_appearance_none", ROLE_CHECKBUTTON);
testRole("radio_regular", ROLE_RADIOBUTTON);
testRole("radio_appearance_none", ROLE_RADIOBUTTON);
// Test regular paragraph by comparison to make sure exposure does not
// get broken.
testRole("p", ROLE_PARAGRAPH);
@ -136,6 +143,10 @@
<form id="frm" action="submit.php" method="post">
<label for="data">File</label>:
<input type="file" id="data" name="data" size="50"/>
<input type="checkbox" id="checkbox_regular" value="Check me"/>
<input type="checkbox" style="-moz-appearance: none;" id="checkbox_appearance_none" value="Check me"/>
<input type="radio" id="radio_regular" value="Check me"/>
<input type="radio" style="-moz-appearance: none;" id="radio_appearance_none" value="Check me"/>
</form>
<nav id="nav">a nav</nav>

Просмотреть файл

@ -544,7 +544,7 @@ add_task(async function test_offline_cache() {
// Prepare stuff, we will work with www.example.com
var URL = "http://www.example.com";
var URI = makeURI(URL);
var principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(URI);
var principal = Services.scriptSecurityManager.createCodebasePrincipal(URI, {});
// Give www.example.com privileges to store offline data
Services.perms.addFromPrincipal(principal, "offline-app", Ci.nsIPermissionManager.ALLOW_ACTION);

Просмотреть файл

@ -254,7 +254,7 @@ var gTests = [
channel.send({ command: "unsolicited" }, {
browser: targetBrowser,
principal: Services.scriptSecurityManager.getNoAppCodebasePrincipal(targetURI)
principal: Services.scriptSecurityManager.createCodebasePrincipal(targetURI, {}),
});
await messagePromise;
@ -290,7 +290,7 @@ var gTests = [
}, async function(targetBrowser) {
let mismatchURI = Services.io.newURI(HTTP_MISMATCH_PATH);
let mismatchPrincipal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(mismatchURI);
let mismatchPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(mismatchURI, {});
// send a message to the wrong principal. It should not be delivered
// to content, and should not be echoed back.
@ -299,7 +299,7 @@ var gTests = [
principal: mismatchPrincipal
});
let targetPrincipal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(targetURI);
let targetPrincipal = Services.scriptSecurityManager.createCodebasePrincipal(targetURI, {});
// send the `done` message to the correct principal. It
// should be echoed back.

Просмотреть файл

@ -42,7 +42,7 @@ AboutPage.prototype = {
channel.originalURI = aURI;
if (this.uriFlags & Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT) {
let principal = Services.scriptSecurityManager.getNoAppCodebasePrincipal(aURI);
let principal = Services.scriptSecurityManager.createCodebasePrincipal(aURI, {});
channel.owner = principal;
}
return channel;

Просмотреть файл

@ -299,14 +299,6 @@ BasePrincipal::GetOriginSuffix(nsACString& aOriginAttributes)
return mOriginSuffix->ToUTF8String(aOriginAttributes);
}
NS_IMETHODIMP
BasePrincipal::GetAppStatus(uint16_t* aAppStatus)
{
// TODO: Remove GetAppStatus.
*aAppStatus = nsIPrincipal::APP_STATUS_NOT_INSTALLED;
return NS_OK;
}
NS_IMETHODIMP
BasePrincipal::GetAppId(uint32_t* aAppId)
{
@ -341,13 +333,6 @@ BasePrincipal::GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserEle
return NS_OK;
}
NS_IMETHODIMP
BasePrincipal::GetUnknownAppId(bool* aUnknownAppId)
{
*aUnknownAppId = AppId() == nsIScriptSecurityManager::UNKNOWN_APP_ID;
return NS_OK;
}
bool
BasePrincipal::AddonHasPermission(const nsAString& aPerm)
{

Просмотреть файл

@ -63,10 +63,8 @@ public:
NS_IMETHOD GetIsSystemPrincipal(bool* aResult) override;
NS_IMETHOD GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) final;
NS_IMETHOD GetOriginSuffix(nsACString& aOriginSuffix) final;
NS_IMETHOD GetAppStatus(uint16_t* aAppStatus) final;
NS_IMETHOD GetAppId(uint32_t* aAppStatus) final;
NS_IMETHOD GetAppId(uint32_t* aAppId) final;
NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) final;
NS_IMETHOD GetUnknownAppId(bool* aUnknownAppId) final;
NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final;
NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final;

Просмотреть файл

@ -251,33 +251,6 @@ interface nsIPrincipal : nsISerializable
*/
readonly attribute ACString baseDomain;
const short APP_STATUS_NOT_INSTALLED = 0;
const short APP_STATUS_INSTALLED = 1;
const short APP_STATUS_PRIVILEGED = 2;
const short APP_STATUS_CERTIFIED = 3;
/**
* Gets the principal's app status, which indicates whether the principal
* corresponds to "app code", and if it does, how privileged that code is.
* This method returns one of the APP_STATUS constants above.
*
* Note that a principal may have
*
* appId != nsIScriptSecurityManager::NO_APP_ID &&
* appId != nsIScriptSecurityManager::UNKNOWN_APP_ID
*
* and still have appStatus == APP_STATUS_NOT_INSTALLED. That's because
* appId identifies the app that contains this principal, but a window
* might be contained in an app and not be running code that the app has
* vouched for. For example, the window might be inside an <iframe
* mozbrowser>, or the window's origin might not match the app's origin.
*
* If you're doing a check to determine "does this principal correspond to
* app code?", you must check appStatus; checking appId != NO_APP_ID is not
* sufficient.
*/
[infallible] readonly attribute unsigned short appStatus;
/**
* Gets the id of the app this principal is inside. If this principal is
* not inside an app, returns nsIScriptSecurityManager::NO_APP_ID.
@ -293,9 +266,6 @@ interface nsIPrincipal : nsISerializable
* inside an app frame; in this case, the content inside the iframe should
* not have any of the app's permissions, even if the iframe is at the same
* origin as the app.
*
* If you're doing a security check based on appId, you must check
* appStatus as well.
*/
[infallible] readonly attribute unsigned long appId;
@ -327,13 +297,6 @@ interface nsIPrincipal : nsISerializable
*/
[infallible] readonly attribute boolean isInIsolatedMozBrowserElement;
/**
* Returns true if this principal has an unknown appId. This shouldn't
* generally be used. We only expose it due to not providing the correct
* appId everywhere where we construct principals.
*/
[infallible] readonly attribute boolean unknownAppId;
/**
* Returns true iff this is a null principal (corresponding to an
* unknown, hence assumed minimally privileged, security context).

Просмотреть файл

@ -134,42 +134,19 @@ interface nsIScriptSecurityManager : nsISupports
nsIPrincipal getSystemPrincipal();
/**
* Returns a principal that has the given information.
* @param appId is the app id of the principal. It can't be UNKNOWN_APP_ID.
* @param inMozBrowser is true if the principal has to be considered as
* inside a mozbrowser frame.
*
* @deprecated use createCodebasePrincipal instead.
*/
[deprecated] nsIPrincipal getAppCodebasePrincipal(in nsIURI uri,
in unsigned long appId,
in boolean inMozBrowser);
/**
* Returns a principal that has the appId and inMozBrowser of the load
* context.
* @param loadContext to get appId/inMozBrowser from.
* Returns a principal that has the OriginAttributes of the load context.
* @param loadContext to get the OriginAttributes from.
*/
nsIPrincipal getLoadContextCodebasePrincipal(in nsIURI uri,
in nsILoadContext loadContext);
/**
* Returns a principal that has the appId and inMozBrowser of the docshell
* inside a mozbrowser frame.
* @param docShell to get appId/inMozBrowser from.
* Returns a principal that has the OriginAttributes of the docshell.
* @param docShell to get the OriginAttributes from.
*/
nsIPrincipal getDocShellCodebasePrincipal(in nsIURI uri,
in nsIDocShell docShell);
/**
* Returns a principal with that has the same origin as uri and is not part
* of an appliction.
* The returned principal will have appId = NO_APP_ID.
*
* @deprecated use createCodebasePrincipal instead.
*/
[deprecated] nsIPrincipal getNoAppCodebasePrincipal(in nsIURI uri);
/**
* Legacy method for getting a principal with no origin attributes.
*

Просмотреть файл

@ -1104,21 +1104,15 @@ nsScriptSecurityManager::GetSystemPrincipal(nsIPrincipal **result)
return NS_OK;
}
NS_IMETHODIMP
nsScriptSecurityManager::GetNoAppCodebasePrincipal(nsIURI* aURI,
nsIPrincipal** aPrincipal)
{
OriginAttributes attrs;
nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
prin.forget(aPrincipal);
return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsScriptSecurityManager::GetCodebasePrincipal(nsIURI* aURI,
nsIPrincipal** aPrincipal)
{
return GetNoAppCodebasePrincipal(aURI, aPrincipal);
OriginAttributes attrs;
nsCOMPtr<nsIPrincipal> prin =
BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
prin.forget(aPrincipal);
return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
@ -1164,21 +1158,6 @@ nsScriptSecurityManager::CreateNullPrincipal(JS::Handle<JS::Value> aOriginAttrib
return NS_OK;
}
NS_IMETHODIMP
nsScriptSecurityManager::GetAppCodebasePrincipal(nsIURI* aURI,
uint32_t aAppId,
bool aInIsolatedMozBrowser,
nsIPrincipal** aPrincipal)
{
NS_ENSURE_TRUE(aAppId != nsIScriptSecurityManager::UNKNOWN_APP_ID,
NS_ERROR_INVALID_ARG);
OriginAttributes attrs(aAppId, aInIsolatedMozBrowser);
nsCOMPtr<nsIPrincipal> prin = BasePrincipal::CreateCodebasePrincipal(aURI, attrs);
prin.forget(aPrincipal);
return *aPrincipal ? NS_OK : NS_ERROR_FAILURE;
}
NS_IMETHODIMP
nsScriptSecurityManager::
GetLoadContextCodebasePrincipal(nsIURI* aURI,

Просмотреть файл

@ -6,7 +6,7 @@ pref(dom.animations-api.core.enabled,true) load 1216842-3.html
pref(dom.animations-api.core.enabled,true) load 1216842-4.html
pref(dom.animations-api.core.enabled,true) load 1216842-5.html
pref(dom.animations-api.core.enabled,true) load 1216842-6.html
pref(dom.animations-api.core.enabled,true) load 1272475-1.html
skip-if(webrender) pref(dom.animations-api.core.enabled,true) load 1272475-1.html # see bug 1367994
pref(dom.animations-api.core.enabled,true) load 1272475-2.html
pref(dom.animations-api.core.enabled,true) load 1278485-1.html
pref(dom.animations-api.core.enabled,true) load 1277272-1.html

Просмотреть файл

@ -3622,7 +3622,7 @@ private:
}
void
RunBackOnWorkerThread() override
RunBackOnWorkerThreadForCleanup() override
{}
};

6
dom/cache/PrincipalVerifier.cpp поставляемый
Просмотреть файл

@ -123,10 +123,8 @@ PrincipalVerifier::VerifyOnMainThread()
return;
}
// We disallow null principal and unknown app IDs on the client side, but
// double-check here.
if (NS_WARN_IF(principal->GetIsNullPrincipal() ||
principal->GetUnknownAppId())) {
// We disallow null principal on the client side, but double-check here.
if (NS_WARN_IF(principal->GetIsNullPrincipal())) {
DispatchToInitiatingThread(NS_ERROR_FAILURE);
return;
}

Просмотреть файл

@ -337,12 +337,12 @@ public:
mWorkerPrivate->AssertIsOnWorkerThread();
if (NS_WARN_IF(!PreDispatch(aCx))) {
RunBackOnWorkerThread();
RunBackOnWorkerThreadForCleanup();
return false;
}
if (NS_WARN_IF(!WorkerProxyToMainThreadRunnable::Dispatch())) {
// RunBackOnWorkerThread() will be called by
// RunBackOnWorkerThreadForCleanup() will be called by
// WorkerProxyToMainThreadRunnable::Dispatch().
return false;
}
@ -421,7 +421,7 @@ protected:
}
void
RunBackOnWorkerThread() override
RunBackOnWorkerThreadForCleanup() override
{
mWorkerPrivate->AssertIsOnWorkerThread();
ReleaseData();

Просмотреть файл

@ -122,13 +122,25 @@ void
IPCBlobInputStreamStorage::GetStream(const nsID& aID,
nsIInputStream** aInputStream)
{
mozilla::StaticMutexAutoLock lock(gMutex);
StreamData* data = mStorage.Get(aID);
if (!data) {
*aInputStream = nullptr;
return;
*aInputStream = nullptr;
nsCOMPtr<nsIInputStream> inputStream;
// NS_CloneInputStream cannot be called when the mutex is locked because it
// can, recursively call GetStream() in case the child actor lives on the
// parent process.
{
mozilla::StaticMutexAutoLock lock(gMutex);
StreamData* data = mStorage.Get(aID);
if (!data) {
return;
}
inputStream = data->mInputStream;
}
MOZ_ASSERT(inputStream);
// We cannot return always the same inputStream because not all of them are
// able to be reused. Better to clone them.
@ -136,13 +148,20 @@ IPCBlobInputStreamStorage::GetStream(const nsID& aID,
nsCOMPtr<nsIInputStream> replacementStream;
nsresult rv =
NS_CloneInputStream(data->mInputStream, getter_AddRefs(clonedStream),
NS_CloneInputStream(inputStream, getter_AddRefs(clonedStream),
getter_AddRefs(replacementStream));
if (NS_WARN_IF(NS_FAILED(rv))) {
return;
}
if (replacementStream) {
mozilla::StaticMutexAutoLock lock(gMutex);
StreamData* data = mStorage.Get(aID);
// data can be gone in the meantime.
if (!data) {
return;
}
data->mInputStream = replacementStream;
}

Просмотреть файл

@ -430,14 +430,6 @@ var tearDownServiceInParent = Task.async(function* (db) {
ok(record.pushEndpoint.startsWith('https://example.org/push'),
'Wrong push endpoint in subscription record');
record = yield db.getByIdentifiers({
scope: 'https://example.net/scope/1',
originAttributes: ChromeUtils.originAttributesToSuffix(
{ appId: 1, inIsolatedMozBrowser: true }),
});
ok(record.pushEndpoint.startsWith('https://example.org/push'),
'Wrong push endpoint in app record');
record = yield db.getByKeyID('3a414737-2fd0-44c0-af05-7efc172475fc');
ok(!record, 'Unsubscribed record should not exist');
});

Просмотреть файл

@ -229,27 +229,6 @@ add_test(function test_unsubscribe_error() {
);
});
add_test(function test_subscribe_app_principal() {
let principal = Services.scriptSecurityManager.getAppCodebasePrincipal(
Services.io.newURI('https://example.net/app/1'),
1, /* appId */
true /* browserOnly */
);
do_test_pending();
PushServiceComponent.subscribe('https://example.net/scope/1', principal, (result, subscription) => {
ok(Components.isSuccessCode(result), 'Error creating subscription');
ok(subscription.endpoint.startsWith('https://example.org/push'),
'Wrong push endpoint in app subscription');
ok(!subscription.isSystemSubscription,
'Unexpected system subscription for app principal');
equal(subscription.quota, 16, 'Wrong quota for app subscription');
do_test_finished();
run_next_test();
});
});
add_test(function test_subscribe_origin_principal() {
let scope = 'https://example.net/origin-principal';
let principal =

Просмотреть файл

@ -677,13 +677,13 @@ WorkerProxyToMainThreadRunnable::Dispatch()
mWorkerPrivate->AssertIsOnWorkerThread();
if (NS_WARN_IF(!HoldWorker())) {
RunBackOnWorkerThread();
RunBackOnWorkerThreadForCleanup();
return false;
}
if (NS_WARN_IF(NS_FAILED(mWorkerPrivate->DispatchToMainThread(this)))) {
ReleaseWorker();
RunBackOnWorkerThread();
RunBackOnWorkerThreadForCleanup();
return false;
}
@ -715,7 +715,8 @@ WorkerProxyToMainThreadRunnable::PostDispatchOnMainThread()
MOZ_ASSERT(aRunnable);
}
// We must call RunBackOnWorkerThread() also if the runnable is canceled.
// We must call RunBackOnWorkerThreadForCleanup() also if the runnable is
// canceled.
nsresult
Cancel() override
{
@ -730,7 +731,7 @@ WorkerProxyToMainThreadRunnable::PostDispatchOnMainThread()
aWorkerPrivate->AssertIsOnWorkerThread();
if (mRunnable) {
mRunnable->RunBackOnWorkerThread();
mRunnable->RunBackOnWorkerThreadForCleanup();
// Let's release the worker thread.
mRunnable->ReleaseWorker();

Просмотреть файл

@ -415,6 +415,12 @@ private:
// This runnable is an helper class for dispatching something from a worker
// thread to the main-thread and back to the worker-thread. During this
// operation, this class will keep the worker alive.
// The purpose of RunBackOnWorkerThreadForCleanup() must be used, as the name
// says, only to release resources, no JS has to be executed, no timers, or
// other things. The reason of such limitations is that, in order to execute
// this method in any condition (also when the worker is shutting down), a
// Control Runnable is used, and, this could generate a reordering of existing
// runnables.
class WorkerProxyToMainThreadRunnable : public Runnable
{
protected:
@ -426,7 +432,7 @@ protected:
virtual void RunOnMainThread() = 0;
// After this second method is called on the worker-thread.
virtual void RunBackOnWorkerThread() = 0;
virtual void RunBackOnWorkerThreadForCleanup() = 0;
public:
bool Dispatch();

Просмотреть файл

@ -492,7 +492,7 @@ private:
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.print-histogram", FPSPrintHistogram, bool, false);
DECL_GFX_PREF(Live, "layers.acceleration.draw-fps.write-to-file", WriteFPSToFile, bool, false);
DECL_GFX_PREF(Once, "layers.acceleration.force-enabled", LayersAccelerationForceEnabledDoNotUseDirectly, bool, false);
DECL_OVERRIDE_PREF(Live, "layers.advanced.background-color", LayersAllowBackgroundColorLayers, gfxPrefs::OverrideBase_WebRendest());
DECL_OVERRIDE_PREF(Live, "layers.advanced.background-color", LayersAllowBackgroundColorLayers, gfxPrefs::OverrideBase_WebRender());
DECL_OVERRIDE_PREF(Live, "layers.advanced.background-image", LayersAllowBackgroundImage, gfxPrefs::OverrideBase_WebRendest());
DECL_GFX_PREF(Live, "layers.advanced.basic-layer.enabled", LayersAdvancedBasicLayerEnabled, bool, false);
DECL_OVERRIDE_PREF(Live, "layers.advanced.border-layers", LayersAllowBorderLayers, gfxPrefs::OverrideBase_WebRendest());

Просмотреть файл

@ -163,12 +163,12 @@ struct Zone
GCState gcState() const { return gcState_; }
bool wasGCStarted() const { return gcState_ != NoGC; }
bool isGCMarkingBlack() { return gcState_ == Mark; }
bool isGCMarkingGray() { return gcState_ == MarkGray; }
bool isGCSweeping() { return gcState_ == Sweep; }
bool isGCFinished() { return gcState_ == Finished; }
bool isGCCompacting() { return gcState_ == Compact; }
bool isGCSweepingOrCompacting() { return gcState_ == Sweep || gcState_ == Compact; }
bool isGCMarkingBlack() const { return gcState_ == Mark; }
bool isGCMarkingGray() const { return gcState_ == MarkGray; }
bool isGCSweeping() const { return gcState_ == Sweep; }
bool isGCFinished() const { return gcState_ == Finished; }
bool isGCCompacting() const { return gcState_ == Compact; }
bool isGCSweepingOrCompacting() const { return gcState_ == Sweep || gcState_ == Compact; }
static MOZ_ALWAYS_INLINE JS::shadow::Zone* asShadowZone(JS::Zone* zone) {
return reinterpret_cast<JS::shadow::Zone*>(zone);

Просмотреть файл

@ -9,6 +9,7 @@
#include "mozilla/Atomics.h"
#include "mozilla/EnumSet.h"
#include "mozilla/Maybe.h"
#include "jsfriendapi.h"
#include "jsgc.h"
@ -998,6 +999,9 @@ class GCRuntime
SliceBudget& budget, AllocKind kind);
static IncrementalProgress mergeSweptObjectArenas(GCRuntime* gc, FreeOp* fop, Zone* zone,
SliceBudget& budget, AllocKind kind);
static IncrementalProgress sweepAtomsTable(GCRuntime* gc, FreeOp* fop, Zone* zone,
SliceBudget& budget, AllocKind kind);
IncrementalProgress sweepAtomsTable(SliceBudget& budget);
static IncrementalProgress finalizeAllocKind(GCRuntime* gc, FreeOp* fop, Zone* zone,
SliceBudget& budget, AllocKind kind);
static IncrementalProgress sweepShapeTree(GCRuntime* gc, FreeOp* fop, Zone* zone,
@ -1223,6 +1227,7 @@ class GCRuntime
ActiveThreadData<size_t> sweepPhaseIndex;
ActiveThreadData<JS::Zone*> sweepZone;
ActiveThreadData<size_t> sweepActionIndex;
ActiveThreadData<mozilla::Maybe<AtomSet::Enum>> maybeAtomsToSweep;
ActiveThreadData<bool> abortSweepAfterCurrentGroup;
/*

Просмотреть файл

@ -97,7 +97,8 @@ PhaseKindGraphRoots = [
PhaseKind("WEAK_ZONES_CALLBACK", "Per-Slice Weak Callback", 57),
PhaseKind("WEAK_COMPARTMENT_CALLBACK", "Per-Compartment Weak Callback", 58)
]),
PhaseKind("SWEEP_ATOMS", "Sweep Atoms", 18),
PhaseKind("UPDATE_ATOMS_BITMAP", "Sweep Atoms Bitmap", 68),
PhaseKind("SWEEP_ATOMS_TABLE", "Sweep Atoms Table", 18),
PhaseKind("SWEEP_COMPARTMENTS", "Sweep Compartments", 20, [
PhaseKind("SWEEP_DISCARD_CODE", "Sweep Discard Code", 21),
PhaseKind("SWEEP_INNER_VIEWS", "Sweep Inner Views", 22),

Просмотреть файл

@ -2611,6 +2611,8 @@ GCMarker::stackContainsCrossZonePointerTo(const Cell* target) const
// pointer.
if (source->is<ProxyObject>()) {
Value value = source->as<ProxyObject>().private_();
MOZ_ASSERT_IF(!IsCrossCompartmentWrapper(source),
IsObjectValueInCompartment(value, source->compartment()));
if (value.isObject() && &value.toObject() == target)
return sourceZone;
}

Просмотреть файл

@ -131,14 +131,17 @@ wasmEvalText('(module (import $foo "a" "" (result f64)))', {a:{"":()=>{}}});
wasmValidateText('(module (memory 0))');
wasmValidateText('(module (memory 1))');
wasmFailValidateText('(module (memory 65536))', /initial memory size too big/);
wasmValidateText('(module (memory 16384))');
wasmFailValidateText('(module (memory 16385))', /initial memory size too big/);
wasmEvalText('(module (memory 0 65536))')
wasmFailValidateText('(module (memory 0 65537))', /maximum memory size too big/);
// May OOM, but must not crash:
try {
wasmEvalText('(module (memory 65535))');
wasmEvalText('(module (memory 16384))');
} catch (e) {
assertEq(String(e).indexOf("out of memory") != -1 ||
String(e).indexOf("memory size too big") != -1, true);
assertEq(String(e).indexOf("out of memory") !== -1, true);
}
var buf = wasmEvalText('(module (memory 1) (export "memory" memory))').exports.memory.buffer;

Просмотреть файл

@ -19,8 +19,27 @@ const tab2Elem = new Table({initial:2, element:"anyfunc"});
const tab3Elem = new Table({initial:3, element:"anyfunc"});
const tab4Elem = new Table({initial:4, element:"anyfunc"});
// Memory size consistency and internal limits.
assertErrorMessage(() => new Memory({initial:2, maximum:1}), RangeError, /bad Memory maximum size/);
try {
new Memory({initial:16384});
} catch(e) {
assertEq(String(e).indexOf("out of memory") !== -1, true);
}
assertErrorMessage(() => new Memory({initial: 16385}), RangeError, /bad Memory initial size/);
new Memory({initial: 0, maximum: 65536});
assertErrorMessage(() => new Memory({initial: 0, maximum: 65537}), RangeError, /bad Memory maximum size/);
// Table size consistency and internal limits.
assertErrorMessage(() => new Table({initial:2, maximum:1, element:"anyfunc"}), RangeError, /bad Table maximum size/);
new Table({ initial: 10000000, element:"anyfunc" });
assertErrorMessage(() => new Table({initial:10000001, element:"anyfunc"}), RangeError, /bad Table initial size/);
new Table({ initial: 0, maximum: 2**32 - 1, element:"anyfunc" });
assertErrorMessage(() => new Table({initial:0, maximum: 2**32, element:"anyfunc"}), RangeError, /bad Table maximum size/);
const m1 = new Module(wasmTextToBinary('(module (import "foo" "bar") (import "baz" "quux"))'));
assertErrorMessage(() => new Instance(m1), TypeError, /second argument must be an object/);
assertErrorMessage(() => new Instance(m1, {foo:null}), TypeError, /import object field 'foo' is not an Object/);

Просмотреть файл

@ -274,10 +274,6 @@ for (var foldOffsets = 0; foldOffsets <= 1; foldOffsets++) {
wasmFailValidateText('(module (memory 1) (func (i32.store offset=0 (i32.const 0) (f32.const 0))))', mismatchError("f32", "i32"));
wasmFailValidateText('(module (memory 1) (func (i32.store offset=0 (i32.const 0) (f64.const 0))))', mismatchError("f64", "i32"));
wasmEvalText('(module (memory 0 65535))')
wasmEvalText('(module (memory 0 65536))')
wasmFailValidateText('(module (memory 0 65537))', /maximum memory size too big/);
// Test high charge of registers
function testRegisters() {
assertEq(wasmEvalText(

Просмотреть файл

@ -0,0 +1,23 @@
// |jit-test| exitstatus: 6;
// Don't include wasm.js in timeout tests: when wasm isn't supported, it will
// quit(0) which will cause the test to fail.
if (!wasmIsSupported())
quit(6);
load(libdir + "asm.js");
var code = `
var out = ffi.out;
function f() {
out();
}
return f;
`;
var ffi = {};
ffi.out = new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary('(module (func (export "f") (loop $top (br $top))))'))).exports.f;
timeout(1);
asmLink(asmCompile('glob', 'ffi', USE_ASM + code), this, ffi)();
assertEq(true, false);

Просмотреть файл

@ -226,13 +226,6 @@ js::TraceWellKnownSymbols(JSTracer* trc)
}
}
void
JSRuntime::sweepAtoms()
{
if (atoms_)
atoms_->sweep();
}
bool
JSRuntime::transformToPermanentAtoms(JSContext* cx)
{
@ -352,8 +345,30 @@ AtomizeAndCopyChars(JSContext* cx, const CharT* tbchars, size_t length, PinningB
AutoLockForExclusiveAccess lock(cx);
AtomSet& atoms = cx->atoms(lock);
AtomSet::AddPtr p = atoms.lookupForAdd(lookup);
JSRuntime* rt = cx->runtime();
AtomSet& atoms = rt->atoms(lock);
AtomSet* atomsAddedWhileSweeping = rt->atomsAddedWhileSweeping();
AtomSet::AddPtr p;
if (!atomsAddedWhileSweeping) {
p = atoms.lookupForAdd(lookup);
} else {
// We're currently sweeping the main atoms table and all new atoms will
// be added to a secondary table. Check this first.
MOZ_ASSERT(rt->atomsZone(lock)->isGCSweeping());
p = atomsAddedWhileSweeping->lookupForAdd(lookup);
// If that fails check the main table but check if any atom found there
// is dead.
if (!p) {
if (AtomSet::AddPtr p2 = atoms.lookupForAdd(lookup)) {
JSAtom* atom = p2->asPtr(cx);
if (!IsAboutToBeFinalizedUnbarriered(&atom))
p = p2;
}
}
}
if (p) {
JSAtom* atom = p->asPtr(cx);
p->setPinned(bool(pin));

Просмотреть файл

@ -4911,7 +4911,7 @@ class SweepWeakCacheTask : public GCParallelTask
};
static void
SweepAtoms(JSRuntime* runtime)
UpdateAtomsBitmap(JSRuntime* runtime)
{
DenseBitmap marked;
if (runtime->gc.atomMarking.computeBitmapFromChunkMarkBits(runtime, marked)) {
@ -4924,7 +4924,9 @@ SweepAtoms(JSRuntime* runtime)
}
runtime->gc.atomMarking.updateChunkMarkBits(runtime);
runtime->sweepAtoms();
// For convenience sweep these tables non-incrementally as part of bitmap
// sweeping; they are likely to be much smaller than the main atoms table.
runtime->unsafeSymbolRegistry().sweep();
for (CompartmentsIter comp(runtime, SkipAtoms); !comp.done(); comp.next())
comp->sweepVarNames();
@ -5229,9 +5231,9 @@ GCRuntime::beginSweepingSweepGroup()
{
AutoLockHelperThreadState lock;
Maybe<AutoRunParallelTask> sweepAtoms;
Maybe<AutoRunParallelTask> updateAtomsBitmap;
if (sweepingAtoms)
sweepAtoms.emplace(rt, SweepAtoms, PhaseKind::SWEEP_ATOMS, lock);
updateAtomsBitmap.emplace(rt, UpdateAtomsBitmap, PhaseKind::UPDATE_ATOMS_BITMAP, lock);
AutoPhase ap(stats(), PhaseKind::SWEEP_COMPARTMENTS);
@ -5473,6 +5475,64 @@ GCRuntime::mergeSweptObjectArenas(GCRuntime* gc, FreeOp* fop, Zone* zone, SliceB
return Finished;
}
/* static */ IncrementalProgress
GCRuntime::sweepAtomsTable(GCRuntime* gc, FreeOp* fop, Zone* zone, SliceBudget& budget,
AllocKind kind)
{
if (!zone->isAtomsZone())
return Finished;
return gc->sweepAtomsTable(budget);
}
IncrementalProgress
GCRuntime::sweepAtomsTable(SliceBudget& budget)
{
gcstats::AutoPhase ap(stats(), gcstats::PhaseKind::SWEEP_ATOMS_TABLE);
auto& maybeAtoms = maybeAtomsToSweep.ref();
MOZ_ASSERT_IF(maybeAtoms.isSome(), !maybeAtoms.ref().empty());
AtomSet* atomsTable = rt->atomsForSweeping();
if (!atomsTable)
return Finished;
if (maybeAtoms.isNothing()) {
// Create a secondary table to hold new atoms added while we're sweeping
// the main table incrementally.
if (!rt->createAtomsAddedWhileSweepingTable()) {
atomsTable->sweep();
return Finished;
}
// Initialize remaining atoms to sweep.
maybeAtoms.emplace(*atomsTable);
}
// Sweep the table incrementally until we run out of work or budget.
auto& atomsToSweep = *maybeAtoms;
while (!atomsToSweep.empty()) {
if (budget.isOverBudget())
return NotFinished;
JSAtom* atom = atomsToSweep.front().asPtrUnbarriered();
if (IsAboutToBeFinalizedUnbarriered(&atom))
atomsToSweep.removeFront();
atomsToSweep.popFront();
}
// Add any new atoms from the secondary table.
AutoEnterOOMUnsafeRegion oomUnsafe;
for (auto r = rt->atomsAddedWhileSweeping()->all(); !r.empty(); r.popFront()) {
if (!atomsTable->putNew(AtomHasher::Lookup(r.front().asPtrUnbarriered()), r.front()))
oomUnsafe.crash("Adding atom from secondary table after sweep");
}
rt->destroyAtomsAddedWhileSweepingTable();
maybeAtoms.reset();
return Finished;
}
/* static */ IncrementalProgress
GCRuntime::finalizeAllocKind(GCRuntime* gc, FreeOp* fop, Zone* zone, SliceBudget& budget,
AllocKind kind)
@ -5532,6 +5592,7 @@ GCRuntime::initializeSweepActions()
bool ok = true;
AddSweepPhase(&ok);
AddSweepAction(&ok, GCRuntime::sweepAtomsTable);
for (auto kind : ForegroundObjectFinalizePhase.kinds)
AddSweepAction(&ok, GCRuntime::finalizeAllocKind, kind);

Просмотреть файл

@ -710,6 +710,7 @@ ArrayBufferObject::createForWasm(JSContext* cx, uint32_t initialSize,
{
MOZ_ASSERT(initialSize % wasm::PageSize == 0);
MOZ_RELEASE_ASSERT(wasm::HaveSignalHandlers());
MOZ_RELEASE_ASSERT((initialSize / wasm::PageSize) <= wasm::MaxMemoryInitialPages);
// Prevent applications specifying a large max (like UINT32_MAX) from
// unintentially OOMing the browser on 32-bit: they just want "a lot of

Просмотреть файл

@ -92,7 +92,10 @@ ProxyObject::New(JSContext* cx, const BaseProxyHandler* handler, HandleValue pri
values->init(proxy->numReservedSlots());
proxy->data.handler = handler;
proxy->setCrossCompartmentPrivate(priv);
if (IsCrossCompartmentWrapper(proxy))
proxy->setCrossCompartmentPrivate(priv);
else
proxy->setSameCompartmentPrivate(priv);
/* Don't track types of properties of non-DOM and non-singleton proxies. */
if (newKind != SingletonObject && !clasp->isDOMClass())

Просмотреть файл

@ -156,6 +156,7 @@ JSRuntime::JSRuntime(JSRuntime* parentRuntime)
beingDestroyed_(false),
allowContentJS_(true),
atoms_(nullptr),
atomsAddedWhileSweeping_(nullptr),
atomsCompartment_(nullptr),
staticStrings(nullptr),
commonNames(nullptr),
@ -843,6 +844,34 @@ JSRuntime::activeGCInAtomsZone()
zone->wasGCStarted();
}
bool
JSRuntime::createAtomsAddedWhileSweepingTable()
{
MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting());
MOZ_ASSERT(!atomsAddedWhileSweeping_);
atomsAddedWhileSweeping_ = js_new<AtomSet>();
if (!atomsAddedWhileSweeping_)
return false;
if (!atomsAddedWhileSweeping_->init()) {
destroyAtomsAddedWhileSweepingTable();
return false;
}
return true;
}
void
JSRuntime::destroyAtomsAddedWhileSweepingTable()
{
MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting());
MOZ_ASSERT(atomsAddedWhileSweeping_);
js_delete(atomsAddedWhileSweeping_.ref());
atomsAddedWhileSweeping_ = nullptr;
}
void
JSRuntime::setUsedByHelperThread(Zone* zone)
{

Просмотреть файл

@ -815,6 +815,9 @@ struct JSRuntime : public js::MallocProvider<JSRuntime>
// AutoLockForExclusiveAccess.
js::ExclusiveAccessLockOrGCTaskData<js::AtomSet*> atoms_;
// Set of all atoms added while the main atoms table is being swept.
js::ExclusiveAccessLockData<js::AtomSet*> atomsAddedWhileSweeping_;
// Compartment and associated zone containing all atoms in the runtime, as
// well as runtime wide IonCode stubs. Modifying the contents of this
// compartment requires the calling thread to use AutoLockForExclusiveAccess.
@ -830,14 +833,26 @@ struct JSRuntime : public js::MallocProvider<JSRuntime>
void finishAtoms();
bool atomsAreFinished() const { return !atoms_; }
void sweepAtoms();
js::AtomSet* atomsForSweeping() {
MOZ_ASSERT(JS::CurrentThreadIsHeapCollecting());
return atoms_;
}
js::AtomSet& atoms(js::AutoLockForExclusiveAccess& lock) {
MOZ_ASSERT(atoms_);
return *atoms_;
}
js::AtomSet& unsafeAtoms() {
MOZ_ASSERT(atoms_);
return *atoms_;
}
bool createAtomsAddedWhileSweepingTable();
void destroyAtomsAddedWhileSweepingTable();
js::AtomSet* atomsAddedWhileSweeping() {
return atomsAddedWhileSweeping_;
}
JSCompartment* atomsCompartment(js::AutoLockForExclusiveAccess& lock) {
return atomsCompartment_;
}
@ -849,6 +864,10 @@ struct JSRuntime : public js::MallocProvider<JSRuntime>
return comp == atomsCompartment_;
}
const JS::Zone* atomsZone(js::AutoLockForExclusiveAccess& lock) const {
return gc.atomsZone;
}
// The atoms compartment is the only one in its zone.
bool isAtomsZone(const JS::Zone* zone) const {
return zone == gc.atomsZone;

Просмотреть файл

@ -26,6 +26,7 @@
using namespace js;
using mozilla::ArrayLength;
using mozilla::DebugOnly;
using mozilla::Maybe;
using mozilla::PodCopy;
@ -1701,7 +1702,20 @@ WasmActivation::finishInterrupt()
bool
WasmActivation::interrupted() const
{
return !!cx_->runtime()->wasmResumePC();
void* pc = cx_->runtime()->wasmResumePC();
if (!pc)
return false;
Activation* act = cx_->activation();
while (act && !act->isWasm())
act = act->prev();
if (act->asWasm() != this)
return false;
DebugOnly<wasm::Frame*> fp = act->asWasm()->exitFP();
MOZ_ASSERT(fp && fp->instance()->code().containsFunctionPC(pc));
return true;
}
void*

Просмотреть файл

@ -74,6 +74,7 @@ FrameIterator::FrameIterator(WasmActivation* activation, Unwind unwind)
code_ = activation_->compartment()->wasm.lookupCode(activation->resumePC());
MOZ_ASSERT(code_);
MOZ_ASSERT(&fp_->tls->instance->code() == code_);
codeRange_ = code_->lookupRange(activation->resumePC());
MOZ_ASSERT(codeRange_->kind() == CodeRange::Function);

Просмотреть файл

@ -423,8 +423,7 @@ ToNonWrappingUint32(JSContext* cx, HandleValue v, uint32_t max, const char* kind
return false;
if (dbl < 0 || dbl > max) {
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_UINT32,
kind, noun);
JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_UINT32, kind, noun);
return false;
}
@ -434,8 +433,8 @@ ToNonWrappingUint32(JSContext* cx, HandleValue v, uint32_t max, const char* kind
}
static bool
GetLimits(JSContext* cx, HandleObject obj, uint32_t max, const char* kind,
Limits* limits)
GetLimits(JSContext* cx, HandleObject obj, uint32_t maxInitial, uint32_t maxMaximum,
const char* kind, Limits* limits)
{
JSAtom* initialAtom = Atomize(cx, "initial", strlen("initial"));
if (!initialAtom)
@ -446,7 +445,7 @@ GetLimits(JSContext* cx, HandleObject obj, uint32_t max, const char* kind,
if (!GetProperty(cx, obj, obj, initialId, &initialVal))
return false;
if (!ToNonWrappingUint32(cx, initialVal, max, kind, "initial size", &limits->initial))
if (!ToNonWrappingUint32(cx, initialVal, maxInitial, kind, "initial size", &limits->initial))
return false;
JSAtom* maximumAtom = Atomize(cx, "maximum", strlen("maximum"));
@ -461,7 +460,7 @@ GetLimits(JSContext* cx, HandleObject obj, uint32_t max, const char* kind,
return false;
limits->maximum.emplace();
if (!ToNonWrappingUint32(cx, maxVal, max, kind, "maximum size", limits->maximum.ptr()))
if (!ToNonWrappingUint32(cx, maxVal, maxMaximum, kind, "maximum size", limits->maximum.ptr()))
return false;
if (limits->initial > *limits->maximum) {
@ -1343,7 +1342,7 @@ WasmMemoryObject::construct(JSContext* cx, unsigned argc, Value* vp)
RootedObject obj(cx, &args[0].toObject());
Limits limits;
if (!GetLimits(cx, obj, UINT32_MAX / PageSize, "Memory", &limits))
if (!GetLimits(cx, obj, MaxMemoryInitialPages, MaxMemoryMaximumPages, "Memory", &limits))
return false;
limits.initial *= PageSize;
@ -1654,7 +1653,7 @@ WasmTableObject::construct(JSContext* cx, unsigned argc, Value* vp)
}
Limits limits;
if (!GetLimits(cx, obj, UINT32_MAX, "Table", &limits))
if (!GetLimits(cx, obj, MaxTableInitialLength, UINT32_MAX, "Table", &limits))
return false;
RootedWasmTableObject table(cx, WasmTableObject::create(cx, limits));

Просмотреть файл

@ -171,7 +171,7 @@ fuzzy(16,69) fuzzy-if(skiaContent,95,2200) == attachment-local-clipping-image-4.
fuzzy(16,69) fuzzy-if(skiaContent,95,2200) == attachment-local-clipping-image-5.html attachment-local-clipping-image-4-ref.html
fuzzy(80,500) fuzzy-if(skiaContent,100,908) fails-if(webrender) == attachment-local-clipping-image-6.html attachment-local-clipping-image-6-ref.html
fuzzy-if(skiaContent,1,8) == background-multiple-with-border-radius.html background-multiple-with-border-radius-ref.html
fuzzy-if(skiaContent,1,8) fuzzy-if(webrender,1,84) == background-multiple-with-border-radius.html background-multiple-with-border-radius-ref.html
== background-repeat-large-area.html background-repeat-large-area-ref.html
fuzzy(30,474) fuzzy-if(skiaContent,31,474) == background-tiling-zoom-1.html background-tiling-zoom-1-ref.html

Просмотреть файл

@ -87,6 +87,6 @@ fuzzy(125,5808) == border-image-element.html border-image-element-ref.html
== svg-as-border-image-1a.html svg-as-border-image-1-ref.html
== svg-as-border-image-1b.html svg-as-border-image-1-ref.html
== svg-as-border-image-1c.html svg-as-border-image-1-ref.html
== svg-as-border-image-2.html svg-as-border-image-2-ref.html
fails-if(webrender) == svg-as-border-image-2.html svg-as-border-image-2-ref.html # see bug 1151016. The svg viewport size may be wrong
== svg-as-border-image-3.html svg-as-border-image-3-ref.html
== svg-as-border-image-4.html svg-as-border-image-4-ref.html

Просмотреть файл

@ -23,7 +23,7 @@ fuzzy-if(skiaContent,1,342) == percent-2.html percent-2-ref.html
fuzzy-if(skiaContent,1,343) == percent-3.html percent-3-ref.html
# more serious tests, using SVG reference
fuzzy-if(skiaContent,17,58) == border-circle-2.html border-circle-2-ref.xhtml
fuzzy-if(skiaContent,17,58) fuzzy-if(webrender,16,59) == border-circle-2.html border-circle-2-ref.xhtml
fuzzy-if(gtkWidget,14,280) fuzzy-if(cocoaWidget,4,582) fuzzy-if(Android,36,264) fuzzy-if(d2d,51,323) fuzzy-if(winWidget&&!d2d,16,377) fuzzy-if(skiaContent,63,398) == curved-stripe-border.html curved-stripe-border-ref.svg # bug 459945
# Corners
@ -53,7 +53,7 @@ fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(skiaContent,1,7
fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) fuzzy-if(Android,5,21) fuzzy-if(skiaContent,1,97) == clipping-5-refi.html clipping-5-ref.html
fuzzy-if(true,1,7) fuzzy-if(d2d,48,94) fuzzy-if(cocoaWidget,1,99) fuzzy-if(Android,99,115) fuzzy-if(skiaContent,1,77) == clipping-5-refc.html clipping-5-ref.html # bug 732535
fuzzy-if(winWidget,105,71) fuzzy-if(Android,8,469) fuzzy-if(skiaContent,7,58) == clipping-6.html clipping-6-ref.html # PaintedLayer and MaskLayer with transforms that aren't identical
fuzzy-if(true,2,29) fuzzy-if(d2d,46,50) fuzzy-if(Android,255,586) fuzzy-if(skiaContent,28,96) fails-if(webrender) == clipping-7.html clipping-7-ref.html # ColorLayer and MaskLayer with transforms that aren't identical. Reference image rendered without using layers (which causes fuzzy failures).
fuzzy-if(true,2,29) fuzzy-if(d2d,46,50) fuzzy-if(Android,255,586) fuzzy-if(skiaContent,28,96) == clipping-7.html clipping-7-ref.html # ColorLayer and MaskLayer with transforms that aren't identical. Reference image rendered without using layers (which causes fuzzy failures).
fuzzy-if(/^Windows\x20NT\x206\.2/.test(http.oscpu),1,5) == clipping-and-zindex-1.html clipping-and-zindex-1-ref.html
fuzzy-if(cocoaWidget,1,4) == intersecting-clipping-1-canvas.html intersecting-clipping-1-refc.html
== intersecting-clipping-1-image.html intersecting-clipping-1-refi.html

Просмотреть файл

@ -1597,7 +1597,7 @@ pref(dom.meta-viewport.enabled,true) skip-if(Android) == 593243-2.html 593243-2-
random-if(Android) == 594333-1.html 594333-1-ref.html
== 594624-1.html 594624-1-ref.html
== 594737-1.html 594737-1-ref.html
fuzzy-if(skiaContent,1,80) == 597721-1.html 597721-1-ref.html
fuzzy-if(skiaContent,1,80) fuzzy-if(webrender,1,100) == 597721-1.html 597721-1-ref.html
random-if(winWidget) fuzzy-if(Android,38,539) fuzzy-if(skiaContent,1,480) needs-focus skip-if(styloVsGecko) == 598726-1.html 598726-1-ref.html # Fails on Windows, bug 782196
== 599113-1.html 599113-1-ref.html
fails-if(!haveTestPlugin) HTTP == 599476.html 599476-ref.html
@ -1663,7 +1663,7 @@ HTTP(..) == 635639-1.html 635639-1-ref.html
HTTP(..) == 635639-2.html 635639-2-ref.html
random == 637597-1.html 637597-1-ref.html # bug 637597 was never really fixed!
fuzzy-if(Android,8,500) == 637852-1.html 637852-1-ref.html
fuzzy-if(Android,8,500) fuzzy-if(skiaContent,2,1) == 637852-2.html 637852-2-ref.html
fuzzy-if(Android,8,500) fuzzy-if(skiaContent,2,1) fuzzy-if(webrender,3,19) == 637852-2.html 637852-2-ref.html
fuzzy-if(Android,8,500) == 637852-3.html 637852-3-ref.html
== 641770-1.html 641770-1-ref.html
== 641856-1.html 641856-1-ref.html
@ -1983,8 +1983,8 @@ fuzzy-if(Android,27,874) fuzzy-if(gtkWidget,14,29) == 1313772.xhtml 1313772-ref.
fuzzy(2,320000) == 1315113-1.html 1315113-1-ref.html
fuzzy(2,20000) == 1315113-2.html 1315113-2-ref.html
== 1315632-1.html 1315632-1-ref.html
fuzzy(2,40000) == 1316719-1a.html 1316719-1-ref.html
fuzzy(2,40000) == 1316719-1b.html 1316719-1-ref.html
fuzzy(2,40000) fuzzy-if(webrender,26,691) == 1316719-1a.html 1316719-1-ref.html
fuzzy(2,40000) fuzzy-if(webrender,26,691) == 1316719-1b.html 1316719-1-ref.html
fuzzy(2,40000) == 1316719-1c.html 1316719-1-ref.html
pref(layers.advanced.background-color,1) skip-if(!webrender) fuzzy-if(webrender,27,700) == 1316719-1a.html 1316719-1-ref.html
pref(layers.advanced.background-color,1) skip-if(!webrender) fuzzy-if(webrender,27,700) == 1316719-1b.html 1316719-1-ref.html

Просмотреть файл

@ -61,7 +61,7 @@ fails-if(webrender) != paintedlayer-recycling-7.html about:blank
fails-if(webrender) != layer-splitting-1.html about:blank
fails-if(webrender) != layer-splitting-2.html about:blank
fails-if(webrender) != layer-splitting-3.html about:blank
!= layer-splitting-4.html about:blank
fails-if(webrender) != layer-splitting-4.html about:blank
fails-if(webrender) != layer-splitting-5.html about:blank
fails-if(webrender) != layer-splitting-6.html about:blank
fails-if(webrender) != layer-splitting-7.html about:blank

Просмотреть файл

@ -155,8 +155,8 @@ fuzzy-if(false,2,1) == fuzzy-ref.html fuzzy-ref.html
# When using 565 fuzzy.html and fuzzy-ref.html will compare as equal
fails-if(!styloVsGecko) fuzzy-if(false,2,1) random-if(Android) == fuzzy.html fuzzy-ref.html
# Test that reftest-no-paint fails correctly
fails == reftest-no-paint.html reftest-no-paint-ref.html
# Test that reftest-no-paint fails correctly. With WR enabled, it will generate color layers instead of updating color on the painted layer.
fails skip-if(webrender) == reftest-no-paint.html reftest-no-paint-ref.html
skip-if(!asyncPan||!browserIsRemote) == async-scroll-1a.html async-scroll-1-ref.html

Просмотреть файл

@ -216,7 +216,7 @@ fuzzy-if(skiaContent,1,800000) == filters-and-group-opacity-01.svg filters-and-g
== foreignObject-ancestor-style-change-01.svg foreignObject-ancestor-style-change-01-ref.svg
== foreignObject-change-transform-01.svg pass.svg
== foreignObject-display-01.svg pass.svg
== foreignObject-form-theme.svg foreignObject-form-theme-ref.html
fuzzy-if(webrender,1,35) == foreignObject-form-theme.svg foreignObject-form-theme-ref.html
== foreignObject-img-form-theme.html foreignObject-img-form-theme-ref.html
== foreignObject-move-repaint-01.svg pass.svg
== foreignObject-overflow-01.svg pass.svg

Просмотреть файл

@ -18,36 +18,36 @@ default-preferences pref(layout.css.clip-path-shapes.enabled,true)
== clip-path-polygon-012.html clip-path-stripes-001-ref.html
fuzzy-if(skiaContent,1,20) == clip-path-polygon-013.html clip-path-stripes-003-ref.html
== clip-path-circle-001.html clip-path-circle-001-ref.html
== clip-path-circle-002.html clip-path-circle-001-ref.html
== clip-path-circle-003.html clip-path-circle-001-ref.html
== clip-path-circle-004.html clip-path-circle-001-ref.html
== clip-path-circle-005.html clip-path-circle-002-ref.html
== clip-path-circle-006.html clip-path-circle-001-ref.html
== clip-path-circle-007.html clip-path-circle-002-ref.html
== clip-path-circle-008.html clip-path-circle-002-ref.html
== clip-path-circle-009.html clip-path-circle-003-ref.html
== clip-path-circle-010.html clip-path-circle-004-ref.html
== clip-path-circle-011.html clip-path-circle-005-ref.html
== clip-path-circle-012.html clip-path-circle-006-ref.html
== clip-path-circle-013.html clip-path-circle-002-ref.html
== clip-path-circle-014.html clip-path-circle-007-ref.html
== clip-path-circle-015.html clip-path-circle-008-ref.html
== clip-path-circle-016.html clip-path-circle-009-ref.html
fuzzy-if(webrender,89,690) == clip-path-circle-001.html clip-path-circle-001-ref.html
fuzzy-if(webrender,89,690) == clip-path-circle-002.html clip-path-circle-001-ref.html
fuzzy-if(webrender,89,690) == clip-path-circle-003.html clip-path-circle-001-ref.html
fuzzy-if(webrender,89,690) == clip-path-circle-004.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-005.html clip-path-circle-002-ref.html
fuzzy-if(webrender,89,690) == clip-path-circle-006.html clip-path-circle-001-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-007.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-008.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-009.html clip-path-circle-003-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-010.html clip-path-circle-004-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-011.html clip-path-circle-005-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-012.html clip-path-circle-006-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-013.html clip-path-circle-002-ref.html
fuzzy-if(webrender,89,698) == clip-path-circle-014.html clip-path-circle-007-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-015.html clip-path-circle-008-ref.html
fuzzy-if(webrender,89,702) == clip-path-circle-016.html clip-path-circle-009-ref.html
fuzzy-if(webrender,128,714) == clip-path-circle-017.html clip-path-circle-007-ref.html
== clip-path-circle-018.html clip-path-circle-010-ref.html
== clip-path-circle-019.html clip-path-circle-002-ref.html
== clip-path-circle-020.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-018.html clip-path-circle-010-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-019.html clip-path-circle-002-ref.html
fuzzy-if(webrender,64,714) == clip-path-circle-020.html clip-path-circle-002-ref.html
== clip-path-circle-021.html clip-path-circle-021-ref.html
== clip-path-ellipse-001.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-002.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-003.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-004.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-005.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-006.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-007.html clip-path-ellipse-001-ref.html
== clip-path-ellipse-008.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-001.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-002.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-003.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-004.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-005.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-006.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-007.html clip-path-ellipse-001-ref.html
fuzzy-if(webrender,64,1106) == clip-path-ellipse-008.html clip-path-ellipse-001-ref.html
== clip-path-inset-001a.html clip-path-inset-001-ref.html
== clip-path-inset-001b.html clip-path-inset-001-ref.html

Просмотреть файл

@ -27,11 +27,11 @@ fuzzy-if(Android,255,30) == clipPath-html-06-extref.xhtml clipPath-html-06-ref.x
== filter-html-01.xhtml filter-html-01-ref.svg
random-if(Android) random-if(styloVsGecko) == filter-html-01-extref.xhtml filter-html-01-ref.svg # Android: bug 1198380
== filter-html-zoomed-01.xhtml filter-html-01-ref.svg
== mask-html-01.xhtml mask-html-01-ref.svg
== mask-html-01-extref-01.xhtml mask-html-01-ref.svg
fuzzy-if(webrender,1,125414) == mask-html-01.xhtml mask-html-01-ref.svg
fuzzy-if(webrender,1,125414) == mask-html-01-extref-01.xhtml mask-html-01-ref.svg
random == mask-html-01-extref-02.xhtml mask-html-01-ref.svg # random due to bug 877661
== mask-html-zoomed-01.xhtml mask-html-01-ref.svg
== mask-html-xbl-bound-01.html mask-html-01-ref.svg
fuzzy-if(webrender,1,125414) == mask-html-zoomed-01.xhtml mask-html-01-ref.svg
fuzzy-if(webrender,1,125414) == mask-html-xbl-bound-01.html mask-html-01-ref.svg
== mask-transformed-html-01.xhtml ../pass.svg
== mask-transformed-html-02.xhtml ../pass.svg
fuzzy-if(skiaContent,1,5) == patterned-svg-under-transformed-html-01.xhtml ../pass.svg

Просмотреть файл

@ -41,8 +41,8 @@ asserts-if(gtkWidget,0-6) != backgr_border-table-quirks.html empty.html
== border-collapse-table-row.html border-collapse-table-row-ref.html
== border-collapse-table.html border-collapse-table-ref.html
fuzzy-if(d2d,1,1083) fuzzy-if(skiaContent,1,2200) == border-collapse-opacity-table-cell.html border-collapse-opacity-table-cell-ref.html
fails-if(!styloVsGecko) == border-collapse-opacity-table-column-group.html border-collapse-opacity-table-column-group-ref.html # bug 424274
fails-if(!styloVsGecko) == border-collapse-opacity-table-column.html border-collapse-opacity-table-column-ref.html # bug 424274
fails-if(!styloVsGecko&&!webrender) == border-collapse-opacity-table-column-group.html border-collapse-opacity-table-column-group-ref.html # bug 424274
fails-if(!styloVsGecko&&!webrender) == border-collapse-opacity-table-column.html border-collapse-opacity-table-column-ref.html # bug 424274
fuzzy-if(d2d,1,16359) fuzzy-if(skiaContent,1,17000) == border-collapse-opacity-table-row-group.html border-collapse-opacity-table-row-group-ref.html
fuzzy-if(d2d,1,11000) fuzzy-if(skiaContent,1,11000) == border-collapse-opacity-table-row.html border-collapse-opacity-table-row-ref.html
fuzzy-if(d2d||skiaContent,1,60000) == border-collapse-opacity-table.html border-collapse-opacity-table-ref.html

Просмотреть файл

@ -3,7 +3,7 @@
# this test.
== singular-1a.html about:blank
# Multiple transforms should act identically to nested divs.
== compound-1a.html compound-1-ref.html
fuzzy-if(webrender,1,27) == compound-1a.html compound-1-ref.html
!= compound-1a.html compound-1-fail.html
== dynamic-inherit-1.html dynamic-inherit-1-ref.html
== dynamic-addremove-1a.html dynamic-addremove-1-ref.html
@ -87,9 +87,9 @@ fuzzy-if(skiaContent,1,350) == origin-name-2c.html origin-name-2-ref.html
fuzzy-if(skiaContent,2,500) == transform-svg-2a.xhtml transform-svg-2-ref.xhtml
!= transform-svg-2a.xhtml transform-svg-2-fail.xhtml
# skew should allow a mix of one and two parameters.
== skew-1a.html skew-1-ref.html
fuzzy-if(webrender,1,20) == skew-1a.html skew-1-ref.html
fuzzy-if(skiaContent,1,80) == skew-1b.html skew-1-ref.html
== skew-2a.html skew-2-ref.html
fuzzy-if(webrender,1,250) == skew-2a.html skew-2-ref.html
# matrix with values equal to other transforms should behave indistinguishably
== matrix-1a.html matrix-1-ref.html
== matrix-2a.html matrix-2-ref.html

Просмотреть файл

@ -35,4 +35,4 @@
== border-image-repeat-1.html border-image-repeat-1-ref.html
# background-attachment test cases
== background-attachment-fixed-inside-transform-1.html background-attachment-fixed-inside-transform-1-ref.html
fuzzy-if(webrender,1,10) == background-attachment-fixed-inside-transform-1.html background-attachment-fixed-inside-transform-1-ref.html

Просмотреть файл

@ -28,7 +28,7 @@
== flexbox-align-self-horiz-001-table.xhtml flexbox-align-self-horiz-001-ref.xhtml
== flexbox-align-self-horiz-002.xhtml flexbox-align-self-horiz-002-ref.xhtml
== flexbox-align-self-horiz-003.xhtml flexbox-align-self-horiz-003-ref.xhtml
== flexbox-align-self-horiz-004.xhtml flexbox-align-self-horiz-004-ref.xhtml
fuzzy-if(webrender,1,2) == flexbox-align-self-horiz-004.xhtml flexbox-align-self-horiz-004-ref.xhtml
== flexbox-align-self-horiz-005.xhtml flexbox-align-self-horiz-005-ref.xhtml
== flexbox-align-self-vert-001.xhtml flexbox-align-self-vert-001-ref.xhtml
== flexbox-align-self-vert-002.xhtml flexbox-align-self-vert-002-ref.xhtml

Просмотреть файл

@ -88,12 +88,12 @@ fails-if(!styloVsGecko) == mask-origin-2.html mask-origin-2-ref.html # bug 12600
default-preferences pref(layout.css.clip-path-shapes.enabled,true)
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-contentBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) fuzzy-if(webrender,64,371) == clip-path-contentBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-contentBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-contentBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-paddingBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) fuzzy-if(webrender,64,371) == clip-path-paddingBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-paddingBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-paddingBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) fuzzy-if(webrender,64,371) == clip-path-paddingBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy(64,370) == clip-path-borderBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-borderBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy(64,370) == clip-path-borderBox-1c.html clip-path-geometryBox-1-ref.html
@ -104,7 +104,7 @@ fuzzy(64,370) == clip-path-strokeBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-viewBox-1a.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,1,21) fuzzy-if(skiaContent,1,60) == clip-path-viewBox-1b.html clip-path-geometryBox-1-ref.html
fuzzy(64,370) == clip-path-viewBox-1c.html clip-path-geometryBox-1-ref.html
fuzzy-if(winWidget,9,98) == clip-path-geometryBox-2.html clip-path-geometryBox-2-ref.html
fuzzy-if(winWidget,9,98) fuzzy-if(webrender,64,100) == clip-path-geometryBox-2.html clip-path-geometryBox-2-ref.html
== clip-path-localRef-1.html clip-path-localRef-1-ref.html

Просмотреть файл

@ -23,7 +23,7 @@
== calc-padding-block-1.html calc-padding-block-1-ref.html
== calc-text-indent-1.html calc-text-indent-1-ref.html
== calc-text-indent-intrinsic-1.html calc-text-indent-intrinsic-1-ref.html
fuzzy-if(skiaContent,1,11) == calc-transform-origin-1.html calc-transform-origin-1-ref.html
fuzzy-if(skiaContent,1,11) fuzzy-if(webrender,1,30) == calc-transform-origin-1.html calc-transform-origin-1-ref.html
== calc-vertical-align-1.html calc-vertical-align-1-ref.html
== calc-width-block-1.html calc-width-block-1-ref.html
== calc-width-block-intrinsic-1.html calc-width-block-intrinsic-1-ref.html

Просмотреть файл

@ -51,5 +51,5 @@ fails-if(layersGPUAccelerated&&!webrender) fails-if(webrender&&browserIsRemote)
fails-if(layersGPUAccelerated&&!webrender) fails-if(webrender&&browserIsRemote) skip-if(Android) fails-if(styloVsGecko) == object-fit-none-webm-002.html object-fit-none-webm-002-ref.html # Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures
fails-if(layersGPUAccelerated&&!webrender) fails-if(webrender&&browserIsRemote) skip-if(Android) fails-if(styloVsGecko) == object-fit-scale-down-webm-001.html object-fit-scale-down-webm-001-ref.html # Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures
fails-if(layersGPUAccelerated&&!webrender) fails-if(webrender&&browserIsRemote) skip-if(Android) fails-if(styloVsGecko) == object-fit-scale-down-webm-002.html object-fit-scale-down-webm-002-ref.html # Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures
fails-if(layersGPUAccelerated) skip-if(Android) fails fails-if(styloVsGecko) == object-position-webm-001.html object-position-webm-001-ref.html # Bug 1098417 for across-the-board failure, Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures
fails-if(layersGPUAccelerated) skip-if(Android) fails fails-if(styloVsGecko) == object-position-webm-002.html object-position-webm-002-ref.html # Bug 1098417 for across-the-board failure, Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures
fails-if(layersGPUAccelerated) skip-if(Android) fails fails-if(styloVsGecko) skip-if(webrender) == object-position-webm-001.html object-position-webm-001-ref.html # Bug 1098417 for across-the-board failure, Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures, Bug 1358055 for webrender failures
fails-if(layersGPUAccelerated) skip-if(Android) fails fails-if(styloVsGecko) skip-if(webrender) == object-position-webm-002.html object-position-webm-002-ref.html # Bug 1098417 for across-the-board failure, Bug 1083516 for layersGPUAccelerated failures, Bug 1084564 for Android failures, Bug 1358055 for webrender failures

Просмотреть файл

@ -147,7 +147,7 @@ test-pref(dom.meta-viewport.enabled,true) test-pref(font.size.inflation.emPerLin
== 1193519-sideways-lr-1.html 1193519-sideways-lr-1-ref.html
== 1193519-sideways-lr-2.html 1193519-sideways-lr-2-ref.html
fuzzy-if(winWidget,3,84) == 1193519-sideways-lr-3.html 1193519-sideways-lr-3-ref.html
fuzzy-if(winWidget,3,112) == 1193519-sideways-lr-4.html 1193519-sideways-lr-4-ref.html
fuzzy-if(winWidget,3,112) fails-if(webrender) == 1193519-sideways-lr-4.html 1193519-sideways-lr-4-ref.html # see bug 1366692. Rounding error with WR enabled.
fuzzy-if(gtkWidget,255,6) fuzzy-if(cocoaWidget,65,69) == 1193519-sideways-lr-decoration-1.html 1193519-sideways-lr-decoration-1-ref.html
== 1196887-1-computed-display-inline-block.html 1196887-1-computed-display-inline-block-ref.html

Просмотреть файл

@ -1617,8 +1617,16 @@ or run without that action (ie: --no-{action})"
buildprops,
os.path.join(dirs['abs_work_dir'], 'buildprops.json'))
if 'MOZILLABUILD' in os.environ:
mach = [
os.path.join(os.environ['MOZILLABUILD'], 'msys', 'bin', 'bash.exe'),
os.path.join(dirs['abs_src_dir'], 'mach')
]
else:
mach = [sys.executable, 'mach']
return_code = self.run_command_m(
command=[sys.executable, 'mach', '--log-no-times', 'build', '-v'],
command=mach + ['--log-no-times', 'build', '-v'],
cwd=dirs['abs_src_dir'],
env=env,
output_timeout=self.config.get('max_build_output_timeout', 60 * 40)

Просмотреть файл

@ -497,22 +497,28 @@ nsPrintOptions::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName,
// Bug 315687: Sanity check paper size to avoid paper size values in
// mm when the size unit flag is inches. The value 100 is arbitrary
// and can be changed.
#if defined(XP_WIN)
bool saveSanitizedSizePrefs = false;
#endif
if (success) {
success = (sizeUnit != nsIPrintSettings::kPaperSizeInches)
|| (width < 100.0)
|| (height < 100.0);
#if defined(XP_WIN)
// Work around legacy invalid prefs where the size unit gets set to
// millimeters, but the height and width remains as the default inches
// ones for letter. See bug 1276717.
// millimeters, but the height and width remains as the previous inches
// settings. See bug 1276717 and bug 1369386 for details.
if (sizeUnit == nsIPrintSettings::kPaperSizeMillimeters &&
height == 11L && width == 8.5L) {
height >= 0L && height < 25L &&
width >= 0L && width < 25L) {
// As an extra precaution only override, when the resolution is also
// set to the legacy invalid, uninitialized value. We'll just broadly
// assume that anything outside of a million DPI is invalid.
if (GETINTPREF(kPrintResolution, &iVal) &&
(iVal <= 0 || iVal > 1000000)) {
// As small pages sizes can be valid we only override when the old
// (now no longer set) pref print_paper_size_type exists. This will be
// removed when we save the prefs below.
const char* paperSizeTypePref =
GetPrefName("print_paper_size_type", aPrinterName);
if (Preferences::HasUserValue(paperSizeTypePref)) {
saveSanitizedSizePrefs = true;
height = -1L;
width = -1L;
}
@ -529,6 +535,12 @@ nsPrintOptions::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName,
DUMP_DBL(kReadStr, kPrintPaperHeight, height);
aPS->SetPaperName(str.get());
DUMP_STR(kReadStr, kPrintPaperName, str.get());
#if defined(XP_WIN)
if (saveSanitizedSizePrefs) {
SavePrintSettingsToPrefs(aPS, !aPrinterName.IsEmpty(),
nsIPrintSettings::kInitSavePaperSize);
}
#endif
}
}
@ -770,6 +782,20 @@ nsPrintOptions::WritePrefs(nsIPrintSettings *aPS, const nsAString& aPrinterName,
WritePrefDouble(GetPrefName(kPrintPaperHeight, aPrinterName), height);
DUMP_STR(kWriteStr, kPrintPaperName, name);
Preferences::SetString(GetPrefName(kPrintPaperName, aPrinterName), name);
#if defined(XP_WIN)
// If the height and width are -1 then this might be a save triggered by
// print pref sanitizing code. This is done as a one off and is partly
// triggered by the existence of an old (now no longer set) pref. We
// remove that pref if it exists here, so that we don't try and sanitize
// what might be valid prefs. See bug 1276717 and bug 1369386 for details.
if (height == -1L && width == -1L) {
const char* paperSizeTypePref =
GetPrefName("print_paper_size_type", aPrinterName);
if (Preferences::HasUserValue(paperSizeTypePref)) {
Preferences::ClearUser(paperSizeTypePref);
}
}
#endif
}
}