Skip to content

Instantly share code, notes, and snippets.

View jeremyroman's full-sized avatar

Jeremy Roman jeremyroman

View GitHub Profile
jeremyroman /
Last active June 13, 2023 15:50
PerformanceResourceTiming deliveryType explainer

PerformanceResourceTiming deliveryType explainer

This is based on w3c/resource-timing#332. See also w3c/resource-timing#343, w3c/navigation-timing#163, WICG/nav-speculation#180.

Resources on the web are usually fetched via HTTP (from the origin server), but in some cases they are known to be delivered from a cache or other buffer, in a way that affects loading performance. Insight into this is useful for authors understanding when these caches accelerate resource loading.

The deliveryType attribute on PerformanceResourceTiming addresses this, with the following values:

jeremyroman / README.txt
Created May 4, 2021 01:47
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
jeremyroman / bikeshedproxy.js
Last active January 21, 2021 20:53
server to proxy requests to CSSWG bikeshed
#!/usr/bin/env node
const crypto = require('crypto');
const http = require('http');
const https = require('https');
const fs = require('fs');
http.createServer((req, res) => {
if (req.url !== '/') {
class AssociatedFrobnicator : public base::SupportsUserData::Data {
Frobnicator* frobnicator() const { return frobnicator_; }
void set_frobnicator(Frobnicator* frobnicator) const { frobnicator_ = frobnicator; }
Frobnicator* frobnicator_;
base::SupportsUserData::Data* data;
diff --git a/third_party/blink/renderer/modules/ b/third_party/blink/renderer/modules/
index 4eaa4575ca63..50e56db64b5b 100644
--- a/third_party/blink/renderer/modules/
+++ b/third_party/blink/renderer/modules/
@@ -170,6 +170,8 @@ void ModulesInitializer::InitLocalFrame(LocalFrame& frame) const {
&AppBannerController::BindMojoRequest, WrapWeakPersistent(&frame)));
&TextSuggestionBackendImpl::Create, WrapWeakPersistent(&frame)));
+ frame.GetInterfaceRegistry()->AddInterface(WTF::BindRepeating(
+ &RemoteObjectGatewayImpl::BindMojoReceiver, WrapWeakPersistent(&frame)));
#0 0x00007ffff79f2e10 in IPC::(anonymous namespace)::ChannelAssociatedGroupController::DetachEndpointClient(mojo::ScopedInterfaceEndpointHandle const&) (this=0x3c9213fe3aa0, handle=...) at ../../ipc/
#1 0x00007ffff791adf7 in mojo::InterfaceEndpointClient::~InterfaceEndpointClient() (this=0x3c921528b2e0) at ../../mojo/public/cpp/bindings/lib/
#2 0x00007ffff791afac in mojo::InterfaceEndpointClient::~InterfaceEndpointClient() (this=0x3c921528b2e0) at ../../mojo/public/cpp/bindings/lib/
#3 0x00007ffff78f949f in std::__Cr::default_delete<mojo::InterfaceEndpointClient>::operator()(mojo::InterfaceEndpointClient*) const (this=0x3c92146c28c0, __ptr=0x3c921528b2e0) at ../../buildtools/third_party/libc++/trunk/include/memory:2338
#4 0x00007ffff78f8b9d in std::__Cr::unique_ptr<mojo::InterfaceEndpointClient, std::__Cr::default_delete<mojo::InterfaceEndpointClient> >::reset(mojo::InterfaceEndpointClient*) (this=0x3c92146c28c0, __p
jeremyroman /
Last active December 11, 2018 18:51
Vector<std::pair<CSSPropertyID, String>> native_values)
: native_values_(std::move(native_values)) {
for (auto& pair : native_values_) {
String& s = pair.second;
if (!s.IsSafeToSendToAnotherThread())
s = s.IsolatedCopy();
diff --git a/content/browser/web_package/ b/content/browser/web_package/
index ea3956d77739..86367c49ad54 100644
--- a/content/browser/web_package/
+++ b/content/browser/web_package/
@@ -4,40 +4,19 @@
#include "content/browser/web_package/web_package_context_impl.h"
-#include "base/bind.h"
-#include "base/single_thread_task_runner.h"
jeremyroman /
Created May 2, 2017 01:14
public/private API class trick
namespace blink {
class RealClass : public RealBase {
static RealClass* Create();
void DoSomething();
// members here
jeremyroman /
Last active April 25, 2017 01:01
union template sketch
// template definition
template <int index, typename... UnionMemberTraits>
class IDLUnionImpl {
bool IsNull() const { return type_ == 0; }
int type_ = 0;
template <int index, typename UnionMemberTraits, typename... Rest>