Index: Source/core/html/PluginDocument.h |
diff --git a/Source/core/html/PluginDocument.h b/Source/core/html/PluginDocument.h |
index 458dfc1039cf05e4fce7f61fc9203bf69dd03689..9764a9dbedfdd5eb0492732840001ec56ed370a3 100644 |
--- a/Source/core/html/PluginDocument.h |
+++ b/Source/core/html/PluginDocument.h |
@@ -73,6 +73,12 @@ inline const PluginDocument* toPluginDocument(const Document* document) |
return static_cast<const PluginDocument*>(document); |
} |
+inline PluginDocument& toPluginDocument(Document& document) |
+{ |
+ ASSERT_WITH_SECURITY_IMPLICATION(document.isPluginDocument()); |
+ return static_cast<PluginDocument&>(document); |
+} |
+ |
// This will catch anyone doing an unnecessary cast. |
void toPluginDocument(const PluginDocument*); |