Skip to content

Instantly share code, notes, and snippets.

View jdm's full-sized avatar

Josh Matthews jdm

View GitHub Profile
Many FOSS projects find it difficult to grow beyond a small team of core contributors, but this does not need to be the case. There are tried and true ways to lower the barrier to entry and increase the potential pool of contributors. Joshua Matthews presents a five-point plan that provides a solid foundation for encouraging new contributors.
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#![allow(non_camel_case_types,non_upper_case_globals,unused_imports,unused_variables,unused_assignments)]
use core::nonzero::NonZero;
use dom;
use dom::bindings;
use dom::bindings::callback::CallSetup;
use dom::bindings::callback::CallbackContainer;
use dom::bindings::callback::CallbackFunction;
use dom::bindings::callback::CallbackInterface;
@jdm
jdm / backtraces
Last active September 30, 2016 15:40
GC overwriting rooted JSObject pointer:
(gdb) bt
#0 0x000055555881ca67 in mozilla::PodSet<jsval_layout> (aDst=0x2aaac2005080, aSrc=..., aNElem=4)
at /home/jdm/servo/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/master/mozjs/js/src/jsutil.h:312
#1 0x00005555587de5f6 in Poison (ptr=0x2aaac2005080, value=75 'K', num=32)
at /home/jdm/servo/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/master/mozjs/js/src/jsutil.h:369
#2 0x00005555588480a4 in js::gc::Arena::finalize<JSObject> (this=0x2aaac2005000, fop=0x2aaabfb116c0, thingKind=js::gc::AllocKind::OBJECT0_BACKGROUND,
thingSize=32) at /home/jdm/servo/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/master/mozjs/js/src/jsgc.cpp:448
#3 0x000055555881d344 in FinalizeTypedArenas<JSObject> (fop=0x2aaabfb116c0, src=0x2aaabfb10570, dest=..., thingKind=js::gc::AllocKind::OBJECT0_BACKGROUND,
budget=..., keepArenas=js::gc::ArenaLists::KEEP_ARENAS) at /home/jdm/servo/.cargo/git/checkouts/mozjs-fa11ffc7d4f1cc2d/master/mozjs/js/src/jsgc.cpp:505
--- before.rs 2016-08-23 11:52:12.000000000 -0400
+++ after.rs 2016-08-23 11:54:57.000000000 -0400
@@ -1,11 +1,11 @@
/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */
#![allow(non_camel_case_types,non_upper_case_globals,unused_imports,unused_variables,unused_assignments)]
+use dom;
use dom::bindings;
use dom::bindings::callback::wrap_call_this_object;
use dom::bindings::callback::{CallSetup,ExceptionHandling};
{
"action": "opened",
"number": 149,
"pull_request": {
"url": "https://api.github.com/repos/servo/highfive/pulls/149",
"id": 80554397,
"html_url": "https://github.com/servo/highfive/pull/149",
"diff_url": "https://github.com/servo/highfive/pull/149.diff",
"patch_url": "https://github.com/servo/highfive/pull/149.patch",
"issue_url": "https://api.github.com/repos/servo/highfive/issues/149",
URGENT PLEASE SHARE: MISSING PERSON, ENGLAND
Dear everyone on my FB who have friends or relatives currently living in LONDON ENGLAND: my sister Diana currently living on the canals aboard a narrowboat called TUI in London has been worryingly out of contact by all means for a week. We already filed a missing person report with the London police and Canadian embassy; however, we are intensely worried and wish we could do more, especially over the weekend when offices are closed. If you know ANYONE LIVING IN LONDON, who would be willing to BIKE or WALK some SECTION OF THE CANAL TOWPATH and:
-look out for a 40ft blue narrowboat with a red roof called TUI
-ask around moored boaters you see aboard their boats if they have seen the boat and when
-spread the word to any friends or colleagues in London especially any who cover a section of canal on their daily commute to keep their eyes peeled for this boat
ANY EYES ON THE GROUND WILLING TO HELP LOOK ARE BEYOND APPRECIATED! Please let us know if you cover any canal,
diff --git a/src/conversions.rs b/src/conversions.rs
index ad3ce7b..dcbd013 100644
--- a/src/conversions.rs
+++ b/src/conversions.rs
@@ -87,6 +87,7 @@ impl_as!(u64, u64);
/// A trait to convert Rust types to `JSVal`s.
pub trait ToJSValConvertible {
/// Convert `self` to a `JSVal`. JSAPI failure causes a panic.
+ #[inline]
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue);
diff --git a/tests/wpt/harness/wptrunner/executors/pytestrunner/fixtures.py b/tests/wpt/harness/wptrunner/executors/pytestrunner/fixtures.py
index bfda02a..046ab14 100644
--- a/tests/wpt/harness/wptrunner/executors/pytestrunner/fixtures.py
+++ b/tests/wpt/harness/wptrunner/executors/pytestrunner/fixtures.py
@@ -4,6 +4,10 @@
import pytest
-import webdriver
[email protected]
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs
index a69ec5b..937271f 100644
--- a/components/script/dom/htmllinkelement.rs
+++ b/components/script/dom/htmllinkelement.rs
@@ -288,43 +288,46 @@ impl AsyncResponseListener for StylesheetContext {
}
fn response_complete(&mut self, status: Result<(), NetworkError>) {
+ let elem = self.elem.root();
+ let document = document_from_node(&*elem);
@jdm
jdm / gist:5da497f6da4ac3d12bf824675d2f458f
Last active May 12, 2016 03:07
referrer-policy test harness changes to avoid postMessage
diff --git a/tests/wpt/web-platform-tests/referrer-policy/generic/common.js b/tests/wpt/web-platform-tests/referrer-policy/generic/common.js
index 4920318..2005cb7 100644
--- a/tests/wpt/web-platform-tests/referrer-policy/generic/common.js
+++ b/tests/wpt/web-platform-tests/referrer-policy/generic/common.js
@@ -100,15 +100,28 @@ function wrapResult(url, server_data) {
}
function queryIframe(url, callback, referrer_policy) {
- var iframe = appendIframeToBody(url, referrer_policy);
- var listener = function(event) {