Make nsIEditor.transactionManager readonly

RESOLVED FIXED in Firefox 55

Status

()

Core
Editor
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

Looks like that anybody (including comm-central and BlueGriffon) doesn't set nsIEditor.transactionManager. So, we can make it readonly attribute.

Note that replacing transaction manager may have security risk. So, there must be no reason to allow to set it.

http://searchfox.org/mozilla-central/search?q=symbol:_ZN9nsIEditor21GetTransactionManagerEPP21nsITransactionManager%2C_ZN9nsIEditor21SetTransactionManagerEP21nsITransactionManager%2C%23transactionManager&redirect=false
http://searchfox.org/comm-central/search?q=symbol:_ZN9nsIEditor21GetTransactionManagerEPP21nsITransactionManager%2C_ZN9nsIEditor21SetTransactionManagerEP21nsITransactionManager%2C%23transactionManager&redirect=false
https://github.com/therealglazou/bluegriffon/search?utf8=%E2%9C%93&q=transactionManager
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7b2afca31770
nsITransactionManager is a builtinclass. Therefore, JS cannot replace it with its original one. So, setting value must be another editor's transaction manager or same editor's but already initialized again.

Additionally, if transaction manager is detached from original editor, it's difficult to manager their relation especially when the editor is marked destroyed. So, it may cause memory leak if there are some circular references.
Comment hidden (mozreview-request)

Comment 4

7 months ago
mozreview-review
Comment on attachment 8849794 [details]
Bug 1349178 Make nsIEditor.transactionManager readonly

https://reviewboard.mozilla.org/r/122554/#review124740
Attachment #8849794 - Flags: review?(m_kato) → review+

Comment 5

7 months ago
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/59fa92404734
Make nsIEditor.transactionManager readonly r=m_kato

Comment 6

7 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/59fa92404734
Status: ASSIGNED → RESOLVED
Last Resolved: 7 months ago
status-firefox55: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.