Closed Bug 327450 Opened 18 years ago Closed 15 years ago

Redundant LoadLibrary in XPCOM

Categories

(Core :: XPCOM, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 467779

People

(Reporter: emk, Assigned: emk)

Details

Attachments

(1 file)

Kernel32.dll is always mapped on Win32 process.
Therefore it's meaningless to use LoadLibrary/GetProcAddress/FreeLibrary pair for kernel32.
We can reduce it to GetModuleHandle/GetProcAddress.
Attached patch Patch rv1.0Splinter Review
Assignee: dougt → VYV03354
Status: NEW → ASSIGNED
Attachment #212106 - Flags: review?(dougt)
Attachment #212106 - Flags: review?(doug.turner) → review-
Comment on attachment 212106 [details] [diff] [review]
Patch rv1.0

we use both approaches across the code base.  Not sure which is faster, but having data on this would be helpful before any change is made.

Does it really make any difference?  I would imagine LoadLibrary special casing Kernel32 on win32 platforms.
Why is the InDebugger function necessary, AFAIK IsDebuggerPresent is available on all supported Windows versions?
Because this bug was older than bug 330276.
Now, however, we can just drop the whole explicit loading stuff.
And it was already removed by bug 467779.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: