Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: chrome_frame/urlmon_moniker.cc

Issue 21948002: Add missing DCHECK to validate HR. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix error testing Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome_frame/urlmon_bind_status_callback.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome_frame/urlmon_bind_status_callback.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698