Initialize the Event Names' string from read only memory
authorbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 15:22:29 +0000 (15:22 +0000)
committerbenjamin@webkit.org <benjamin@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Aug 2012 15:22:29 +0000 (15:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92435

Patch by Benjamin Poulain <bpoulain@apple.com> on 2012-08-03
Reviewed by Anders Carlsson.

Similarily to r123689, we can initialize the event names' string from memory without copying the data.
This saves us memory and initialization time.

* dom/EventNames.cpp:
(WebCore):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@124616 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/dom/EventNames.cpp

index bc6f783..345d896 100644 (file)
@@ -1,3 +1,16 @@
+2012-08-03  Benjamin Poulain  <bpoulain@apple.com>
+
+        Initialize the Event Names' string from read only memory
+        https://bugs.webkit.org/show_bug.cgi?id=92435
+
+        Reviewed by Anders Carlsson.
+
+        Similarily to r123689, we can initialize the event names' string from memory without copying the data.
+        This saves us memory and initialization time.
+
+        * dom/EventNames.cpp:
+        (WebCore):
+
 2012-08-03  Philippe Normand  <pnormand@igalia.com>
 
         [GTK][jhbuild] Switch to GStreamer 0.11 build
index 08646f7..6df1290 100644 (file)
 namespace WebCore {
 
 #define INITIALIZE_EVENT_NAME(name) \
-    , name##Event(#name)
+    , name##Event(#name, AtomicString::ConstructFromLiteral)
 
 #define INITIALIZE_EVENT_INTERFACE(name) \
-    , interfaceFor##name(#name)
+    , interfaceFor##name(#name, AtomicString::ConstructFromLiteral)
 
 EventNames::EventNames()
     : dummy(0)