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

Unified Diff: chrome_frame/bho.cc

Issue 822005: Fix a crash reported in ChromeFrame on the crash server, which occurs because... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/bho.cc
===================================================================
--- chrome_frame/bho.cc (revision 41168)
+++ chrome_frame/bho.cc (working copy)
@@ -94,23 +94,28 @@
STDMETHODIMP Bho::BeforeNavigate2(IDispatch* dispatch, VARIANT* url,
VARIANT* flags, VARIANT* target_frame_name, VARIANT* post_data,
VARIANT* headers, VARIANT_BOOL* cancel) {
+ if (!url || url->vt != VT_BSTR || url->bstrVal == NULL) {
+ DLOG(WARNING) << "Invalid URL passed in";
+ return S_OK;
+ }
+
ScopedComPtr<IWebBrowser2> web_browser2;
if (dispatch)
web_browser2.QueryFrom(dispatch);
- if (!web_browser2 || url->vt != VT_BSTR) {
+ if (!web_browser2) {
NOTREACHED() << "Can't find WebBrowser2 with given dispatch";
- } else {
- DLOG(INFO) << "BeforeNavigate2: " << url->bstrVal;
- ScopedComPtr<IBrowserService> browser_service;
- DoQueryService(SID_SShellBrowser, web_browser2, browser_service.Receive());
- if (!browser_service || !CheckForCFNavigation(browser_service, false)) {
- referrer_.clear();
- }
- url_ = url->bstrVal;
- ProcessOptInUrls(web_browser2, url->bstrVal);
+ return S_OK;
}
+ DLOG(INFO) << "BeforeNavigate2: " << url->bstrVal;
+ ScopedComPtr<IBrowserService> browser_service;
+ DoQueryService(SID_SShellBrowser, web_browser2, browser_service.Receive());
+ if (!browser_service || !CheckForCFNavigation(browser_service, false)) {
+ referrer_.clear();
+ }
+ url_ = url->bstrVal;
+ ProcessOptInUrls(web_browser2, url->bstrVal);
return S_OK;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698