Title: [104163] trunk/Source/WebCore
- Revision
- 104163
- Author
- [email protected]
- Date
- 2012-01-05 07:47:01 -0800 (Thu, 05 Jan 2012)
Log Message
[EFL] Replace alloca to C++ new placement.
https://bugs.webkit.org/show_bug.cgi?id=72017
Patch by Grzegorz Czajkowski <[email protected]> on 2012-01-05
Reviewed by Andreas Kling.
Replaces alloca to C++ new placement as it is not very portable.
It allows to skip checking of memory allocation as new never returns NULL.
According to Edje's documentation type of val (member of Edje_Message_Float_Set)
is double so I changed it to avoid undefined behaviour.
* platform/efl/ScrollbarEfl.cpp:
(ScrollbarEfl::updateThumbPositionAndProportion):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (104162 => 104163)
--- trunk/Source/WebCore/ChangeLog 2012-01-05 15:37:04 UTC (rev 104162)
+++ trunk/Source/WebCore/ChangeLog 2012-01-05 15:47:01 UTC (rev 104163)
@@ -1,3 +1,18 @@
+2012-01-05 Grzegorz Czajkowski <[email protected]>
+
+ [EFL] Replace alloca to C++ new placement.
+ https://bugs.webkit.org/show_bug.cgi?id=72017
+
+ Reviewed by Andreas Kling.
+
+ Replaces alloca to C++ new placement as it is not very portable.
+ It allows to skip checking of memory allocation as new never returns NULL.
+ According to Edje's documentation type of val (member of Edje_Message_Float_Set)
+ is double so I changed it to avoid undefined behaviour.
+
+ * platform/efl/ScrollbarEfl.cpp:
+ (ScrollbarEfl::updateThumbPositionAndProportion):
+
2012-01-05 Benjamin Poulain <[email protected]>
Remove duplicate file references from WebCore.xcodeproj
Modified: trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp (104162 => 104163)
--- trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp 2012-01-05 15:37:04 UTC (rev 104162)
+++ trunk/Source/WebCore/platform/efl/ScrollbarEfl.cpp 2012-01-05 15:47:01 UTC (rev 104163)
@@ -160,8 +160,8 @@
m_lastTotalSize = tSize;
m_lastVisibleSize = vSize;
- Edje_Message_Float_Set* message = static_cast<Edje_Message_Float_Set*>
- (alloca(sizeof(Edje_Message_Float_Set) + sizeof(float)));
+ char buffer[sizeof(Edje_Message_Float_Set) + sizeof(double)];
+ Edje_Message_Float_Set* message = reinterpret_cast<Edje_Message_Float_Set*>(buffer);
message->count = 2;
if (tSize - vSize > 0)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes