Title: [145631] trunk
- Revision
- 145631
- Author
- [email protected]
- Date
- 2013-03-12 17:25:45 -0700 (Tue, 12 Mar 2013)
Log Message
Fix Gamepad::axes and Gamepad::buttons to avoid calling std::copy(..., ..., 0)
https://bugs.webkit.org/show_bug.cgi?id=89510
Patch by James Robinson <[email protected]> on 2013-03-12
Reviewed by Kenneth Russell.
Source/WebCore:
WTF::Vector::begin() returns 0 when the vector has length zero. On windows, the debug implementation of
std::copy() is unhappy with 0 as a third parameter even when the first and second parameters are equal.
Covered by gamepad/gamepad-polling-access.html
* Modules/gamepad/Gamepad.cpp:
(WebCore::Gamepad::axes):
(WebCore::Gamepad::buttons):
LayoutTests:
Remove expectation now that test passes.
* platform/chromium/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (145630 => 145631)
--- trunk/LayoutTests/ChangeLog 2013-03-13 00:25:17 UTC (rev 145630)
+++ trunk/LayoutTests/ChangeLog 2013-03-13 00:25:45 UTC (rev 145631)
@@ -1,3 +1,14 @@
+2013-03-12 James Robinson <[email protected]>
+
+ Fix Gamepad::axes and Gamepad::buttons to avoid calling std::copy(..., ..., 0)
+ https://bugs.webkit.org/show_bug.cgi?id=89510
+
+ Reviewed by Kenneth Russell.
+
+ Remove expectation now that test passes.
+
+ * platform/chromium/TestExpectations:
+
2013-03-12 Filip Pizlo <[email protected]>
Array.prototype.sort should at least try to be PTIME even when the array is in some bizarre mode
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (145630 => 145631)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2013-03-13 00:25:17 UTC (rev 145630)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2013-03-13 00:25:45 UTC (rev 145631)
@@ -3572,9 +3572,6 @@
crbug.com/132898 http/tests/websocket/tests/hybi/workers/close.html [ Failure Pass ]
-# Timing out on some Windows bots
-webkit.org/b/89510 [ Win ] gamepad/gamepad-polling-access.html [ Pass Timeout ]
-
webkit.org/b/96839 compositing/geometry/fixed-position-transform-composited-page-scale.html [ ImageOnlyFailure ]
webkit.org/b/96839 platform/chromium/virtual/softwarecompositing/geometry/fixed-position-transform-composited-page-scale.html [ ImageOnlyFailure ]
webkit.org/b/96839 compositing/geometry/fixed-position-transform-composited-page-scale-down.html [ ImageOnlyFailure ]
Modified: trunk/Source/WebCore/ChangeLog (145630 => 145631)
--- trunk/Source/WebCore/ChangeLog 2013-03-13 00:25:17 UTC (rev 145630)
+++ trunk/Source/WebCore/ChangeLog 2013-03-13 00:25:45 UTC (rev 145631)
@@ -1,3 +1,19 @@
+2013-03-12 James Robinson <[email protected]>
+
+ Fix Gamepad::axes and Gamepad::buttons to avoid calling std::copy(..., ..., 0)
+ https://bugs.webkit.org/show_bug.cgi?id=89510
+
+ Reviewed by Kenneth Russell.
+
+ WTF::Vector::begin() returns 0 when the vector has length zero. On windows, the debug implementation of
+ std::copy() is unhappy with 0 as a third parameter even when the first and second parameters are equal.
+
+ Covered by gamepad/gamepad-polling-access.html
+
+ * Modules/gamepad/Gamepad.cpp:
+ (WebCore::Gamepad::axes):
+ (WebCore::Gamepad::buttons):
+
2013-03-12 Elliott Sprehn <[email protected]>
Remove TextIterator.cpp's isAllCollapsibleWhitespace
Modified: trunk/Source/WebCore/Modules/gamepad/Gamepad.cpp (145630 => 145631)
--- trunk/Source/WebCore/Modules/gamepad/Gamepad.cpp 2013-03-13 00:25:17 UTC (rev 145630)
+++ trunk/Source/WebCore/Modules/gamepad/Gamepad.cpp 2013-03-13 00:25:45 UTC (rev 145631)
@@ -41,13 +41,15 @@
void Gamepad::axes(unsigned count, float* data)
{
m_axes.resize(count);
- std::copy(data, data + count, m_axes.begin());
+ if (count)
+ std::copy(data, data + count, m_axes.begin());
}
void Gamepad::buttons(unsigned count, float* data)
{
m_buttons.resize(count);
- std::copy(data, data + count, m_buttons.begin());
+ if (count)
+ std::copy(data, data + count, m_buttons.begin());
}
Gamepad::~Gamepad()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes