Refactor the code in the webapp runtimes

RESOLVED INCOMPLETE

Status

Firefox Graveyard
Webapp Runtime
P3
normal
RESOLVED INCOMPLETE
5 years ago
a year ago

People

(Reporter: marco, Unassigned)

Tracking

Details

(Reporter)

Description

5 years ago
There's a lot of duplicated code in the webapp runtimes for mac, windows and unix. We should refactor it (this would avoid some problems, like bug 760747 or bug 761496).
To safely implement a refactoring to remove code duplication, I'd suggest landing unit test support in bug 733631 first. Then, implement this while adding unit tests in the process to catch regressions that may happen while refactoring.
Depends on: 733631
Priority: -- → P2
(Reporter)

Comment 2

5 years ago
We should also improve the error messages.
No longer depends on: 733631

Updated

5 years ago
QA Contact: jsmith

Updated

5 years ago
status-firefox16: --- → wontfix
In general, I prefer to refactor in the process of fixing bugs or implementing enhancements rather than refactoring for its own sake, because it's hard to optimize for code maintainability (or other benefits of refactoring) without also doing some work that is made easier by the refactoring.

Nevertheless, sometimes it's useful to isolate refactoring work, so I'm open to doing so.  But it's hard to use a bug report to track a general refactoring; we'd need to know the specifics of what is to be refactored to be able to know what to do here.

Marco: did you have any particular refactoring in mind?
Priority: P2 → P3
(Reporter)

Comment 4

4 years ago
I wanted to get rid of the duplicated code in gtk2/webapprt.cpp, win/webapprt.cpp and mac/webapprt.mm.
But I think you're right, it's not worth the effort if you aren't modifying them for other purposes.
Shall we close?
(In reply to Marco Castelluccio [:marco] from comment #4)
> I wanted to get rid of the duplicated code in gtk2/webapprt.cpp,
> win/webapprt.cpp and mac/webapprt.mm.
> But I think you're right, it's not worth the effort if you aren't modifying
> them for other purposes.
> Shall we close?

Yes, let's close this but keep that code duplication in mind as we make changes to those files in the future!
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INCOMPLETE
(Assignee)

Updated

a year ago
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.