Skip to content

Instantly share code, notes, and snippets.

Avatar

Diego Pino dpino

View GitHub Profile
@dpino
dpino / patch.diff
Created Nov 24, 2021
Patch build fixes
View patch.diff
From 0f93b285725b0ac8a77a75de0a9d7d0ded94074b Mon Sep 17 00:00:00 2001
From: Diego Pino Garcia <dpino@igalia.com>
Date: Wed, 24 Nov 2021 14:38:36 +0000
Subject: [PATCH] Patch build fixes
---
.../loader/archive/mhtml/MHTMLParser.cpp | 2 +-
.../platform/SharedBufferChunkReader.h | 2 ++
Source/WebCore/platform/gtk/SelectionData.h | 6 ++--
.../ServiceWorkerSoftUpdateLoader.cpp | 2 +-
View gist:2f51467cf8087b8c32f61fb3fcb68c01
$ WEBKIT_JHBUILD=1 WEBKIT_JHBUILD_MODULESET=minimal Tools/Scripts/build-webkit --gtk --touch-events --no-bubblewrap-sandbox --cmakeargs=-DUSE_SOUP2=ON --cmakeargs=-DUSE_JPEGXL=OFF --cmakeargs=-DUSE_AVIF=OFF --no-webxr MiniBrowser | tee log
+ /home/dpino/playwright/browser_patches/webkit/checkout/Tools/jhbuild/jhbuild-wrapper --gtk run cmake --build /home/dpino/playwright/browser_patches/webkit/checkout/WebKitBuild/Release --config Release --
[0/548] Generate bindings (WebCoreBindings)
Preprocess IDL
[4/548] cd /home/dpino/playwright/browser_patches/webkit/checkout/WebKitBuild/Release/Source/WebKit && /usr/bin/perl /home/dpino/playwright/browser_patches/webkit/checkout/Source/WebKit/Scripts/generate-forwarding-headers.pl --include-path /home/dpino/playwright/browser_patches/webkit/checkout/Source/WebKit --output /home/dpino/playwright/browser_patches/webkit/checkout/WebKitBuild/Release/DerivedSources/ForwardingHeaders --platform gtk --platform soup
[5/124] Generate bindings (TestRunnerSharedBindings)
[6/124]
@dpino
dpino / main.cc
Last active Mar 27, 2021
Pass CPP object to JavaScript function
View main.cc
/**
* Pass CPP object to JavaScript function
*
* sample.js:
* function fileInfo(obj)
* {
* return "fileInfo: " + obj.i;
* }
*
* To compile: g++ main.cc -o main `pkg-config --cflags --libs javascriptcoregtk-4.0`
@dpino
dpino / layout-tests-split
Created Mar 14, 2019
Split LayoutTests in several jobs
View layout-tests-split
#!/usr/bin/env bash
function usage {
echo "Usage: layout-tests-split [jobs] [webkit-dir]"
}
JOBS="${1:-1}"
WEBKIT_DIR="${2:-.}"
LAYOUT_TESTS_DIR="$WEBKIT_DIR/LayoutTests/"
@dpino
dpino / build_bots_status.py
Created Mar 12, 2019
WPE & GTK WebKit build bots status
View build_bots_status.py
#!/usr/bin/env python
import urllib
import json
from urllib2 import urlopen
bots_names = [
"WPE Linux 64-bit Release (Build)",
"WPE Linux 64-bit Debug (Build)",
@dpino
dpino / modulo.lua
Created Jan 4, 2019
Microbenchmark for LuaJIT's modulo operations
View modulo.lua
local C = ffi.C
function fold(fn, times)
local now = os.clock()
for i=1,times do
fn()
end
return os.clock() - now
end
@dpino
dpino / b4-to-aftr-over-inet.sh
Created Feb 8, 2018
Communication of a lwB4 network fuction with a remote lwAFTR over Internet
View b4-to-aftr-over-inet.sh
#/usr/bin/env bash
set -x
# This script implements a lwB4 network function insolated into its own network namespace. Once running any IPv4 network command
# will get forwarded to a remote lwAFTR over the Internet. Communication with the lwAFTR is meant to happen via an IPv6 tunnel
# broker (such as Hurricane Electric) which should be already up and running.
# Author: Diego Pino Garca <dpino@igalia.com>
# Based on https://marcelwiget.wordpress.com/2015/11/30/lightweight-4over6-b4-client-in-linux-namespace/
View run-all.sh
#!/usr/bin/env bash
FOLDERS=(
built-ins
annexB
intl402
language
)
for each in ${FOLDERS[@]}; do
View make-report.pl
#!/usr/bin/env perl
# Reads out a web-platform-test run output and prints out a report were errors
# are grouped by text message and list of files. Reports also on total number
# of distinct errors and total number of failing files.
# Arguments:
# Agent: Actual the head of the string containing the test name. The rest of
# the string should the filename.
# Errorfile: web-platform-test output of a ./wpt run.
@dpino
dpino / wpt-run-report.pl
Last active Jan 16, 2018
Parses web-platform-test output and groups results by error message and list of files
View wpt-run-report.pl
#!/usr/bin/env perl
# Reads out a web-platform-test run output and prints out a report were errors
# are grouped by text message and list of files. Reports also on total number
# of distinct errors and total number of failing files.
# Arguments:
# Agent: Actual the head of the string containing the test name. The rest of
# the string should the filename.
# Errorfile: web-platform-test output of a ./wpt run.