Index: Source/WebCore/html/HTMLMediaElement.cpp |
=================================================================== |
--- Source/WebCore/html/HTMLMediaElement.cpp (revision 112456) |
+++ Source/WebCore/html/HTMLMediaElement.cpp (working copy) |
@@ -714,6 +714,11 @@ |
void HTMLMediaElement::loadInternal() |
{ |
+ // Some of the code paths below this function dispatch the BeforeLoad event. This ASSERT helps |
+ // us catch those bugs more quickly without needing all the branches to align to actually |
+ // trigger the event. |
+ ASSERT(!eventDispatchForbidden()); |
+ |
// If we can't start a load right away, start it later. |
Page* page = document()->page(); |
if (pageConsentRequiredForLoad() && page && !page->canStartMedia()) { |