Skip to content

Instantly share code, notes, and snippets.

View valenting's full-sized avatar

Valentin Gosu valenting

View GitHub Profile
@valenting
valenting / prune_closed_revisions.py
Created February 26, 2024 12:25
This script lists all of the WIP revisions in your Gecko mercurial repo and prunes those that have already been published
import subprocess
import re
import requests
import os
# Retrieve the API token from an environment variable
API_TOKEN = os.getenv('PHABRICATOR_API_TOKEN')
PHABRICATOR_URL = 'https://phabricator.services.mozilla.com/api/differential.revision.search'
def get_wip_commits():
@valenting
valenting / ipc-redirect-graph.md
Last active August 9, 2022 09:09
HTTP IPC redirect
  sequenceDiagram  
 participant HttpChannelChild  
 participant HttpChannelParent  
 participant nsHttpChannel

% slightly simplified to avoid HttpChannelParentListener and nsAsyncRedirectVerifyHelper
 
 Note over HttpChannelChild: AsyncOpen
  HttpChannelChild->>HttpChannelParent: gNeckoChild->SendPHttpChannelConstructor
{
"create_window_at_startup": false,
"default_line_ending": "unix",
"find_selected_text": true,
"fold_buttons": false,
"font_size": 9,
"gutter": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
{
"create_window_at_startup": false,
"default_line_ending": "unix",
"find_selected_text": true,
"fold_buttons": false,
"font_size": 9,
"gutter": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -1311,20 +1311,24 @@ static void GetTimingAttributes(HttpBase
NS_IMETHODIMP
HttpChannelParent::OnStartRequest(nsIRequest* aRequest, nsISupports* aContext) {
nsresult rv;
LOG(("HttpChannelParent::OnStartRequest [this=%p, aRequest=%p]\n", this,
diff --git a/browser/components/sessionstore/SessionStore.jsm b/browser/components/sessionstore/SessionStore.jsm
--- a/browser/components/sessionstore/SessionStore.jsm
+++ b/browser/components/sessionstore/SessionStore.jsm
@@ -2281,18 +2281,18 @@ var SessionStoreInternal = {
},
/**
* Perform a destructive process switch into a distinct process.
* This method is asynchronous, as it requires multiple calls into content
* processes.
@valenting
valenting / keybase.md
Created September 7, 2018 17:21
keybase.md

Keybase proof

I hereby claim:

  • I am valenting on github.
  • I am valentin_gosu (https://keybase.io/valentin_gosu) on keybase.
  • I have a public key ASBv_Rb9D7O_8T_si1ZVk3GxO9TpTqanA7DqdDASYpsnnwo

To claim this, I am signing this object:

@valenting
valenting / baku-chat.txt
Last active August 30, 2018 18:13
alt-data-wasm IRC chat
(17:26:18) baku: ping
(17:28:00) baku: when you have 1 minute, can you tell me more about this alt-data and nsICacheInfoChannel ?
(17:28:22) valentin: sure...
(17:28:37) valentin: what do you want to know? :)
(17:29:04) baku: it seems that, when I create a channel, I can ask for a particular alt-data
(17:29:16) baku: and if that is in cache, I read it directly, instead of doing the networking
(17:29:17) baku: am I right?
(17:30:06) valentin: yes. You call the preferAltDataType(type) ... if it exists you will get the alt-data contents, and GetAlternativeDataType will return that type
(17:30:51) valentin: otherwise you get what the cached server response... or we may not even use the cache... in which case it's also the raw server response :)
@valenting
valenting / .mozconfig
Created August 23, 2018 12:20
My mozconfig (2018-08-23)
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg
ac_add_options --enable-debug
ac_add_options --enable-warnings-as-errors
#ac_add_options --disable-install-strip
#ac_add_options --enable-geckodriver
ac_add_options --disable-crashreporter
#ac_add_options --enable-clang-plugin
@valenting
valenting / cross-process-redirect.txt
Last active May 16, 2019 10:16
e10s HTTP channel redirect flow
Parent Process Child Process 1 Child Process 2
nsHttpChannel HttpChannelParentListener HttpChannelParent HttpChannelChild
+
|
SessionStore.jsm::onMayChangeProcess <-----------------------+
aChannel.switchProcessTo(tabPromise, identifier)