| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 { | 168 { |
| 169 std::wstring url; | 169 std::wstring url; |
| 170 if (m_webBrowser2) | 170 if (m_webBrowser2) |
| 171 { | 171 { |
| 172 CComBSTR bstrURL; | 172 CComBSTR bstrURL; |
| 173 if (SUCCEEDED(m_webBrowser2->get_LocationURL(&bstrURL))) | 173 if (SUCCEEDED(m_webBrowser2->get_LocationURL(&bstrURL))) |
| 174 { | 174 { |
| 175 url = ToWstring(bstrURL); | 175 url = ToWstring(bstrURL); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 else | |
| 179 { | |
| 180 DEBUG_GENERAL(L"CPluginClass::GetBrowserUrl - Reached with m_webBrowser2 == nullptr (probable invariant violation)"); | |
| 181 } | |
| 178 if (url.empty()) | 182 if (url.empty()) |
| 179 { | 183 { |
| 180 DEBUG_ERROR_LOG(0, 0, 0, "CPluginClass::GetBrowserUrl - Reached with m_webBr owser2 == nullptr"); | |
|
sergei
2016/01/11 15:39:07
The comment is slightly inconsistent now with the
Eric
2016/01/11 15:59:33
Yeah. I'll fix that. That's an invariant violation
| |
| 181 url = m_tab->GetDocumentUrl(); | 184 url = m_tab->GetDocumentUrl(); |
| 182 } | 185 } |
| 183 return url; | 186 return url; |
| 184 } | 187 } |
| 185 | 188 |
| 186 DWORD WINAPI CPluginClass::StartInitObject(LPVOID thisPtr) | 189 DWORD WINAPI CPluginClass::StartInitObject(LPVOID thisPtr) |
| 187 { | 190 { |
| 188 if (thisPtr == NULL) | 191 if (thisPtr == NULL) |
| 189 return 0; | 192 return 0; |
| 190 if (!((CPluginClass*)thisPtr)->InitObject()) | 193 if (!((CPluginClass*)thisPtr)->InitObject()) |
| (...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1696 s_criticalSectionLocal.Unlock(); | 1699 s_criticalSectionLocal.Unlock(); |
| 1697 | 1700 |
| 1698 return icon; | 1701 return icon; |
| 1699 } | 1702 } |
| 1700 | 1703 |
| 1701 ATOM CPluginClass::GetAtomPaneClass() | 1704 ATOM CPluginClass::GetAtomPaneClass() |
| 1702 { | 1705 { |
| 1703 return s_atomPaneClass; | 1706 return s_atomPaneClass; |
| 1704 } | 1707 } |
| 1705 | 1708 |
| LEFT | RIGHT |