Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile raw inline event handlers lazily. Resolves #8489. #8491

Merged
merged 1 commit into from Feb 11, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Compile raw inline event handlers lazily. Resolves #8489.

  • Loading branch information
jdm authored and Ms2ger committed Feb 11, 2016
commit 2796a4dfa82c47109d4081ed80965286b7a78b73
@@ -255,6 +255,15 @@ impl<A: JSTraceable, B: JSTraceable> JSTraceable for (A, B) {
}
}

impl<A: JSTraceable, B: JSTraceable, C: JSTraceable> JSTraceable for (A, B, C) {
#[inline]
fn trace(&self, trc: *mut JSTracer) {
let (ref a, ref b, ref c) = *self;
a.trace(trc);
b.trace(trc);
c.trace(trc);
}
}

no_jsmanaged_fields!(bool, f32, f64, String, Url, AtomicBool, Uuid);
no_jsmanaged_fields!(usize, u8, u16, u32, u64);
@@ -11,7 +11,7 @@ use dom::bindings::js::{JS, Root, RootedReference};
use dom::bindings::reflector::Reflectable;
use dom::bindings::trace::RootedVec;
use dom::event::{Event, EventPhase};
use dom::eventtarget::{EventListenerType, EventTarget, ListenerPhase};
use dom::eventtarget::{CompiledEventListener, EventTarget, ListenerPhase};
use dom::node::Node;
use dom::virtualmethods::vtable_for;
use dom::window::Window;
@@ -36,7 +36,7 @@ impl Drop for AutoDOMEventMarker {
}
}

fn handle_event(window: Option<&Window>, listener: &EventListenerType,
fn handle_event(window: Option<&Window>, listener: &CompiledEventListener,
current_target: &EventTarget, event: &Event) {
let _marker;
if let Some(window) = window {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.