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

script: A couple mutation observer fixes. #21236

Merged
merged 3 commits into from Jul 23, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

script: Avoid useless string clones in mutation observer stuff.

  • Loading branch information
emilio committed Jul 23, 2018
commit 073629076f9268f8c8a4aa1e1ad1ca656ba18e89
@@ -184,7 +184,7 @@ impl MutationObserver {
}

// Step 4
for &(ref observer, ref paired_string) in &interested_observers {
for (observer, paired_string) in interested_observers {
// Steps 4.1-4.7
let record = match attr_type {
Mutation::Attribute { ref name, ref namespace, .. } => {
@@ -193,10 +193,10 @@ impl MutationObserver {
} else {
None
};
MutationRecord::attribute_mutated(target, name, namespace, paired_string.clone())
MutationRecord::attribute_mutated(target, name, namespace, paired_string)
},
Mutation::CharacterData { .. } => {
MutationRecord::character_data_mutated(target, paired_string.clone())
MutationRecord::character_data_mutated(target, paired_string)
}
Mutation::ChildList { ref added, ref removed, ref next, ref prev } => {
MutationRecord::child_list_mutated(target, *added, *removed, *next, *prev)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.