servo/components/script
bors-servo b32128e299 Auto merge of #8768 - vegayours:8616_intermittent_option_unwrap_in_timers, r=jdm
fix intermittent Option::unwrap in timers

fixes intermittent #8616

This intermittent indicates real problem in code.
Lets consider such code:
```javascript
// timer 1
setTimeout(function() {
     //timer 2
     setTimeout(function() {}, 0);
}, 0);
```
When we receive event to fire timer 1 it will be selected and extracted from active timers list in fire_timer function. During timer 1 handler execution we will schedule timer 2 and request timer event for it. But it will be executed during same fire_timer call because of 0 timeout. And as a result we will have empty timers list and expecting event for timer 2 that will crash in assert.

I'm not sure that all I've written is clear, but we have something like this:
```
install timer 1 -> [1] in timers list
push and expect timer event 1 -> expected_event=1
received timer event 1
    fire_timer()
         select timer 1 to execute -> [] in timers list
         execute timer 1 handler
             install timer 2 -> [2] in timers list
             push and expect timer event 2 -> expected_event=2
         select timer 2 to execute (because of 0 timeout) -> [] in tiemrs list
         execute timer 2 handler
expected_event=2 is dangling
received timer event 2
    fire_timer() -> BOOM
```

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8768)
<!-- Reviewable:end -->
2015-12-04 21:19:58 +05:30
..
docs Move the DOM memory management blog post into the tree. 2015-10-29 17:25:00 +01:00
dom Auto merge of #8805 - Ms2ger:drain_modified_elements, r=jdm 2015-12-04 20:22:54 +05:30
parse Add XMLDocument object 2015-11-27 14:55:41 +01:00
build.rs
Cargo.toml Auto merge of #8787 - Jayflux:hotfix/8695, r=mbrubeck 2015-12-03 16:10:24 +05:30
clipboard_provider.rs Auto merge of #8530 - KiChjang:split-constellation-msg, r=jdm 2015-11-19 04:39:20 +05:30
cors.rs Rustfmt some of script. 2015-11-18 11:14:05 +01:00
devtools.rs Rustfmt some of script. 2015-11-18 11:14:05 +01:00
document_loader.rs Rustfmt some of script. 2015-11-18 11:14:05 +01:00
layout_interface.rs compositing: Split Servo up into multiple sandboxed processes. 2015-11-19 16:38:04 -05:00
lib.rs now using external ref_slice instead of the std version 2015-12-03 07:32:07 +00:00
makefile.cargo Fix spurious rebuilds of the script crate 2015-10-08 21:37:56 -07:00
mem.rs more refactoring 2015-10-30 20:26:29 +09:00
network_listener.rs Make AsyncResponseListener methods take &mut self. 2015-10-15 16:44:39 -07:00
page.rs Auto merge of #8481 - frewsxcv:iterablepage-iter, r=Ms2ger 2015-11-12 18:29:12 +05:30
reporter.rs Defined new trait ParseErrorReporter and added error_reporter member to ParserContext 2015-11-25 18:28:30 -05:00
script_task.rs Minor refactoring of mouse event types 2015-12-03 08:19:40 -08:00
textinput.rs Adds support for input element's maxlength attr 2015-12-03 14:00:51 +11:00
timers.rs fix intermittent Option::unwrap in timers 2015-12-04 20:16:43 +05:00
unpremultiplytable.rs add un-premultiply table for GetImageData 2015-10-20 04:51:29 -04:00
webdriver_handlers.rs Removed duplicate webdriver_traits file and added webdriver handler for GetWindowSize, IsSelected and IsEnabled 2015-11-29 15:48:23 -05:00