mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Merge m-c to fx-team, a=merge
This commit is contained in:
commit
d01201c94e
@ -728,10 +728,6 @@ ClientLayerManager::ClearCachedResources(Layer* aSubtree)
|
||||
} else if (mRoot) {
|
||||
ClearLayer(mRoot);
|
||||
}
|
||||
|
||||
if (GetCompositorBridgeChild()) {
|
||||
GetCompositorBridgeChild()->ClearTexturePool();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1214,6 +1214,8 @@ DecodeElemSection(Decoder& d, bool newFormat, Uint32Vector&& oldElems, ModuleGen
|
||||
for (uint32_t i = 0; i < numElems; i++) {
|
||||
if (!d.readVarU32(&seg.elems[i]))
|
||||
return Fail(d, "failed to read element function index");
|
||||
if (seg.elems[i] >= mg.numFuncSigs())
|
||||
return Fail(d, "table element out of range");
|
||||
}
|
||||
|
||||
prevEnd = seg.offset + seg.elems.length();
|
||||
|
@ -14,6 +14,8 @@ const caller = `(func $call (param $i i32) (result i32) (call_indirect 0 (get_lo
|
||||
const callee = i => `(func $f${i} (result i32) (i32.const ${i}))`;
|
||||
|
||||
assertErrorMessage(() => new Module(textToBinary(`(module (elem 0 $f0) ${callee(0)})`)), TypeError, /table index out of range/);
|
||||
assertErrorMessage(() => new Module(textToBinary(`(module (table (resizable 10)) (elem 0 0))`)), TypeError, /table element out of range/);
|
||||
assertErrorMessage(() => new Module(textToBinary(`(module (table (resizable 10)) (func) (elem 0 0 1))`)), TypeError, /table element out of range/);
|
||||
assertErrorMessage(() => new Module(textToBinary(`(module (table (resizable 10)) (elem 10 $f0) ${callee(0)})`)), TypeError, /element segment does not fit/);
|
||||
assertErrorMessage(() => new Module(textToBinary(`(module (table (resizable 10)) (elem 8 $f0 $f0 $f0) ${callee(0)})`)), TypeError, /element segment does not fit/);
|
||||
assertErrorMessage(() => new Module(textToBinary(`(module (table (resizable 10)) (elem 1 $f0 $f0) (elem 0 $f0) ${callee(0)})`)), TypeError, /must be.*ordered/);
|
||||
|
@ -1816,6 +1816,9 @@ TypeAnalyzer::specializeValidFloatOps()
|
||||
if (ins->type() == MIRType::Float32)
|
||||
continue;
|
||||
|
||||
if (!alloc().ensureBallast())
|
||||
return false;
|
||||
|
||||
// This call will try to specialize the instruction iff all uses are consumers and
|
||||
// all inputs are producers.
|
||||
ins->trySpecializeFloat32(alloc());
|
||||
|
@ -270,9 +270,9 @@ void
|
||||
StickyScrollContainer::GetScrollRanges(nsIFrame* aFrame, nsRect* aOuter,
|
||||
nsRect* aInner) const
|
||||
{
|
||||
// We need to use the first in flow; ComputeStickyLimits requires
|
||||
// this, at the very least because its call to
|
||||
// nsLayoutUtils::GetAllInFlowRectsUnion requires it.
|
||||
// We need to use the first in flow; continuation frames should not move
|
||||
// relative to each other and should get identical scroll ranges.
|
||||
// Also, ComputeStickyLimits requires this.
|
||||
nsIFrame *firstCont =
|
||||
nsLayoutUtils::FirstContinuationOrIBSplitSibling(aFrame);
|
||||
|
||||
@ -283,7 +283,7 @@ StickyScrollContainer::GetScrollRanges(nsIFrame* aFrame, nsRect* aOuter,
|
||||
aOuter->SetRect(nscoord_MIN/2, nscoord_MIN/2, nscoord_MAX, nscoord_MAX);
|
||||
aInner->SetRect(nscoord_MIN/2, nscoord_MIN/2, nscoord_MAX, nscoord_MAX);
|
||||
|
||||
const nsPoint normalPosition = aFrame->GetNormalPosition();
|
||||
const nsPoint normalPosition = firstCont->GetNormalPosition();
|
||||
|
||||
// Bottom and top
|
||||
if (stick.YMost() != nscoord_MAX/2) {
|
||||
|
45
layout/reftests/position-sticky/inline-4-ref.html
Normal file
45
layout/reftests/position-sticky/inline-4-ref.html
Normal file
@ -0,0 +1,45 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html>
|
||||
<head>
|
||||
<link rel="author" title="Corey Ford" href="mailto:corey@coreyford.name">
|
||||
<link rel="stylesheet" type="text/css" href="ahem.css">
|
||||
<style>
|
||||
#scroller {
|
||||
margin-top: 100px;
|
||||
height: 200px;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#container {
|
||||
background: pink;
|
||||
position: relative;
|
||||
margin: 50px;
|
||||
height: 400px;
|
||||
margin-bottom: 1000px;
|
||||
}
|
||||
#sticky {
|
||||
position: sticky;
|
||||
left: 0px;
|
||||
top: 75px;
|
||||
outline: 1px dotted purple;
|
||||
font: 10px/1 Ahem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="scroller">
|
||||
<div id="container">
|
||||
<span id="sticky">
|
||||
First line<br>
|
||||
Second line<br>
|
||||
Third line<br>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.getElementById("scroller").scrollTop = 30;
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
48
layout/reftests/position-sticky/inline-4.html
Normal file
48
layout/reftests/position-sticky/inline-4.html
Normal file
@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- Any copyright is dedicated to the Public Domain.
|
||||
- http://creativecommons.org/publicdomain/zero/1.0/ -->
|
||||
<html reftest-async-scroll>
|
||||
<head>
|
||||
<title>CSS Test: Sticky Positioning - inline, async scrolling</title>
|
||||
<link rel="author" title="Corey Ford" href="mailto:corey@coreyford.name">
|
||||
<link rel="match" href="inline-4-ref.html">
|
||||
<meta name="assert" content="Sticky positioning on inline elements should keep continuations aligned during async scrolling">
|
||||
<link rel="stylesheet" type="text/css" href="ahem.css">
|
||||
<style>
|
||||
#scroller {
|
||||
margin-top: 100px;
|
||||
height: 200px;
|
||||
width: 500px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#container {
|
||||
background: pink;
|
||||
position: relative;
|
||||
margin: 50px;
|
||||
height: 400px;
|
||||
margin-bottom: 1000px;
|
||||
}
|
||||
#sticky {
|
||||
position: sticky;
|
||||
left: 0px;
|
||||
top: 75px;
|
||||
outline: 1px dotted purple;
|
||||
font: 10px/1 Ahem;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="scroller"
|
||||
reftest-displayport-x="0" reftest-displayport-y="0"
|
||||
reftest-displayport-w="500" reftest-displayport-h="300"
|
||||
reftest-async-scroll-y="30">
|
||||
<div id="container">
|
||||
<span id="sticky">
|
||||
First line<br>
|
||||
Second line<br>
|
||||
Third line<br>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -40,6 +40,7 @@ fuzzy-if(Android,4,810) == containing-block-1.html containing-block-1-ref.html
|
||||
== inline-1.html inline-1-ref.html
|
||||
== inline-2.html inline-2-ref.html
|
||||
fuzzy-if(OSX==1006||OSX==1007,64,100) fuzzy-if(OSX>=1008,99,210) == inline-3.html inline-3-ref.html
|
||||
skip-if(!asyncPan) == inline-4.html inline-4-ref.html
|
||||
fails == column-contain-1a.html column-contain-1-ref.html
|
||||
== column-contain-1b.html column-contain-1-ref.html
|
||||
== column-contain-2.html column-contain-2-ref.html
|
||||
|
@ -133,7 +133,7 @@ var lazilyLoadedBrowserScripts = [
|
||||
["CastingApps", "chrome://browser/content/CastingApps.js"],
|
||||
["RemoteDebugger", "chrome://browser/content/RemoteDebugger.js"],
|
||||
];
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
if (!AppConstants.RELEASE_BUILD) {
|
||||
lazilyLoadedBrowserScripts.push(
|
||||
["WebcompatReporter", "chrome://browser/content/WebcompatReporter.js"]);
|
||||
}
|
||||
@ -531,7 +531,7 @@ var BrowserApp = {
|
||||
InitLater(() => Services.obs.notifyObservers(window, "browser-delayed-startup-finished", ""));
|
||||
InitLater(() => Messaging.sendRequest({ type: "Gecko:DelayedStartup" }));
|
||||
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
if (!AppConstants.RELEASE_BUILD) {
|
||||
InitLater(() => WebcompatReporter.init());
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ chrome.jar:
|
||||
content/aboutAccounts.js (content/aboutAccounts.js)
|
||||
content/aboutLogins.xhtml (content/aboutLogins.xhtml)
|
||||
content/aboutLogins.js (content/aboutLogins.js)
|
||||
#ifdef NIGHTLY_BUILD
|
||||
#ifndef RELEASE_BUILD
|
||||
content/WebcompatReporter.js (content/WebcompatReporter.js)
|
||||
#endif
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
locale/@AB_CD@/browser/handling.properties (%chrome/handling.properties)
|
||||
locale/@AB_CD@/browser/aboutLogins.dtd (%chrome/aboutLogins.dtd)
|
||||
locale/@AB_CD@/browser/aboutLogins.properties (%chrome/aboutLogins.properties)
|
||||
#ifdef NIGHTLY_BUILD
|
||||
#ifndef RELEASE_BUILD
|
||||
locale/@AB_CD@/browser/webcompatReporter.properties (%chrome/webcompatReporter.properties)
|
||||
#endif
|
||||
% resource search-plugins chrome://browser/locale/searchplugins/
|
||||
|
@ -136,11 +136,7 @@ pref("dom.fileHandle.enabled", true);
|
||||
pref("dom.manifest.oninstall", false);
|
||||
|
||||
// Whether or not selection events are enabled
|
||||
#ifdef NIGHTLY_BUILD
|
||||
pref("dom.select_events.enabled", true);
|
||||
#else
|
||||
pref("dom.select_events.enabled", false);
|
||||
#endif
|
||||
|
||||
// Whether or not Web Workers are enabled.
|
||||
pref("dom.workers.enabled", true);
|
||||
|
@ -1514,43 +1514,50 @@ HttpBaseChannel::SetReferrerWithPolicy(nsIURI *referrer,
|
||||
}
|
||||
|
||||
// check how much referer to send
|
||||
switch (userReferrerTrimmingPolicy) {
|
||||
|
||||
case 1: {
|
||||
// scheme+host+port+path
|
||||
nsAutoCString prepath, path;
|
||||
rv = clone->GetPrePath(prepath);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
nsCOMPtr<nsIURL> url(do_QueryInterface(clone));
|
||||
if (!url) {
|
||||
// if this isn't a url, play it safe
|
||||
// and just send the prepath
|
||||
spec = prepath;
|
||||
break;
|
||||
}
|
||||
rv = url->GetFilePath(path);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
spec = prepath + path;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
// scheme+host+port+/
|
||||
rv = clone->GetPrePath(spec);
|
||||
spec.AppendLiteral("/");
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
break;
|
||||
|
||||
default:
|
||||
// full URI
|
||||
rv = clone->GetAsciiSpec(spec);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
break;
|
||||
}
|
||||
|
||||
// If any user trimming policy is in effect, use the trimmed URI.
|
||||
if (userReferrerTrimmingPolicy) {
|
||||
rv = NS_NewURI(getter_AddRefs(clone), spec);
|
||||
// All output strings start with: scheme+host+port
|
||||
// We want the IDN-normalized PrePath. That's not something currently
|
||||
// available and there doesn't yet seem to be justification for adding it to
|
||||
// the interfaces, so just build it up ourselves from scheme+AsciiHostPort
|
||||
nsAutoCString scheme, asciiHostPort;
|
||||
rv = clone->GetScheme(scheme);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
spec = scheme;
|
||||
spec.AppendLiteral("://");
|
||||
// Note we explicitly cleared UserPass above, so do not need to build it.
|
||||
rv = clone->GetAsciiHostPort(asciiHostPort);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
spec.Append(asciiHostPort);
|
||||
|
||||
switch (userReferrerTrimmingPolicy) {
|
||||
case 1: { // scheme+host+port+path
|
||||
nsCOMPtr<nsIURL> url(do_QueryInterface(clone));
|
||||
if (url) {
|
||||
nsAutoCString path;
|
||||
rv = url->GetFilePath(path);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
spec.Append(path);
|
||||
rv = url->SetQuery(EmptyCString());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
rv = url->SetRef(EmptyCString());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
break;
|
||||
}
|
||||
// No URL, so fall through to truncating the path and any query/ref off
|
||||
// as well.
|
||||
}
|
||||
MOZ_FALLTHROUGH;
|
||||
default: // (Pref limited to [0,2] enforced by clamp, MOZ_CRASH overkill.)
|
||||
case 2: // scheme+host+port+/
|
||||
spec.AppendLiteral("/");
|
||||
// This nukes any query/ref present as well in the case of nsStandardURL
|
||||
rv = clone->SetPath(EmptyCString());
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
// use the full URI
|
||||
rv = clone->GetAsciiSpec(spec);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
}
|
||||
|
||||
|
@ -1082,7 +1082,7 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
||||
if (PREF_CHANGED(HTTP_PREF("referer.trimmingPolicy"))) {
|
||||
rv = prefs->GetIntPref(HTTP_PREF("referer.trimmingPolicy"), &val);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
mReferrerTrimmingPolicy = (uint8_t) clamped(val, 0, 0xff);
|
||||
mReferrerTrimmingPolicy = (uint8_t) clamped(val, 0, 2);
|
||||
}
|
||||
|
||||
if (PREF_CHANGED(HTTP_PREF("referer.XOriginPolicy"))) {
|
||||
|
@ -26,6 +26,7 @@ function run_test() {
|
||||
var referer_uri = "http://foo.example.com/path";
|
||||
var referer_uri_2 = "http://bar.examplesite.com/path3?q=blah";
|
||||
var referer_uri_2_anchor = "http://bar.examplesite.com/path3?q=blah#anchor";
|
||||
var referer_uri_idn = "http://sub1.\xe4lt.example/path";
|
||||
|
||||
// for https tests
|
||||
var server_uri_https = "https://bar.example.com/anotherpath";
|
||||
@ -61,8 +62,10 @@ function run_test() {
|
||||
// tests for referer.trimmingPolicy
|
||||
prefs.setIntPref("network.http.referer.trimmingPolicy", 1);
|
||||
do_check_eq(getTestReferrer(server_uri, referer_uri_2), "http://bar.examplesite.com/path3");
|
||||
do_check_eq(getTestReferrer(server_uri, referer_uri_idn), "http://sub1.xn--lt-uia.example/path");
|
||||
prefs.setIntPref("network.http.referer.trimmingPolicy", 2);
|
||||
do_check_eq(getTestReferrer(server_uri, referer_uri_2), "http://bar.examplesite.com/");
|
||||
do_check_eq(getTestReferrer(server_uri, referer_uri_idn), "http://sub1.xn--lt-uia.example/");
|
||||
// https test
|
||||
do_check_eq(getTestReferrer(server_uri_https, referer_uri_https), "https://bar.example.com/");
|
||||
prefs.setIntPref("network.http.referer.trimmingPolicy", 0);
|
||||
|
@ -22,7 +22,7 @@ function test_policy(test) {
|
||||
} else {
|
||||
var header = chan.getRequestHeader("Referer");
|
||||
do_check_eq(header, test.expectedReferrerSpec);
|
||||
do_check_eq(chan.referrer.spec, test.expectedReferrerSpec);
|
||||
do_check_eq(chan.referrer.asciiSpec, test.expectedReferrerSpec);
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,12 @@ var gTests = [
|
||||
referrer: "https://test.example/referrer",
|
||||
expectedReferrerSpec: "https://test.example/referrer"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_DEFAULT,
|
||||
url: "https://sub1.\xe4lt.example/foo",
|
||||
referrer: "https://sub1.\xe4lt.example/referrer",
|
||||
expectedReferrerSpec: "https://sub1.xn--lt-uia.example/referrer"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_DEFAULT,
|
||||
url: "http://test.example/foo",
|
||||
@ -52,18 +58,36 @@ var gTests = [
|
||||
referrer: "https://test.example/referrer",
|
||||
expectedReferrerSpec: "https://test.example/"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_ORIGIN,
|
||||
url: "https://sub1.\xe4lt.example/foo",
|
||||
referrer: "https://sub1.\xe4lt.example/referrer",
|
||||
expectedReferrerSpec: "https://sub1.xn--lt-uia.example/"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_UNSAFE_URL,
|
||||
url: "https://test.example/foo",
|
||||
referrer: "https://test.example/referrer",
|
||||
expectedReferrerSpec: "https://test.example/referrer"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_UNSAFE_URL,
|
||||
url: "https://sub1.\xe4lt.example/foo",
|
||||
referrer: "https://sub1.\xe4lt.example/referrer",
|
||||
expectedReferrerSpec: "https://sub1.xn--lt-uia.example/referrer"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_UNSAFE_URL,
|
||||
url: "http://test.example/foo",
|
||||
referrer: "https://test.example/referrer",
|
||||
expectedReferrerSpec: "https://test.example/referrer"
|
||||
},
|
||||
{
|
||||
policy: nsIHttpChannel.REFERRER_POLICY_UNSAFE_URL,
|
||||
url: "http://sub1.\xe4lt.example/foo",
|
||||
referrer: "https://sub1.\xe4lt.example/referrer",
|
||||
expectedReferrerSpec: "https://sub1.xn--lt-uia.example/referrer"
|
||||
},
|
||||
];
|
||||
|
||||
function run_test() {
|
||||
|
@ -54,7 +54,7 @@ task:
|
||||
groupSymbol: tc
|
||||
groupName: Submitted by taskcluster
|
||||
symbol: B
|
||||
tier: 2
|
||||
tier: 1
|
||||
collection:
|
||||
debug: true
|
||||
# Rather then enforcing particular conventions we require that all build
|
||||
|
@ -6,4 +6,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -10,4 +10,4 @@ task:
|
||||
chunks:
|
||||
total: 10
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -10,4 +10,4 @@ task:
|
||||
chunks:
|
||||
total: 20
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -6,4 +6,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -6,4 +6,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -7,4 +7,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -6,4 +6,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -7,4 +7,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -7,4 +7,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -10,4 +10,4 @@ task:
|
||||
chunks:
|
||||
total: 48
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -6,4 +6,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -6,4 +6,4 @@ task:
|
||||
- --download-symbols=true
|
||||
extra:
|
||||
treeherder:
|
||||
tier: 2
|
||||
tier: 1
|
||||
|
@ -155,6 +155,20 @@ static nsresult GetKeyValue(const WCHAR* keyLocation, const WCHAR* keyName, nsAS
|
||||
}
|
||||
break;
|
||||
}
|
||||
case REG_QWORD: {
|
||||
// We only use this for vram size
|
||||
LONGLONG qValue;
|
||||
dwcbData = sizeof(qValue);
|
||||
result = RegQueryValueExW(key, keyName, nullptr, &resultType,
|
||||
(LPBYTE)&qValue, &dwcbData);
|
||||
if (result == ERROR_SUCCESS && resultType == REG_QWORD) {
|
||||
qValue = qValue / 1024 / 1024;
|
||||
destString.AppendInt(int32_t(qValue));
|
||||
} else {
|
||||
retval = NS_ERROR_FAILURE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case REG_MULTI_SZ: {
|
||||
// A chain of null-separated strings; we convert the nulls to spaces
|
||||
WCHAR wCharValue[1024];
|
||||
@ -582,8 +596,11 @@ GfxInfo::GetAdapterDescription2(nsAString & aAdapterDescription)
|
||||
NS_IMETHODIMP
|
||||
GfxInfo::GetAdapterRAM(nsAString & aAdapterRAM)
|
||||
{
|
||||
if (NS_FAILED(GetKeyValue(mDeviceKey.get(), L"HardwareInformation.MemorySize", aAdapterRAM, REG_DWORD)))
|
||||
aAdapterRAM = L"Unknown";
|
||||
if (NS_FAILED(GetKeyValue(mDeviceKey.get(), L"HardwareInformation.qwMemorySize", aAdapterRAM, REG_QWORD)) || aAdapterRAM.Length() == 0) {
|
||||
if (NS_FAILED(GetKeyValue(mDeviceKey.get(), L"HardwareInformation.MemorySize", aAdapterRAM, REG_DWORD))) {
|
||||
aAdapterRAM = L"Unknown";
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -592,8 +609,10 @@ GfxInfo::GetAdapterRAM2(nsAString & aAdapterRAM)
|
||||
{
|
||||
if (!mHasDualGPU) {
|
||||
aAdapterRAM.Truncate();
|
||||
} else if (NS_FAILED(GetKeyValue(mDeviceKey2.get(), L"HardwareInformation.MemorySize", aAdapterRAM, REG_DWORD))) {
|
||||
aAdapterRAM = L"Unknown";
|
||||
} else if (NS_FAILED(GetKeyValue(mDeviceKey2.get(), L"HardwareInformation.qwMemorySize", aAdapterRAM, REG_QWORD)) || aAdapterRAM.Length() == 0) {
|
||||
if (NS_FAILED(GetKeyValue(mDeviceKey2.get(), L"HardwareInformation.MemorySize", aAdapterRAM, REG_DWORD))) {
|
||||
aAdapterRAM = L"Unknown";
|
||||
}
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user