Fix document.write check for activity.

This commit is contained in:
Alan Jeffrey 2017-01-11 12:57:08 -06:00
parent a43c842099
commit ca9cee084e
6 changed files with 48 additions and 2 deletions

View file

@ -3271,8 +3271,7 @@ impl DocumentMethods for Document {
// Step 2.
// TODO: handle throw-on-dynamic-markup-insertion counter.
// FIXME: this should check for being active rather than fully active
if !self.is_fully_active() {
if !self.is_active() {
// Step 3.
return Ok(());
}

View file

@ -1304,6 +1304,7 @@ impl ScriptThread {
/// Handles activity change message
fn handle_set_document_activity_msg(&self, id: PipelineId, activity: DocumentActivity) {
debug!("Setting activity of {} to be {:?}.", id, activity);
let document = self.documents.borrow().find_document(id);
if let Some(document) = document {
document.set_activity(activity);