Closed Bug 342456 Opened 14 years ago Closed 14 years ago

Remove dependencies on obsolete strres.js

Categories

(Calendar :: Sunbird Only, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jminta, Assigned: jminta)

References

()

Details

Attachments

(1 file, 2 obsolete files)

strres.js is in toolkit/obsolete for a reason. :-)  We should use it.  Moving to the new preferences code eliminated most of the active references to it, but we should go ahead and remove the rest of them.  See the URL for a complete list.
*** Bug 342457 has been marked as a duplicate of this bug. ***
Attached patch remove includes (obsolete) — Splinter Review
We weren't actually using any functions in those files.  This means we get to save a bit of time loading these dialogs.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #227741 - Flags: first-review?(mvl)
Comment on attachment 227741 [details] [diff] [review]
remove includes

Let's just fix the bug as filed, instead of this small step.
The include / dependecy web is complex, and checking everything is way too much work, and will likely miss stuff.
(For example, publish.js uses srGetStrBundle, so needs strres.js. But that has to be included from a xul file. So you need to check all xul files that include publish.js. not fun)
Attachment #227741 - Flags: first-review?(mvl) → first-review-
Attached patch remove srgetstrbundle (obsolete) — Splinter Review
Untested patch.  This removes all the interesting occurrences of srGetStrBundle in calendar code. (see http://landfill.mozilla.org/mxr-test/mozilla/search?string=srGetStrBundle&find=calendar&filter= )  Since that's the only function in strres.js, removing it ensures that we're safe to remove the includes.  Still need to smoketest the changes, but since I don't have a good publishing framework set up, I'm holding off on requesting review.  If someone from QA could smoketest this patch, that would be awesome.
Attachment #227741 - Attachment is obsolete: true
Comment on attachment 229022 [details] [diff] [review]
remove srgetstrbundle

Error during startup on Sunbird with that patch applied:

  Error: srGetStrBundle is not defined
  Source File: chrome://calendar/content/calendarMail.js Line: 51

Also there is no initial calendar created and it's not possible to create a new one. (Maybe because of the error during startup).
(In reply to comment #5)
>   Error: srGetStrBundle is not defined
>   Source File: chrome://calendar/content/calendarMail.js Line: 51
> 
...grumble...
calendarMail.js is a mostly obsolete file.  The only reason I haven't yanked it entirely is that I wanted to wait for a decent iTIP/iMIP replaement to appear.  I'll rework the patch to fix that file too.
This time I've even patched the terrible calendarMail.js file.
Attachment #229022 - Attachment is obsolete: true
Attachment #230949 - Flags: first-review?(mvl)
Comment on attachment 230949 [details] [diff] [review]
remove srgetstrbundle v2

r=mvl
Attachment #230949 - Flags: first-review?(mvl) → first-review+
Patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.