Bug #3811 - Extracted the script task handlers into methods
Merge branch 'bug3811' of https://github.com/shinglyu/servo into bug3811