Skip to content

Instantly share code, notes, and snippets.

View codehag's full-sized avatar
🍁
unresponsive until Nov. 2023

yulia codehag

🍁
unresponsive until Nov. 2023
View GitHub Profile
@codehag
codehag / DAMP-sourcemaps-9-27.json
Last active November 21, 2017 09:42
DAMP tests debugger
framework
name "talos"
suites
0
alertThreshold 2
extraOptions
0 "e10s"
lowerIsBetter true
name "damp"
@codehag
codehag / try-failures-bookmarklet.js
Last active March 6, 2018 17:06
try test failure bookmarklet
//add this to a bookmark link field, and use it to collect try failures from a domain such as
// https://treeherder.mozilla.org/testview.html?repo=try&revision=a1372c8e3c8a4c3ecbda2ff84f7ea306fb95c1d7
// it will output the collected tests into the console!
javascript:%20(function()%20{%20var%20testNodes%20=%20document.querySelectorAll(".test");%20var%20failingTests%20=%20"";%20for%20(let%20testNode%20of%20testNodes)%20{%20%20%20failingTests%20+=%20testNode.textContent.trim()%20+"%20";%20}%20console.log(failingTests.trim())})()
@codehag
codehag / backporting-damp.md
Last active September 10, 2018 11:19
How to backport DevTools Talos Tests (DAMP) to test against an older version of Firefox

Backporting DAMP Tests to an older version of Firefox

Sometimes, there is a need to see how DevTools performance has changed over a longer period of time, for example half a year. During such a time frame, it is possible that our performance tests have been updated and refined, and we cannot do a comparison between a Talos run from 6 months ago with a new release, simply because the two tests were testing for different data. To solve this, we backport the talos tests from the more modern Firefox, and try to approximate as closely as possible so that we get a more accurate result.

Useful tools for getting started with backporting a test:

  • two revisions that are being tested. If you are backporting between FF versions, a useful list of commit hashes can be
var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components;
Components.utils.import("resource://gre/modules/osfile.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
var done = false;
let gPaths = arguments.filter(a => !a.startsWith("-"));
if (!gPaths.length) {

Proposal Title

Summary

Short text summary of max 200 words

Authors

Author 1, Author 2

@codehag
codehag / tc39-69th-meeting-summary.md
Last active May 16, 2019 17:33
TC39 69th Meeting Summary

Summary:

  • Quite a bit of work on string methods and promise methods.
  • temporal is now blocked on standard modules, adding pressure to do that
  • dynamic import will move to stage 4 if all goes well with realms?
  • Decorators minimal proposal with built in decorators was presented
  • Decorators were also presented as a solution for numeric separators / literals

Stuff we are interested in or working on:

  • WeakRefs was discussed, and agreed to not be optional? It will also not be a systems object
  • Date.parse has not moved forward due to trying to standardize implementation specific behavior.
@codehag
codehag / pickle-helpers.js
Last active September 30, 2023 03:38
Pickle Helpers
const dayInMilliseconds = 86400000;
function wash(type) {
return `clean-${type}`;
}
function cut(type) {
return `cut-${type}`;
}
const washedCabbage = wash("cabbage");
const cutCabbage = cut(washedCabbage);
const crushedCabbage = pound(cutCabbage);
const cabbageJar = new Jar(crushedCabbage);
const saltyCabbageJar = salt(cabbageJar);
const sauerkrautJar = await ferment(saltCabbageJar, 14);
const sauerkraut = sauerkrautJar.takeOne();
// Error: saltCabbageJar is undefined
@codehag
codehag / 71st-tc39-meeting.md
Last active August 7, 2019 14:19
71st tc39 meeting summary

71st meeting of Ecma TC39

High-level overview

Stage 4, ready to ship: Promise.allSettled bug Two syntax changes have moved to stage 3, nullish coalescence and optional chaining A lot of discussion around built in modules. No forward movement. Issues with Weakref -- it cannot be tested in the current test262 setup. Discussion around how to address this.

#Editor Updates

// TabDescriptorActor
const TabDescriptorActor = ActorClassWithSpec(descriptorSpec, {
initialize(connection, options = {}) {
Actor.prototype.initialize.call(this, connection);
this.tabList = options.tabList;
this.destroy = this.destroy.bind(this);
},
async getTarget() {
const tabList = this.tabList;