Changeset 147353 in webkit
- Timestamp:
- Apr 1, 2013 1:01:41 PM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r147350 r147353 1 2013-04-01 Benjamin Poulain <benjamin@webkit.org> 2 3 Remove a couple of malloc from ExceptionBase construction 4 https://bugs.webkit.org/show_bug.cgi?id=113681 5 6 Reviewed by Darin Adler. 7 8 * dom/ExceptionBase.cpp: 9 (WebCore::ExceptionBase::ExceptionBase): 10 When the condition is true, we were creating a new String for 11 description.name. The constructor had already allocated a string for 12 that: m_name. Use that string instead of creating a new one. 13 14 When the condition is false, we were creating a String for typeName 15 just to use the string operators. This is a waste of time, we can use 16 makeString() to invoke the string concatenation functions directly. 17 1 18 2013-04-01 Emil A Eklund <eae@chromium.org> 2 19 -
trunk/Source/WebCore/dom/ExceptionBase.cpp
r86542 r147353 41 41 { 42 42 if (description.name) 43 m_message = String(description.name)+ ": " + description.typeName + " Exception " + String::number(description.code);43 m_message = m_name + ": " + description.typeName + " Exception " + String::number(description.code); 44 44 else 45 m_message = String(description.typeName) + " Exception " + String::number(description.code);45 m_message = makeString(description.typeName, " Exception ", String::number(description.code)); 46 46 } 47 47
Note: See TracChangeset
for help on using the changeset viewer.