[PATCH 4/8] vbox: Introduce vboxUniformedPFN::ClearException()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The ClearException() method clears the latest exception inside of
VirtualBox. This needed because obtaining an exception via
GetException() does not clear it.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/vbox/vbox_tmpl.c          | 6 ++++++
 src/vbox/vbox_uniformed_api.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index ba7dc34a6b..a0c6a8f287 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -488,6 +488,11 @@ static HRESULT _pfnGetException(PCVBOXXPCOM pFuncs, IErrorInfo **ppException)
     return pFuncs->pfnGetException(ppException);
 }
 
+static HRESULT _pfnClearException(PCVBOXXPCOM pFuncs)
+{
+    return pFuncs->pfnClearException();
+}
+
 static void _vboxIIDInitialize(vboxIID *iid)
 {
     memset(iid, 0, sizeof(vboxIID));
@@ -2243,6 +2248,7 @@ static vboxUniformedPFN _UPFN = {
     .Utf16ToUtf8 = _pfnUtf16ToUtf8,
     .Utf8ToUtf16 = _pfnUtf8ToUtf16,
     .GetException = _pfnGetException,
+    .ClearException = _pfnClearException,
 };
 
 static vboxUniformedIID _UIID = {
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index 465a7877d9..2d61ed97fa 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -110,6 +110,7 @@ typedef struct {
     int (*Utf16ToUtf8)(PCVBOXXPCOM pFuncs, const PRUnichar *pwszString, char **ppszString);
     int (*Utf8ToUtf16)(PCVBOXXPCOM pFuncs, const char *pszString, PRUnichar **ppwszString);
     HRESULT (*GetException)(PCVBOXXPCOM pFuncs, nsIException **ppException);
+    HRESULT (*ClearException)(PCVBOXXPCOM pFuncs);
 } vboxUniformedPFN;
 
 /* Functions for vboxIID */
-- 
2.39.1




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux