Changeset 280988 in webkit
- Timestamp:
- Aug 12, 2021, 3:27:09 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
page/Performance.cpp (modified) (4 diffs)
-
page/Performance.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r280977 r280988 1 2021-08-12 Alex Christensen <achristensen@webkit.org> 2 3 Unreviewed, reverting r280977. 4 5 Seems to have broken a test in debug 6 7 Reverted changeset: 8 9 "Migrate Performance::resourceTimingBufferFullTimerFired to 10 HTML event loop" 11 https://bugs.webkit.org/show_bug.cgi?id=229044 12 https://commits.webkit.org/r280977 13 1 14 2021-08-12 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/Source/WebCore/page/Performance.cpp
r280977 r280988 61 61 Performance::Performance(ScriptExecutionContext* context, MonotonicTime timeOrigin) 62 62 : ContextDestructionObserver(context) 63 , m_resourceTimingBufferFullTimer(*this, &Performance::resourceTimingBufferFullTimerFired) // FIXME: Migrate this to the event loop as well. https://bugs.webkit.org/show_bug.cgi?id=229044 63 64 , m_timeOrigin(timeOrigin) 64 65 { … … 67 68 68 69 Performance::~Performance() = default; 70 71 void Performance::contextDestroyed() 72 { 73 m_resourceTimingBufferFullTimer.stop(); 74 ContextDestructionObserver::contextDestroyed(); 75 } 69 76 70 77 DOMHighResTimeStamp Performance::now() const … … 257 264 258 265 if (isResourceTimingBufferFull()) { 266 ASSERT(!m_resourceTimingBufferFullTimer.isActive()); 259 267 m_backupResourceTimingBuffer.append(WTFMove(entry)); 260 268 m_waitingForBackupBufferToBeProcessed = true; 261 auto* context = scriptExecutionContext(); 262 if (!context) 263 return; 264 context->eventLoop().queueTask(TaskSource::PerformanceTimeline, [protectedThis = makeRef(*this)] { 265 protectedThis->dispatchResourceTimingBufferFullEvent(); 266 }); 269 m_resourceTimingBufferFullTimer.startOneShot(0_s); 267 270 return; 268 271 } … … 277 280 } 278 281 279 void Performance::dispatchResourceTimingBufferFullEvent() 280 { 281 if (!scriptExecutionContext()) 282 return; 282 void Performance::resourceTimingBufferFullTimerFired() 283 { 284 ASSERT(scriptExecutionContext()); 283 285 284 286 while (!m_backupResourceTimingBuffer.isEmpty()) { -
trunk/Source/WebCore/page/Performance.h
r280977 r280988 120 120 Performance(ScriptExecutionContext*, MonotonicTime timeOrigin); 121 121 122 void contextDestroyed() override; 123 122 124 EventTargetInterface eventTargetInterface() const final { return PerformanceEventTargetInterfaceType; } 123 125 … … 126 128 127 129 bool isResourceTimingBufferFull() const; 128 void dispatchResourceTimingBufferFullEvent();130 void resourceTimingBufferFullTimerFired(); 129 131 130 132 void queueEntry(PerformanceEntry&); … … 138 140 unsigned m_resourceTimingBufferSize { 150 }; 139 141 142 Timer m_resourceTimingBufferFullTimer; 140 143 Vector<RefPtr<PerformanceEntry>> m_backupResourceTimingBuffer; 141 144
Note:
See TracChangeset
for help on using the changeset viewer.