Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp

Issue 2305023002: Fix NOTREACHED() in abortIfUpdating() when aborting 0-byte appendBuffer (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 { 475 {
476 // Section 3.2 abort() method step 4 substeps. 476 // Section 3.2 abort() method step 4 substeps.
477 // http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void 477 // http://w3c.github.io/media-source/#widl-SourceBuffer-abort-void
478 478
479 if (!m_updating) 479 if (!m_updating)
480 return; 480 return;
481 481
482 DCHECK_EQ(m_pendingRemoveStart, -1); 482 DCHECK_EQ(m_pendingRemoveStart, -1);
483 483
484 const char* traceEventName = 0; 484 const char* traceEventName = 0;
485 if (!m_pendingAppendData.isEmpty()) { 485 if (m_stream) {
wolenetz 2016/09/02 20:10:53 It's entirely possible for pendingAppendData to be
486 traceEventName = "SourceBuffer::appendBuffer";
487 } else if (m_stream) {
488 traceEventName = "SourceBuffer::appendStream"; 486 traceEventName = "SourceBuffer::appendStream";
489 } else { 487 } else {
490 NOTREACHED(); 488 traceEventName = "SourceBuffer::appendBuffer";
491 } 489 }
492 490
493 // 4.1. Abort the buffer append and stream append loop algorithms if they ar e running. 491 // 4.1. Abort the buffer append and stream append loop algorithms if they ar e running.
494 m_appendBufferAsyncPartRunner->stop(); 492 m_appendBufferAsyncPartRunner->stop();
495 m_pendingAppendData.clear(); 493 m_pendingAppendData.clear();
496 m_pendingAppendDataOffset = 0; 494 m_pendingAppendDataOffset = 0;
497 495
498 m_appendStreamAsyncPartRunner->stop(); 496 m_appendStreamAsyncPartRunner->stop();
499 clearAppendStreamState(); 497 clearAppendStreamState();
500 498
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 visitor->trace(m_removeAsyncPartRunner); 1258 visitor->trace(m_removeAsyncPartRunner);
1261 visitor->trace(m_appendStreamAsyncPartRunner); 1259 visitor->trace(m_appendStreamAsyncPartRunner);
1262 visitor->trace(m_stream); 1260 visitor->trace(m_stream);
1263 visitor->trace(m_audioTracks); 1261 visitor->trace(m_audioTracks);
1264 visitor->trace(m_videoTracks); 1262 visitor->trace(m_videoTracks);
1265 EventTargetWithInlineData::trace(visitor); 1263 EventTargetWithInlineData::trace(visitor);
1266 ActiveDOMObject::trace(visitor); 1264 ActiveDOMObject::trace(visitor);
1267 } 1265 }
1268 1266
1269 } // namespace blink 1267 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698