Paul Gofman : mscoree: Add FixupVTable_Assembly function which takes preloaded assembly headers.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 4 10:46:12 CST 2016


Module: wine
Branch: master
Commit: 5dea748c5b733ac6f8c6e2be609bf9838a86e5b7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5dea748c5b733ac6f8c6e2be609bf9838a86e5b7

Author: Paul Gofman <gofmanp at gmail.com>
Date:   Sat Jan 30 04:36:48 2016 +0300

mscoree: Add FixupVTable_Assembly function which takes preloaded assembly headers.

Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mscoree/corruntimehost.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index c790c44..7998da9 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -1135,23 +1135,28 @@ static void FixupVTableEntry(HMODULE hmodule, VTableFixup *vtable_fixup)
     list_add_tail(&dll_fixups, &fixup->entry);
 }
 
+static void FixupVTable_Assembly(HMODULE hmodule, ASSEMBLY *assembly)
+{
+    VTableFixup *vtable_fixups;
+    ULONG vtable_fixup_count, i;
+
+    assembly_get_vtable_fixups(assembly, &vtable_fixups, &vtable_fixup_count);
+    if (CAN_FIXUP_VTABLE)
+        for (i=0; i<vtable_fixup_count; i++)
+            FixupVTableEntry(hmodule, &vtable_fixups[i]);
+    else if (vtable_fixup_count)
+        FIXME("cannot fixup vtable; expect a crash\n");
+}
+
 static void FixupVTable(HMODULE hmodule)
 {
     ASSEMBLY *assembly;
     HRESULT hr;
-    VTableFixup *vtable_fixups;
-    ULONG vtable_fixup_count, i;
 
     hr = assembly_from_hmodule(&assembly, hmodule);
     if (SUCCEEDED(hr))
     {
-        hr = assembly_get_vtable_fixups(assembly, &vtable_fixups, &vtable_fixup_count);
-        if (CAN_FIXUP_VTABLE)
-            for (i=0; i<vtable_fixup_count; i++)
-                FixupVTableEntry(hmodule, &vtable_fixups[i]);
-        else if (vtable_fixup_count)
-            FIXME("cannot fixup vtable; expect a crash\n");
-
+        FixupVTable_Assembly(hmodule, assembly);
         assembly_release(assembly);
     }
     else




More information about the wine-cvs mailing list