mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Pass around event types as Atoms instead of Strings
`Event` internally stores the `type` as an `Atom`, and we're `String`s everywhere, which can cause unnecessary allocations to occur since they'll end up as `Atom`s anyways.
This commit is contained in:
parent
996c0a60b8
commit
4accaf50b2
25 changed files with 156 additions and 135 deletions
|
@ -189,7 +189,7 @@ impl MainThreadRunnable for StorageEventRunnable {
|
|||
|
||||
let storage_event = StorageEvent::new(
|
||||
global_ref,
|
||||
DOMString::from("storage"),
|
||||
atom!("storage"),
|
||||
EventBubbles::DoesNotBubble, EventCancelable::NotCancelable,
|
||||
this.key.map(DOMString::from), this.old_value.map(DOMString::from), this.new_value.map(DOMString::from),
|
||||
DOMString::from(ev_url.to_string()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue