Fix a fatal error due to cloning a global document object
[pdfium.git] / fpdfsdk / src / javascript / Document.cpp
index b1a2ad7..f823d80 100644 (file)
@@ -1947,3 +1947,9 @@ void Document::DoAnnotDelay()
                m_DelayData.RemoveAt(DelArray[j]);
        }
 }
+
+CJS_Document* Document::GetCJSDoc() const 
+{
+       return static_cast<CJS_Document*>(m_pJSObject);
+}
+