Skip to content

Instantly share code, notes, and snippets.

View jryans's full-sized avatar

J. Ryan Stinnett jryans

View GitHub Profile
commit aa1a809e3a474ea789eddd6977fa1b20d7ff38d7
Author: J. Ryan Stinnett <[email protected]>
Date: Mon Jul 16 18:01:44 2018 -0500
Handle navigation away from privileged content process in RDM
diff --git a/devtools/client/responsive.html/browser/swap.js b/devtools/client/responsive.html/browser/swap.js
index 863101963ee0a..e7e5b75f16514 100644
--- a/devtools/client/responsive.html/browser/swap.js
+++ b/devtools/client/responsive.html/browser/swap.js
var req = indexedDB.open("matrix-js-sdk:crypto", 7);
req.onerror = console.error;
req.onsuccess = e => {
const db = e.target.result;
db.transaction("inbound_group_sessions").objectStore("inbound_group_sessions")
.count().onsuccess = e => console.log(e.target.result);
db.close();
};
@jryans
jryans / recapture.js
Last active May 19, 2021 21:19
Zotero: Recapture web snapshot
var search = new Zotero.Search();
search.addCondition('itemType', 'is', 'webpage');
var itemIDs = await search.search();
var items = await Zotero.Items.getAsync(itemIDs);
var itemsByAttachmentCount = {};
for (let item of items) {
var attachments = item.getAttachments();
if (!itemsByAttachmentCount[attachments.length]) {
@jryans
jryans / line-table-coverage.md
Last active November 13, 2024 17:50
Measuring the line table's coverage in isolation

Measuring the line table's coverage in isolation

(This is additional detail for one of two metrics in a recent LLVM RFC. The ideas here were proposed by Stephen Livermore-Tozer.)

In addition to a variable coverage metric (described in our RFC elsewhere), we also plan to measure per-variable line table coverage as well. This is particularly useful for disambiguating cases where the above variable coverage metric shows less than 100% coverage. By also checking line table coverage for the same variable, it becomes clear whether the missing variable coverage is due to source lines missing from the line table or instructions missing from variable location ranges.

For the variable v and build configuration o, we have S(v) is the set of source lines in v's scope at which it is defined, and B(o,v) is the subset of S(v) at which v has a value described by debug info when built with o. Our per-variable coverage metric is then

C(o,v) = |B(o,v)| / |S(v)|