Closed Bug 1311625 Opened 8 years ago Closed 3 years ago

nsTextServiceDocument.cpp should be refine with a stack class like AutoDocumentUnlocker

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox52 --- affected

People

(Reporter: masayuki, Unassigned)

References

(Blocks 1 open bug)

Details

nsTextServiceDocument.cpp cannot use "early return" style and that makes the code complicated.  The reason is, each method needs to call UNLOCK_DOC(this) before returning from itself.

The lock state should be managed by a stack class.  Then, it should be rewritten with "early return" style.
Priority: -- → P3
LOCK_DOC and UNLOCK_DOC are nothing implementation like the following.

#define LOCK_DOC(doc)
#define UNLOCK_DOC(doc)  

Could we remove this defines?
Status: NEW → RESOLVED
Closed: 3 years ago
Depends on: 1482007
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.