Closed Bug 475934 Opened 15 years ago Closed 15 years ago

Remove unused functions from xpinstall

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(1 file)

Attached patch patch rev 1Splinter Review
After doing some code coverage analysis from testcases I've been writing for xpinstall I've found two functions that never seem to be called and I believe can be removed.

The removal of IsRelativeURL is fairly obvious, it is never called from anywhere.

CreateNativeObject is used to create an nsInstallTrigger for the JSObject in a particular JS context. It used to be used for install.js contexts, a JSObject would be created and added to it and the nsInstallTrigger lazily created when necessary. For DOM JS scopes the nsInstallTrigger is created as soon as the InstallTrigger name is resolved because it is registered as the handler in the category manager. The nsInstallTrigger instance then provides the JSObject for the JS context through GetScriptObject which creates the JSObject, associating the nsInstallTrigger with it as it does. So whenever getTriggerNative is called there is always an associated nsInstallTrigger now and never a need to create a new one.
Attachment #359503 - Flags: superreview?(dveditz)
Attachment #359503 - Flags: review?(dveditz)
Comment on attachment 359503 [details] [diff] [review]
patch rev 1

r/sr=dveditz
Attachment #359503 - Flags: superreview?(dveditz)
Attachment #359503 - Flags: superreview+
Attachment #359503 - Flags: review?(dveditz)
Attachment #359503 - Flags: review+
Landed: http://hg.mozilla.org/mozilla-central/rev/39ea234c454e
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Depends on: 540558
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: