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

Unified Diff: chrome_frame/vtable_patch_manager.h

Issue 992008: Reimplementation of FunctionStub, to avoid rewriting potentially executing co... (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 | « chrome_frame/test/function_stub_unittest.cc ('k') | chrome_frame/vtable_patch_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/vtable_patch_manager.h
===================================================================
--- chrome_frame/vtable_patch_manager.h (revision 42235)
+++ chrome_frame/vtable_patch_manager.h (working copy)
@@ -12,9 +12,20 @@
#include "base/lock.h"
struct FunctionStub;
+
// This namespace provides methods to patch VTable methods of COM interfaces.
namespace vtable_patch {
+// Internal implementation, exposed only for testing.
+namespace internal {
+
+// Replaces *entry with new_proc iff *entry is curr_proc.
+// Returns true iff *entry was rewritten.
+// Note: does not crash on access violation.
+bool ReplaceFunctionPointer(void** entry, void* new_proc, void* curr_proc);
+
+} // namespace internal
+
// This structure represents information about one VTable method.
// We allocate an array of these structures per VTable that we patch to
// remember the original method. We also use this structure to actually
« no previous file with comments | « chrome_frame/test/function_stub_unittest.cc ('k') | chrome_frame/vtable_patch_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698