diff options
author | Corey Farwell <coreyf@rwell.org> | 2015-12-10 22:06:05 -0500 |
---|---|---|
committer | Corey Farwell <coreyf@rwell.org> | 2015-12-10 23:47:25 -0500 |
commit | 4accaf50b21a6344e9ee7518f7ab07c1dde7c36c (patch) | |
tree | 36d486ba0e57440a7a69e14829814e7ad5006712 /components/script/dom/webglrenderingcontext.rs | |
parent | 996c0a60b81e7d7e0fbfea81a546771ea9327df6 (diff) | |
download | servo-4accaf50b21a6344e9ee7518f7ab07c1dde7c36c.tar.gz servo-4accaf50b21a6344e9ee7518f7ab07c1dde7c36c.zip |
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.
Diffstat (limited to 'components/script/dom/webglrenderingcontext.rs')
-rw-r--r-- | components/script/dom/webglrenderingcontext.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/webglrenderingcontext.rs b/components/script/dom/webglrenderingcontext.rs index e9a8b922a48..0efce2afce5 100644 --- a/components/script/dom/webglrenderingcontext.rs +++ b/components/script/dom/webglrenderingcontext.rs @@ -119,7 +119,7 @@ impl WebGLRenderingContext { Err(msg) => { error!("Couldn't create WebGLRenderingContext: {}", msg); let event = WebGLContextEvent::new(global, - DOMString::from("webglcontextcreationerror"), + atom!("webglcontextcreationerror"), EventBubbles::DoesNotBubble, EventCancelable::Cancelable, DOMString::from(msg)); |