OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome_frame/urlmon_moniker.h" | 5 #include "chrome_frame/urlmon_moniker.h" |
6 | 6 |
7 #include <exdisp.h> | 7 #include <exdisp.h> |
8 #include <shlguid.h> | 8 #include <shlguid.h> |
9 | 9 |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 DCHECK(to_left == NULL); | 236 DCHECK(to_left == NULL); |
237 | 237 |
238 // Report a crash if the crash is in our own module. | 238 // Report a crash if the crash is in our own module. |
239 ExceptionBarrierReportOnlyModule barrier; | 239 ExceptionBarrierReportOnlyModule barrier; |
240 | 240 |
241 HRESULT hr = S_OK; | 241 HRESULT hr = S_OK; |
242 scoped_refptr<BSCBStorageBind> auto_release_callback; | 242 scoped_refptr<BSCBStorageBind> auto_release_callback; |
243 CComObject<BSCBStorageBind>* callback = NULL; | 243 CComObject<BSCBStorageBind>* callback = NULL; |
244 if (ShouldWrapCallback(me, iid, bind_ctx)) { | 244 if (ShouldWrapCallback(me, iid, bind_ctx)) { |
245 hr = CComObject<BSCBStorageBind>::CreateInstance(&callback); | 245 hr = CComObject<BSCBStorageBind>::CreateInstance(&callback); |
| 246 DCHECK(SUCCEEDED(hr)); |
246 auto_release_callback = callback; | 247 auto_release_callback = callback; |
247 DCHECK_EQ(callback->m_dwRef, 1); | 248 DCHECK_EQ(callback->m_dwRef, 1); |
248 hr = callback->Initialize(me, bind_ctx); | 249 hr = callback->Initialize(me, bind_ctx); |
249 DCHECK(SUCCEEDED(hr)); | 250 DCHECK(SUCCEEDED(hr)); |
250 } | 251 } |
251 | 252 |
252 hr = original(me, bind_ctx, to_left, iid, obj); | 253 hr = original(me, bind_ctx, to_left, iid, obj); |
253 | 254 |
254 // If the binding terminates before the data could be played back | 255 // If the binding terminates before the data could be played back |
255 // now is the chance. Sometimes OnStopBinding happens after this returns | 256 // now is the chance. Sometimes OnStopBinding happens after this returns |
256 // and then it's too late. | 257 // and then it's too late. |
257 if ((S_OK == hr) && callback) | 258 if ((S_OK == hr) && callback) |
258 callback->MayPlayBack(BSCF_LASTDATANOTIFICATION); | 259 callback->MayPlayBack(BSCF_LASTDATANOTIFICATION); |
259 | 260 |
260 return hr; | 261 return hr; |
261 } | 262 } |
262 | 263 |
OLD | NEW |