Closed Bug 475934 Opened 14 years ago Closed 14 years ago
Remove unused functions from xpinstall
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.
Comment on attachment 359503 [details] [diff] [review] patch rev 1 r/sr=dveditz
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
You need to log in before you can comment on or make changes to this bug.