summaryrefslogtreecommitdiffstats
path: root/chrome_frame/bho.cc
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 21:27:01 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-25 21:27:01 +0000
commitd351c9065715a3a989c8ecc322306d457e843780 (patch)
treef17948d75894427bea3f57cd085347744769489e /chrome_frame/bho.cc
parent59d8f41cc49a65846edd1ba0714061f2500ad303 (diff)
downloadchromium_src-d351c9065715a3a989c8ecc322306d457e843780.zip
chromium_src-d351c9065715a3a989c8ecc322306d457e843780.tar.gz
chromium_src-d351c9065715a3a989c8ecc322306d457e843780.tar.bz2
Avoid a DCHECK. Check if the interface is already patched before patching.
TEST=This avoids a DCHECK that could happen when viewing the source of an html page. BUG=none TBR=robertshield Review URL: http://codereview.chromium.org/553073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/bho.cc')
-rw-r--r--chrome_frame/bho.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome_frame/bho.cc b/chrome_frame/bho.cc
index 8e6704e..96ac78c 100644
--- a/chrome_frame/bho.cc
+++ b/chrome_frame/bho.cc
@@ -370,8 +370,10 @@ bool PatchHelper::InitializeAndPatchProtocolsIfNeeded() {
void PatchHelper::PatchBrowserService(IBrowserService* browser_service) {
DCHECK(state_ == PATCH_IBROWSER);
- vtable_patch::PatchInterfaceMethods(browser_service,
- IBrowserService_PatchInfo);
+ if (!IS_PATCHED(IBrowserService)) {
+ vtable_patch::PatchInterfaceMethods(browser_service,
+ IBrowserService_PatchInfo);
+ }
}
void PatchHelper::UnpatchIfNeeded() {