summaryrefslogtreecommitdiffstats
path: root/chrome_frame/bind_status_callback_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/bind_status_callback_impl.cc')
-rw-r--r--chrome_frame/bind_status_callback_impl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome_frame/bind_status_callback_impl.cc b/chrome_frame/bind_status_callback_impl.cc
index 91a8424..3b7ff04 100644
--- a/chrome_frame/bind_status_callback_impl.cc
+++ b/chrome_frame/bind_status_callback_impl.cc
@@ -44,12 +44,19 @@ HRESULT BSCBImpl::AttachToBind(IBindCtx* bind_ctx) {
}
HRESULT BSCBImpl::ReleaseBind() {
+ // AddRef ourselves while we release these objects as we might
+ // perish during this operation.
+ AddRef();
+
HRESULT hr = S_OK;
if (bind_ctx_) {
hr = ::RevokeBindStatusCallback(bind_ctx_, this);
}
delegate_.Release();
bind_ctx_.Release();
+
+ Release();
+
return hr;
}