From 7694e6e99cdc9dd9fd30b0371714963c54e0b614 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Sat, 15 Jan 2011 01:40:20 +0000 Subject: Fix for the ChromeFrame DownloadFromForm test failures on the IE9 builder. This test causes the latest IE9 developer preview version to crash. Reason being a change in the interface implementing the NavigateWithBindCtx2 method. BUG=none TEST=Covered by existing DownloadFromForm test. TBR=amit Review URL: http://codereview.chromium.org/6253003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71532 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome_frame/extra_system_apis.h | 10 ++++++++++ chrome_frame/utils.cc | 14 +++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) (limited to 'chrome_frame') diff --git a/chrome_frame/extra_system_apis.h b/chrome_frame/extra_system_apis.h index 6a53bd6..2573734 100644 --- a/chrome_frame/extra_system_apis.h +++ b/chrome_frame/extra_system_apis.h @@ -60,6 +60,16 @@ class IWebBrowserPriv2Common : public IUnknown { LPOLESTR url_fragment); }; +// The IWebBrowserPriv2Common interface flavor for IE9 preview 2 +// (9.0.8073.6003) +class IWebBrowserPriv2CommonIE9 : public IUnknown { + public: + STDMETHOD(NavigateWithBindCtx2)(IUri* uri, VARIANT* flags, + VARIANT* target_frame, VARIANT* post_data, + VARIANT* headers, IBindCtx* bind_ctx, + LPOLESTR url_fragment, DWORD unused1); +}; + // This interface is used to call FireBeforeNavigate with additional // information like url. Available on IE7 onwards. // diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index eb6abce..c23080c 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -847,9 +847,17 @@ HRESULT NavigateBrowserToMoniker(IUnknown* browser, IMoniker* moniker, uri_container->GetIUri(uri_obj.Receive()); DCHECK(uri_obj); - hr = browser_priv2->NavigateWithBindCtx2(uri_obj, NULL, NULL, NULL, - headers_var.AsInput(), bind_ctx, - const_cast(fragment)); + if (GetIEVersion() < IE_9) { + hr = browser_priv2->NavigateWithBindCtx2( + uri_obj, NULL, NULL, NULL, headers_var.AsInput(), bind_ctx, + const_cast(fragment)); + } else { + IWebBrowserPriv2CommonIE9* browser_priv2_ie9 = + reinterpret_cast(browser_priv2.get()); + hr = browser_priv2_ie9->NavigateWithBindCtx2( + uri_obj, NULL, NULL, NULL, headers_var.AsInput(), bind_ctx, + const_cast(fragment), 0); + } DLOG_IF(WARNING, FAILED(hr)) << base::StringPrintf(L"NavigateWithBindCtx2 0x%08X", hr); } -- cgit v1.1