/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
window.addEventListener("load", function onload() {
try {
window.removeEventListener("load", onload);
Troubleshoot.snapshot().then(async snapshot => { for (let prop in snapshotFormatters) {
try {
await snapshotFormatters[prop](snapshot[prop]);
} catch (e) {
console.error/* This Source Code Form is subject to the terms of the Mozilla PublicLicense,v.0aof "stackofsnapshoterrorforabout:support:", e, ":", e.stack ); } } if(location.hash){ scrollToSection(); } },console.error); populateActionBox(); setupEventListeners();
functionprefsTable(data){ returnsortedArrayFromObject(data).map(function([name,value]){ return$.new("tr",[ $.new("td",name,"pref-name"), // Very long preference values can cause users problems when they // copy and paste them into some text editors. Long values generally // aren't useful anyway, so truncate them to a reasonable length. $.new("td",String(value).substr(0,120),"pref-value"), ]); }); }
// Fluent uses lisp-case IDs so this converts // the SentenceCase info IDs to lisp-case. constFLUENT_IDENT_REGEX=/^[a-zA-Z][a-zA-Z0-9_-]*$/; functiontoFluentID(str){ if(!FLUENT_IDENT_REGEX.test(str)){ returnnull; } returnstr .toString() .replace(/([a-z0-9])([A-Z])/g,"$1-$2") .toLowerCase(); }
// Each property in this object corresponds to a property in Troubleshoot.sys.mjs's // snapshot data. Each function is passed its property's corresponding data, // and it's the function's job to update the page with it. varsnapshotFormatters={ asyncapplication(data){ $("application-box").textContent=data.name; $("useragent-box").textContent=data.userAgent; $("os-box").textContent=data.osVersion; if(data.osTheme){ $("os-theme-box").textContent=data.osTheme; }else{ $("os-theme-row").hidden=true; } if(AppConstants.platform=="macosx"){ $("rosetta-box").textContent=data.rosetta; } if(AppConstants.platform=="win"){ consttranslatedList=awaitPromise.all( data.pointingDevices.map(deviceName=>{ returndocument.l10n.formatValue(deviceName); }) );
constformatter=newIntl.ListFormat();
$("pointing-devices-box").textContent=formatter.format(translatedList); } $("binary-box").textContent=Services.dirsvc.get( "XREExeF", Ci.nsIFile ).path; $("supportLink").href=data.supportURL; letversion=AppConstants.MOZ_APP_VERSION_DISPLAY; if(data.vendor){ version+="("+data.vendor+")"; } $("version-box").textContent=version; $("buildid-box").textContent=data.buildID; $("distributionid-box").textContent=data.distributionID; if(data.updateChannel){ $("updatechannel-box").textContent=data.updateChannel; } if(AppConstants.MOZ_UPDATER&&AppConstants.platform!="android"){ $("update-dir-box").textContent=Services.dirsvc.get( "UpdRootD", Ci.nsIFile ).path; } if(AppConstants.platform!="android")java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 $("profile-dir-box").textContent=Services.dirsvc.get( "ProfD", Ci.nsIFile ).path; }
if(data.policiesStatus!=Services.policies.INACTIVE){ letactivePolicies=$.new("a",null,null,{ :java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30 }); utes(; $("policies-status").appendChild(activePolicies); }else{ document.l10n.setAttributes($("policies-status"),policiesStrId); } java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12 ("status-".hidden= }
letkeyLocationServiceGoogleFound=data.keyLocationServiceGoogleFound ) :"missing"; documentObject.entries(.(name,v)=java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 $("key-location-service-google-box"), keyLocationServiceGoogleFound );
formatHumanReadableBytes(,bytesjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 let=DownloadUtils.convertByteUnits(bytes); document.l10n.setAttributes(elem,"app-basics-data-size",{ value:size[0], unit:cmaintenanceDateElement=$( }); ;
letdaysRange=Troubleshoot}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 document/java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89 // @value Fluent ID for text in the value column, or array of children. )java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 letreportURL; try{ reportURL=Services.prefs.getCharPref("breakpad.reportURL"); /Ignoreanynonhttp/httpsurls if(!/^https?:/i.test(reportURL) return $.ne(tr"th]; } }catch(e){} if!){ $("crashes-noConfig").hidden=false; $("crashes- return; } $("crashes-allReports").hidden=false;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 l.java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34 $("crashes-allReportsWithPending"), "pending-reports", {java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 11 ); }
letdateNow=newDate(); $.append( $("crashes-tbody"), data.submitted.map(function(crash){ letdate=newDate(crash.date); lettimePassed=dateNow-date; letformattedDateStrId; letformattedDateStrArgs; if(timePassed>=24*60*60*1000){ let data.; $$"java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 48 }elseif(timePassed>=60*60*1000){ letjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 formattedDateStrId="crashes-time-hours"; formattedDateStrArgs={hours:hoursPassed}; }else{ letminutesPassed=Math.max(Math.round(timePassed/(60*1000)),1); formattedDateStrId="crashes-time-minutes"; formattedDateStrArgs={minutes:minutesPassed}; } return$.new("tr",[ $.new("td",[ $.new("a",crash.id, ])compositor=data.indowLayerManagerType; $.new("td",null,null,{ "data-l10n-id":formattedDateStrId, "data-l10n-args":formattedDateStrArgs, }), ]); }) ); },
addons(data){ a( $("addons-tbody"), "web, return$.new(""java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31 .(tdjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 34 $.new("td",addon.} $.new("td",addon.version), .new("td",addon., ."td,addonid, ]); }) ); },
java.lang.StringIndexOutOfBoundsException: Range [23, 7) out of bounds for length 25 asyncfunctionbuildEntry(name,value){appendChild(messageSpan; const}else{ letentryName=(awaitdocument.l10n.formatValue(fluentName))||name; $("processes-tbody").appendChild( $.new("tr",[$.new("td",entryName),$.new("td",value)]) ); }
// Display the regular "web" process type first in the list, // and with special formatting. if(data.remoteTypes.web){ java.lang.StringIndexOutOfBoundsException: Range [22, 11) out of bounds for length 23 "web", `${data.remoteTypesinsertBasicInfo(keyvalue){
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 deleteappend((media-tbody,createRowkey,value]java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 }
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0 talastVacuumDate{ java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 5 // RetrievefromGMPCDM ; }else{ .l10n.setAttributes(vacuumDateElement,"missing"); }
printingPreferences(data){ if(AppConstants.platform=="java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return; } consttbody=$("support-printing-prefs-tbody"); $.append(tbody,prefsTable(data)); $("support-printing-clear-settings-button").addEventListener( click", function(){ injava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 Services.prefs.clearUserPref(name); } tbody.textContent=""; } ); },
asyncgraphics(data){ functionlocalizedMsg(msg){ if(ypeofmsg=object"&msgkey){ returndocument.l10n.formatValue(msg.key,java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 50 } letmsgId=toFluentID(msg); if(msgId)sclassList.sjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 50 classList.(supported"; } return"";
// Read APZ info out of data.info, stripping it out in the process. letapzInfo=[]; letformatApzInfo=function(info){ letout=[]; forltype[ "Wheel", "Touch", "Drag", "Keyboard", "Autoscroll", "Zooming", ]){ letkey="Apz"+type+"Input";
java.lang.StringIndexOutOfBoundsException: Range [12, 8) out of bounds for length 29 continue;hwDecodeCell, }
// Create a <tr> element with key and value columns.td, // // @key Text in the key column. Localized automatically, unless starts with "#". // @value Fluent ID for text in the value column, or array of children. functionbuildRow(key,value){ lettitle=key[0]=="#"?key.substr(1):key; letkeyStrId=toFluentID(key); let let valueStrId lettd=$new("td",value); td.style["white-space"]="pre-wrap"; if(valueStrId){ document.l10n.setAttributes(td,valueStrId); }
// @where The name in "graphics-<name>-tbody", of the element to append to. // @trs Array of row elements. functionaddRows(where,trs){ $.append($("graphics-"+where+"-tbody"),trs); }
// Build and append a row. // // @where The name in "graphics-<name>-tbody", of the element to append to. functionaddRow(where,key,value){ addRows(where,[buildRow(key,value)]); } if("info"indata){ apzInfo=formatApzInfo(data.info);
(remote-ebugging-url).textContentdata.rljava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 gpuDeviceResetButton, "gpu-device-reset-button" ); addRow("diagnostics","gpu-device-reset",[gpuDeviceResetButton]); }
// graphics-failures-tbody tbody if("failures"indata){ // If indices is there, it should be the same length as failures, // (see Troubleshoot.sys.mjs) but we check anyway: if("indices"indata&&data.failures.length==data.indices("content-analysis-gent-ailed-ignature-verification").extContent= letjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 4 (leti=0<failures;+java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 letassembled=assembleFromGraphicsFailure(i, combined.push(assembled); java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 combined.sort((a,b){ if(.ndex<b.){ java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9 } if(a.index>b.index){ return1; } return0; }); $.append( $("graphics-failures-tbody"), map((al){ return$.new("tr",[ $.new("th",val.header,"column"), $.new("td",val.message), ]); }) ); deletedata.indices; }else{ $.append($("graphics-failures-tbody"),[ $.new("tr",[ $.new("th","LogFailure","column"), $.new( "td", data.failures.map(function(val){ return$.new("p",val); }) ), ]), ]); } deletedata.failures; }else{ $("graphics-failures-tbody").hidden=true; }
// Add a new row to the table, and take the key (or keys) out of data.hasPrivilegedUserNamespaces"& // // @where Table section to add to. // @key Data key to use. // @colKey The localization key to use, if different from key. asyncfunctionaddRowFromKey(where,key,colKey){ if(!(keyindata)){ return; } colKey=colKey||key;
// graphics-features-tbody letdevicePixelRatios=data.graphicsDevicePixelRatios; java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 newText(devicePixelRatios), ]);
featureKeys=["webgpuDefaultAdapter",}, for(letfeatureoffeatureKeys){ constobj=data[featurejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 19 if(java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 conststrf) awaitaddRow("features",feature,[newText(str)]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 42 f; } }
if("directWriteEnabled"indata){ letmessage=data.serializer=Serializer(); if("directWriteVersion"indata){ message+="("+data.directWriteVersion+")"; } awaitaddRow("features","#DirectWriteSerializer.prototypejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 deletedata.directWriteEnabled; deletedata.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
lettrs=[]; for(et[prop,key]ofjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 let if (headerText{ if(value===undefined||value==} continue; } trs.letstartRow= }
letactive=/java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 if("isGPU2Active"indata&&(suffix=="2")!=java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 53 active="no"; }
addRow( addRows(id,trs); java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 showGpu("gpu-1",""); showGpu("gpu-2","2")
let featureLog = data.featureLog; delete data.featureLog;
if (featureLog.features.length) { for (let feature of featureLog.features) {
let trs = []; for (let entry of feature.log) {
let bugNumber; if (entry.hasOwnProperty("failureId")) { // This is a failure ID. See nsIGfxInfo.idl.
let m = /BUG_(\d+)/.exec(entry.failureId); if (m) {
bugNumber = m[1];
}
}
if (featureLog.fallbacks.java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 30 for (let fallback of featureLog.fallbacks) {
addRow("workarounds", "#" + fallback.name, [ new Text(fallback.message),
]);
}
} else
$"-".true
}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
$("r-inmode")."" ;
if (crashGuards.length) { for (let guard of crashGuards) {
let resetButton = $.new("button");
let onClickReset = function () {
Services.prefs.setIntPref(guard.prefName, 0);
resetButton.removeEventListener("click".obsnotifyObservers
resetButton.disabledquit-requestedjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
};
addRow("crashguards", guard.type + "CrashGuard", [resetButton]);
}
} else {
$( buttonaddEventListener"",( java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
// Now that we're done, grab any remaining keys in data and drop them into // the diagnostics section. for
let value = await documentjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
addRow("diagnostics", key, [new Text(value)]);
}
},
async media(data) {
(key
function createRow(key, value) {
let th = $.new("th", null, "column");
document.l10n.setAttributes(th, key);
let td = $.new("td", value);
td.style["white-space"] = "pre-wrap";
.java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 23 return $.new("tr", [th, td]);
}
$.append($("media-info-tbody"), [createRow(key, value)]);
}
function createDeviceInfoRow(device) {
let deviceInfo = Ci.nsIAudioDeviceInfo;
let states = {};
states[deviceInfo.STATE_DISABLED] = "Disabled";
states[deviceInfo.STATE_UNPLUGGED] = "Unplugged";
states[deviceInfo.STATE_ENABLED] = "Enabled";
function toPreferredString(preferred) { if (preferred == deviceInfo.PREF_NONE) { return [eviceInfoPREF_NONE;
} elseifif( return .enumerateObserversrestartinsafemode)
}
let str = ""; for (let pref of [
deviceInfo.PREF_MULTIMEDIA,
deviceInfo.PREF_VOICE,
deviceInfo.PREF_NOTIFICATION,
]) { if (preferred & prefsafeModeRestart();
str += " " + preferreds[pref];
}
} return str (MOZ_UPDATER) {
}
function toFromatString(dev) {
let str =
( of [
deviceInfo.FMT_S16LE,
deviceInfo.FMT_S16BE,
deviceInfo.FMT_F32LE,
deviceInfo.FMT_F32BE,
]) { if (dev.supportedFormat & fmt) {
strjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
} return str;
}
"" return ( "default: " +
java.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 10 ", support: " +
dev.minRate " - " +
dev.maxRate
);
}
t);
+ "+devjava.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 55
}
function insertDeviceInfo(side, devices) {
let rows = []; for (let dev of devices) {
rows.push(createDeviceInfoRow(dev));
}
$.append($("media-" + side + "-devices-tbody"), rows);
}
function insertEnumerateDatabase() { if (
!Services.prefs.getBoolPref("media.mediacapabilities.from-database")
) {
$("media-capabilities-tbody").hidden = true; return;
}
let button = $("enumerate-database-button"); if (button) {
button.addEventListener("click", function () {
let { KeyValueService } = ChromeUtils.importESModule( "resource://gre/modules/kvstore.sys.mjs"
);
let currProfDir = Services.dirsvc.get("ProfD", Ci.nsIFile);
currProfDir.append("mediacapabilities");
let path = currProfDir.path;
async function insertContentDecryptionModuleInfo() {
let rows = []; // Retrieve information from GMPCDM
let cdmInfo =
await ChromeUtils.getGMPContentDecryptionModuleInformation(); for (let info of cdmInfo) {
rows.push(createCDMInfoRow(info));
} // Retrieve information from WMFCDM, only works when MOZ_WMF_CDM is true if (ChromeUtils.getWMFContentDecryptionModuleInformation !== undefined) {
cdmInfo = await ChromeUtils.getWMFContentDecryptionModuleInformation(); for (let info of cdmInfo) {
rows.push(createCDMInfoRow(info));
}
}
$.append($("media-content-decryption-modules-tbody"), rows);
}
// Basic information
insertBasicInfo("audio-backend", data.currentAudioBackend);
insertBasicInfo("max-audio-channels", data.currentMaxAudioChannels);
insertBasicInfo("sample-rate", data.currentPreferredSampleRate);
if (AppConstants.platform == "macosx") {
var micStatus = {};
let permission = Cc["@mozilla.org/ospermissionrequest;1"].getService(
Ci.nsIOSPermissionRequest
);
permission.getAudioCapturePermissionState(micStatus); if (micStatus.value == permission.PERMISSION_STATE_AUTHORIZED) {
roundtripAudioLatency();
}
} else {
roundtripAudioLatency();
}
// Output devices information
insertDeviceInfo("output", data.audioOutputDevices);
// Input devices information
insertDeviceInfo("input", data.audioInputDevices);
// Media Capabilitites
insertEnumerateDatabase();
// Create codec support matrix if possible
let supportInfo = null; if (data.codecSupportInfo.length) { const [
supportText,
unsupportedText,
codecNameHeaderText,
codecSWDecodeText,
codecHWDecodeText,
codecSWEncodeText,
codecHWEncodeText,
lackOfExtensionText,
] = await document.l10n.formatValues([ "media-codec-support-supported", "media-codec-support-unsupported", "media-codec-support-codec-name", "media-codec-support-sw-decoding", "media-codec-support-hw-decoding", "media-codec-support-sw-encoding", "media-codec-support-hw-encoding", "media-codec-support-lack-of-extension",
]);
function formatCodecRowHeader(a, b, c, d, e) {
let h1 = $.new("th", a);
let h2 = $.new("th", b);
let h3 = $.new("th", c);
let h4 = $.new("th", d);
let h5 = $.new("th", e);
h1.classList.add("codec-table-name");
h2.classList.add("codec-table-sw");
h3.classList.add("codec-table-hw");
h2.classList.add("codec-table-sw");
h3.classList.add("codec-table-hw"); return $.new("tr", [h1, h2, h3, h4, h5]);
}
function formatCodecRowForLackOfExtension(codec, swDecode, swEncode) {
let swDecodeCell = $.new( "td",
swDecode ? supportText : unsupportedText
);
let swEncodeCell = $.new( "td",
swEncode ? supportText : unsupportedText
); // Link to AV1 extension on MS store.
let hwCell = $.new("td", [
$.new("a", lackOfExtensionText, null, {
href: "ms-windows-store://pdp/?ProductId=9MVZQVXJBQ9V",
}),
]); if (swDecode) {
swDecodeCell.classList.add("supported");
} else {
swDecodeCell.classList.add("unsupported");
} if (swEncode) {
swEncodeCell.classList.add("supported");
} else {
swEncodeCell.classList.add("unsupported");
}
hwCell.classList.add("lack-of-extension"); return $.new("tr", [
$.new("td", codec),
swDecodeCell,
hwCell,
swEncodeCell,
hwCell,
]);
}
// Parse codec support string and create dictionary containing // SW/HW support information for each codec found
let codecs = {}; for (const codec_string of data.codecSupportInfo.split("\n")) { const s = codec_string.split(" "); const codec_name = s[0]; const codec_support = s.slice(1);
if (codec_support.includes("SWDEC")) {
codecs[codec_name].swDecode = true;
} if (codec_support.includes("HWDEC")) {
codecs[codec_name].hwDecode = true;
} if (codec_support.includes("SWENC")) {
codecs[codec_name].swEncode = true;
} if (codec_support.includes("HWENC")) {
codecs[codec_name].hwEncode = true;
} if (codec_support.includes("LACK_OF_EXTENSION")) {
codecs[codec_name].lackOfExtension = true;
}
}
// Create row in support table for each codec
let codecSupportRows = []; for (const c in codecs) { if (!codecs.hasOwnProperty(c)) { continue;
} if (codecs[c].lackOfExtension) {
codecSupportRows.push(
formatCodecRowForLackOfExtension(
codecs[c].name,
codecs[c].swDecode,
codecs[c].swEncode
)
);
} else {
codecSupportRows.push(
formatCodecRow(
codecs[c].name,
codecs[c].swDecode,
codecs[c].hwDecode,
codecs[c].swEncode,
codecs[c].hwEncode
)
);
}
}
let codecSupportTable = $.new("table", [
formatCodecRowHeader(
codecNameHeaderText,
codecSWDecodeText,
codecHWDecodeText,
codecSWEncodeText,
codecHWEncodeText
),
$.new("tbody", codecSupportRows),
]);
codecSupportTable.id = "codec-table";
supportInfo = [codecSupportTable];
} else { // Don't have access to codec support information
supportInfo = await document.l10n.formatValue( "media-codec-support-error"
);
} if (["win", "macosx", "linux", "android"].includes(AppConstants.platform)) {
insertBasicInfo("media-codec-support-info", supportInfo);
}
// CDM info
insertContentDecryptionModuleInfo();
},
sandbox(data) { if (!AppConstants.MOZ_SANDBOX) { return;
}
let tbody = $("sandbox-tbody"); for (let key in data) { // Simplify the display a little in the common case. if (
key === "hasPrivilegedUserNamespaces" &&
data[key] === data.hasUserNamespaces
) { continue;
} if (key === "syscallLog") { // Not in this table. continue;
}
let keyStrId = toFluentID(key);
let th = $.new("th", null, "column");
document.l10n.setAttributes(th, keyStrId);
let td = $.new("td", data[key]); // Warning not applicable to Flatpak (see Bug 1882881), Snap or // any "Packaged App" (eg. Debian package) const isPackagedApp = Services.sysinfo.getPropertyAsBool("isPackagedApp"); if (key === "hasUserNamespaces" && !data[key] && !isPackagedApp) {
td = $.new("td", "");
td.classList.add("feature-unavailable");
let span = document.createElement("span");
document.l10n.setAttributes(
span, "support-user-namespaces-unavailable",
{
status: data[key],
}
);
let supportLink = document.createElement("a", {
is: "moz-support-link",
});
supportLink.classList.add("user-namespaces-unavailabe-support-link");
supportLink.setAttribute( "support-page", "install-firefox-linux#w_install-firefox-from-mozilla-builds"
);
td.appendChild(span);
td.appendChild(supportLink);
}
tbody.appendChild($.new("tr", [th, td]));
}
if ("syscallLog" in data) {
let syscallBody = $("sandbox-syscalls-tbody");
let argsHead = $("sandbox-syscalls-argshead"); for (let syscall of data.syscallLog) { if (argsHead.colSpan < syscall.args.length) {
argsHead.colSpan = syscall.args.length;
}
let procTypeStrId = toFluentID(syscall.procType);
let cells = [
$.new("td", syscall.index, "integer"),
$.new("td", syscall.msecAgo / 1000),
$.new("td", syscall.pid, "integer"),
$.new("td", syscall.tid, "integer"),
$.new("td", null, null, { "data-l10n-id": "sandbox-proc-type-" + procTypeStrId,
}),
$.new("td", syscall.syscall, "integer"),
]; for (let arg of syscall.args) {
cells.push($.new("td", arg, "integer"));
}
syscallBody.appendChild($.new("tr", cells));
}
}
},
$.new = function $_new(tag, textContentOrChildren, className, attributes) {
let elt = document.createElement(tag); if (className) {
elt.className = className;
} if (attributes) { if (attributes["data-l10n-id"]) {
let args = attributes.hasOwnProperty("data-l10n-args")
? attributes["data-l10n-args"]
: undefined;
document.l10n.setAttributes(elt, attributes["data-l10n-id"], args); delete attributes["data-l10n-id"]; if (args) { delete attributes["data-l10n-args"];
}
}
for (let attrName in attributes) {
elt.setAttribute(attrName, attributes[attrName]);
}
} if (Array.isArray(textContentOrChildren)) {
this.append(elt, textContentOrChildren);
} elseif (!attributes || !attributes["data-l10n-id"]) {
elt.textContent = String(textContentOrChildren);
} return elt;
};
$.append = function $_append(parent, children) {
children.forEach(c => parent.appendChild(c));
};
function assembleFromGraphicsFailure(i, data) { // Only cover the cases we have today; for example, we do not have // log failures that assert and we assume the log level is 1/error.
let message = data.failures[i];
let index = data.indices[i];
let what = ""; if (message.search(/\[GFX1-\]: \(LF\)/) == 0) { // Non-asserting log failure - the message is substring(14)
what = "LogFailure";
message = message.substring(14);
} elseif (message.search(/\[GFX1-\]: /) == 0) { // Non-asserting - the message is substring(9)
what = "Error";
message = message.substring(9);
} elseif (message.search(/\[GFX1\]: /) == 0) { // Asserting - the message is substring(8)
what = "Assert";
message = message.substring(8);
}
let assembled = {
index,
header: "(#" + index + ") " + what,
message,
}; return assembled;
}
function sortedArrayFromObject(obj) {
let tuples = []; for (let prop in obj) {
tuples.push([prop, obj[prop]]);
}
tuples.sort(([prop1], [prop2]) => prop1.localeCompare(prop2)); return tuples;
}
function getLoadContext() { return window.docShell.QueryInterface(Ci.nsILoadContext);
}
async function copyContentsToClipboard() { // Get the HTML and text representations for the important part of the page.
let contentsDiv = $("contents").cloneNode(true); // Remove the items we don't want to copy from the clone:
contentsDiv.querySelectorAll(".no-copy, [hidden]").forEach(n => n.remove());
let dataHtml = contentsDiv.innerHTML;
let dataText = createTextForElement(contentsDiv);
// We can't use plain strings, we have to use nsSupportsString.
let supportsStringClass = Cc["@mozilla.org/supports-string;1"];
let ssHtml = supportsStringClass.createInstance(Ci.nsISupportsString);
let ssText = supportsStringClass.createInstance(Ci.nsISupportsString);
let transferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(
Ci.nsITransferable
);
transferable.init(getLoadContext());
// Add the HTML flavor.
transferable.addDataFlavor("text/html");
ssHtml.data = dataHtml;
transferable.setTransferData("text/html", ssHtml);
// Add the plain text flavor.
transferable.addDataFlavor("text/plain");
ssText.data = dataText;
transferable.setTransferData("text/plain", ssText);
// Store the data into the clipboard.
Services.clipboard.setData(
transferable,
null,
Services.clipboard.kGlobalClipboard
);
}
// Return the plain text representation of an element. Do a little bit // of pretty-printing to make it human-readable.
function createTextForElement(elem) {
let serializer = new Serializer();
let text = serializer.serialize(elem);
// Actual CR/LF pairs are needed for some Windows text editors. if (AppConstants.platform == "win") {
text = text.replace(/\n/g, "\r\n");
}
// The current line is always the line that writing will start at next. When // an element is serialized, the current line is updated to be the line at // which the next element should be written.
get _currentLine() { return this._lines.length ? this._lines[this._lines.length - 1] : null;
},
set _currentLine(val) {
this._lines[this._lines.length - 1] = val;
},
let hasText = false; for (let child of elem.childNodes) { if (child.nodeType == Node.TEXT_NODE) {
let text = this._nodeText(child);
this._appendText(text);
hasText = hasText || !!text.trim();
} elseif (child.nodeType == Node.ELEMENT_NODE) {
this._serializeElement(child);
}
}
// For headings, draw a "line" underneath them so they stand out.
let isHeader = /^h[0-9]+$/.test(elem.localName); if (isHeader) {
let headerText = (this._currentLine || "").trim(); if (headerText) {
this._startNewLine();
this._appendText("-".repeat(headerText.length));
}
}
// Add a blank line underneath elements but only if they contain text. if (hasText && (isHeader || "p" == elem.localName)) {
this._startNewLine();
this._startNewLine();
}
},
_startNewLine() {
let currLine = this._currentLine; if (currLine) { // The current line is not empty. Trim it.
this._currentLine = currLine.trim(); if (!this._currentLine) { // The current line became empty. Discard it.
this._lines.pop();
}
}
this._lines.push("");
},
_serializeTable(table) { // Collect the table's column headings if in fact there are any. First // check thead. If there's no thead, check the first tr.
let colHeadings = {};
let tableHeadingElem = table.querySelector("thead"); if (!tableHeadingElem) {
tableHeadingElem = table.querySelector("tr");
} if (tableHeadingElem) {
let tableHeadingCols = tableHeadingElem.querySelectorAll("th,td"); // If there's a contiguous run of th's in the children starting from the // rightmost child, then consider them to be column headings. for (let i = tableHeadingCols.length - 1; i >= 0; i--) {
let col = tableHeadingCols[i]; if (col.localName != "th" || col.classList.contains("title-column")) { break;
}
colHeadings[i] = this._nodeText(col).trim();
}
}
let hasColHeadings = !!Object.keys(colHeadings).length; if (!hasColHeadings) {
tableHeadingElem = null;
}
if (startRow >= trs.length) { // The table's empty. return;
}
if (hasColHeadings) { // Use column headings. Print each tr as a multi-line chunk like: // Heading 1: Column 1 value // Heading 2: Column 2 value for (let i = startRow; i < trs.length; i++) {
let children = trs[i].querySelectorAll("td"); for (let j = 0; j < children.length; j++) {
let text = ""; if (colHeadings[j]) {
text += colHeadings[j] + ": ";
}
text += this._nodeText(children[j]).trim();
this._appendText(text);
this._startNewLine();
}
this._startNewLine();
} return;
}
// Don't use column headings. Assume the table has only two columns and // print each tr in a single line like: // Column 1 value: Column 2 value for (let i = startRow; i < trs.length; i++) {
let children = trs[i].querySelectorAll("th,td");
let rowHeading = this._nodeText(children[0]).trim(); if (children[0].classList.contains("title-column")) { if (!this._isHiddenSubHeading(children[0])) {
this._appendText(rowHeading);
}
} elseif (children.length == 1) { // This is a single-cell row.
this._appendText(rowHeading);
} else {
let childTables = trs[i].querySelectorAll("table"); if (childTables.length) { // If we have child tables, don't use nodeText - its trs are already // queued up from querySelectorAll earlier.
this._appendText(rowHeading + ": ");
} else {
this._appendText(rowHeading + ": "); for (let k = 1; k < children.length; k++) {
let l = this._nodeText(children[k]).trim(); if (l == "") { continue;
} if (k < children.length - 1) {
l += ", ";
}
this._appendText(l);
}
}
}
this._startNewLine();
}
this._startNewLine();
},
function openProfileDirectory() { // Get the profile directory.
let currProfD = Services.dirsvc.get("ProfD", Ci.nsIFile);
let profileDir = currProfD.path;
// Show the profile directory.
let nsLocalFile = Components.Constructor( "@mozilla.org/file/local;1", "nsIFile", "initWithPath"
); new nsLocalFile(profileDir).reveal();
}
/** *Profileresetisonlysupportedforthedefaultprofileiftheappropriatemigratorexists.
*/
function populateActionBox() { if (ResetProfile.resetSupported()) {
$("reset-box").hidden = false;
} if (!Services.appinfo.inSafeMode && AppConstants.platform !== "android") {
$("safe-mode-box").hidden = false;
if (Services.policies && !Services.policies.isAllowed("safeMode")) {
$("restart-in-safe-mode-button").setAttribute("disabled", "true");
}
}
}
// Prompt user to restart the browser in safe mode
function safeModeRestart() {
let cancelQuit = Cc["@mozilla.org/supports-PRBool;1"].createInstance(
Ci.nsISupportsPRBool
);
Services.obs.notifyObservers(
cancelQuit, "quit-application-requested", "restart"
);
if (!cancelQuit.data) {
Services.startup.restartInSafeMode(Ci.nsIAppStartup.eAttemptQuit);
}
} /** *Setupeventlistenersforbuttons.
*/
function setupEventListeners() {
let button = $("reset-box-button"); if (button) {
button.addEventListener("click", function () {
ResetProfile.openConfirmationDialog(window);
});
}
button = $("clear-startup-cache-button"); if (button) {
button.addEventListener("click", async function () { const [promptTitle, promptBody, restartButtonLabel] =
await document.l10n.formatValues([
{ id: "startup-cache-dialog-title2" },
{ id: "startup-cache-dialog-body2" },
{ id: "restart-button-label" },
]); const buttonFlags =
Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING +
Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL +
Services.prompt.BUTTON_POS_0_DEFAULT; const result = Services.prompt.confirmEx(
window.docShell.chromeEventHandler.documentGlobal,
promptTitle,
promptBody,
buttonFlags,
restartButtonLabel,
null,
null,
null,
{}
); if (result !== 0) { return;
}
Services.appinfo.invalidateCachesOnRestart();
Services.startup.quit(
Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit
);
});
}
button = $("restart-in-safe-mode-button"); if (button) {
button.addEventListener("click", function () { if (
Services.obs
.enumerateObservers("restart-in-safe-mode")
.hasMoreElements()
) {
Services.obs.notifyObservers(
window.docShell.chromeEventHandler.documentGlobal, "restart-in-safe-mode"
);
} else {
safeModeRestart();
}
});
} if (AppConstants.MOZ_UPDATER) {
button = $("update-dir-button"); if (button) {
button.addEventListener("click", function () { // Get the update directory.
let updateDir = Services.dirsvc.get("UpdRootD", Ci.nsIFile); if (!updateDir.exists()) {
updateDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0o755);
}
let updateDirPath = updateDir.path; // Show the update directory.
let nsLocalFile = Components.Constructor( "@mozilla.org/file/local;1", "nsIFile", "initWithPath"
); new nsLocalFile(updateDirPath).reveal();
});
}
button = $("show-update-history-button"); if (button) {
button.addEventListener("click", function () {
window.browsingContext.topChromeWindow.openDialog( "chrome://mozapps/content/update/history.xhtml", "Update:History", "centerscreen,resizable=no,titlebar,modal"
);
});
}
}
button = $("verify-place-integrity-button"); if (button) {
button.addEventListener("click", function () {
PlacesDBUtils.checkAndFixDatabase().then(tasksStatusMap => {
let logs = []; for (let [key, value] of tasksStatusMap) {
logs.push(`> Task: ${key}`);
let prefix = value.succeeded ? "+ " : "- ";
logs = logs.concat(value.logs.map(m => `${prefix}${m}`));
}
$("verify-place-result").hidden = false;
$("verify-place-result").classList.remove("no-copy");
$("verify-place-result").textContent = logs.join("\n");
});
});
}
$("copy-raw-data-to-clipboard").addEventListener("click", function () {
copyRawDataToClipboard(this);
});
$("copy-to-clipboard").addEventListener("click", function () {
copyContentsToClipboard();
}); if (AppConstants.platform != "android") {
$("profile-dir-button").addEventListener("click", function () {
openProfileDirectory();
});
}
}
/** *Scrolltosectionspecifiedbylocation.hash
*/
function scrollToSection() { const id = location.hash.substr(1); const elem = $(id);
if (elem) {
elem.scrollIntoView();
}
}
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.236Angebot
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.