Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginWbPassThrough.cpp

Issue 5113230347206656: Issue #1356 - Improve detection of the issuer of the request (Closed)
Patch Set: Fix the deadlock Created Oct. 7, 2014, 11:22 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginClass.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginWbPassThrough.cpp
===================================================================
--- a/src/plugin/PluginWbPassThrough.cpp
+++ b/src/plugin/PluginWbPassThrough.cpp
@@ -152,7 +152,15 @@
LPOLESTR domainRetrieved = 0;
if (resLen == 0 || wcscmp(bindToObject, L"FALSE") == 0)
{
- HRESULT hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1, &resLen);
+ HRESULT hr = S_OK;
+ if (CPluginClient::GetInstance()->GetIEVersion() > 8)
+ {
+ hr = pOIBindInfo->GetBindString(BINDSTRING_ROOTDOC_URL, &domainRetrieved, 1, &resLen);
+ }
+ else
+ {
+ hr = pOIBindInfo->GetBindString(BINDSTRING_XDR_ORIGIN, &domainRetrieved, 1, &resLen);
+ }
if ((hr == S_OK) && domainRetrieved && (resLen > 0))
{
@@ -207,10 +215,25 @@
}
}
-
+ // Request from unknown thread, so we don't know the tab
if (tab == NULL)
{
contentType = GetContentType(mimeType, boundDomain, src);
+
+ if (CPluginClient::GetInstance()->GetIEVersion() > 8)
+ {
+ // Find tab based on document URL
+ tab = CPluginClass::GetTab(boundDomain.GetString());
+ if ((tab != 0) && (tab->IsFrameCached(src)))
Eric 2014/10/08 17:37:54 Prefer nullptr to 0, but the idiom we're using (as
+ {
+ contentType = CFilter::contentTypeSubdocument;
sergei 2014/10/09 13:46:22 I would leave the comment somewhere - that it's on
+ // add frame to a referrer chain
+ if (client->ShouldBlock(boundDomain, contentType, tab->GetDocumentUrl(), true))
sergei 2014/10/09 13:46:22 Instead of `boundDomain` there should be `src`
+ {
+ isBlocked = true;
+ }
+ }
+ }
if (client->ShouldBlock(src, contentType, boundDomain, true))
{
isBlocked = true;
« src/plugin/PluginClass.cpp ('K') | « src/plugin/PluginClass.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld