Changeset 285191 in webkit
- Timestamp:
- Nov 2, 2021, 6:27:28 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/platform/mac-wk1/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Modules/webaudio/AudioBuffer.cpp (modified) (2 diffs)
-
Source/WebCore/Modules/webaudio/AudioBuffer.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r285169 r285191 1 2021-11-02 Robin Morisset <rmorisset@apple.com> 2 3 Regression (r284330): [ macOS wk1 Debug ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=232244 5 <rdar://problem/84616427> 6 7 Reviewed by Yusuke Suzuki. 8 9 * platform/mac-wk1/TestExpectations: 10 1 11 2021-11-02 Tyler Wilcock <tyler_w@apple.com> 2 12 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r285135 r285191 1386 1386 webkit.org/b/228796 [ Catalina Debug ] webaudio/silent-audio-interrupted-in-background.html [ Pass Timeout ] 1387 1387 1388 webkit.org/b/232244 [ Debug ] webaudio/AudioBuffer/huge-buffer.html [ Pass Timeout ]1389 1390 1388 webkit.org/b/227136 media/video-pause-immediately.html [ Pass Failure ] 1391 1389 -
trunk/Source/WebCore/ChangeLog
r285186 r285191 1 2021-11-02 Robin Morisset <rmorisset@apple.com> 2 3 Regression (r284330): [ macOS wk1 Debug ] webaudio/AudioBuffer/huge-buffer.html is a flaky timeout 4 https://bugs.webkit.org/show_bug.cgi?id=232244 5 <rdar://problem/84616427> 6 7 Reviewed by Yusuke Suzuki. 8 9 The test is verifying that trying to allocate an AudioBuffer with 4GB channels fails cleanly. 10 It used to work automatically, as AudioBuffer relies on Float32Array under the hood, which was limited to 2GB. 11 Since r284330, ArrayBuffers can be up to 4GB, so it now takes very long to OOM, and sometimes timeout. 12 I use the same solution which I used for PixelBuffers in r284330: just test that the length is reasonable 13 and if it is not then abort as if the allocation of the Float32Array had failed. 14 15 No new tests: covered by LayoutTests/webaudio/AudioBuffer/huge-buffer.html 16 17 * Modules/webaudio/AudioBuffer.cpp: 18 (WebCore::AudioBuffer::AudioBuffer): 19 * Modules/webaudio/AudioBuffer.h: 20 1 21 2021-11-02 Don Olmstead <don.olmstead@sony.com> 2 22 -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.cpp
r284330 r285191 87 87 , m_isDetachable(preventDetaching == LegacyPreventDetaching::No) 88 88 { 89 if (static_cast<uint64_t>(m_originalLength) > s_maxLength) { 90 invalidate(); 91 return; 92 } 93 89 94 m_channels.reserveCapacity(numberOfChannels); 90 95 … … 108 113 , m_originalLength(bus.length()) 109 114 { 115 if (static_cast<uint64_t>(m_originalLength) > s_maxLength) { 116 invalidate(); 117 return; 118 } 119 110 120 // Copy audio data from the bus to the Float32Arrays we manage. 111 121 unsigned numberOfChannels = bus.numberOfChannels(); -
trunk/Source/WebCore/Modules/webaudio/AudioBuffer.h
r283605 r285191 93 93 bool hasDetachedChannelBuffer() const; 94 94 95 // We do not currently support having the Float32Arrays in m_channels being more than 2GB, 96 // and we have tests that we return an error promptly on trying to create such a huge AudioBuffer. 97 static constexpr uint64_t s_maxLength = (1ull << 32) / sizeof(float); 98 95 99 float m_sampleRate; 96 100 mutable Lock m_channelsLock;
Note:
See TracChangeset
for help on using the changeset viewer.