Title: [142873] trunk/Source/WebCore
Revision
142873
Author
yu...@chromium.org
Date
2013-02-14 05:19:18 -0800 (Thu, 14 Feb 2013)

Log Message

Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
https://bugs.webkit.org/show_bug.cgi?id=109811

Reviewed by Pavel Feldman.

Use const char* constant value instead of creating String from it in thread-unsafe
static local variable.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (142872 => 142873)


--- trunk/Source/WebCore/ChangeLog	2013-02-14 13:08:26 UTC (rev 142872)
+++ trunk/Source/WebCore/ChangeLog	2013-02-14 13:19:18 UTC (rev 142873)
@@ -1,3 +1,16 @@
+2013-02-14  Yury Semikhatsky  <yu...@chromium.org>
+
+        Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
+        https://bugs.webkit.org/show_bug.cgi?id=109811
+
+        Reviewed by Pavel Feldman.
+
+        Use const char* constant value instead of creating String from it in thread-unsafe
+        static local variable.
+
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
+
 2013-02-14  Pan Deng  <pan.d...@intel.com>
 
         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.

Modified: trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp (142872 => 142873)


--- trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2013-02-14 13:08:26 UTC (rev 142872)
+++ trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp	2013-02-14 13:19:18 UTC (rev 142873)
@@ -499,13 +499,11 @@
 
 void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject> prpRecord, const String& type, const String& frameId)
 {
-    DEFINE_STATIC_LOCAL(String, program, (TimelineRecordType::Program));
-
     RefPtr<InspectorObject> record(prpRecord);
     record->setString("type", type);
     if (!frameId.isEmpty())
         record->setString("frameId", frameId);
-    if (type == program)
+    if (type == TimelineRecordType::Program)
         setNativeHeapStatistics(record.get());
     else
         setDOMCounters(record.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to