Mark each method of `TextControlState` as `MOZ_CAN_RUN_SCRIPT` if necessary
Categories
(Core :: DOM: Editor, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox73 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(5 files)
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
The destructor of AutoTextControlHandlingState
is marked as
MOZ_CAN_RUN_SCRIPT
, but it's not checked at build time. And this does not
need to be created when the method does not run script. Therefore, we should
mark its constructor as MOZ_CAN_RUN_SCRIPT
instead since it's stack only
class so that its constructor and destructor are always called from same
method.
Assignee | ||
Comment 2•5 years ago
|
||
They are really complicated and can run script while the instance is being
destroyed. Therefore, they should have their own AutoTextControlHandlingState
as "kungFuDeathGrip".
Depends on D55772
Assignee | ||
Comment 3•5 years ago
|
||
Similar to the previous patch, it may notify selection listeners of native
anonymous tree in <input>
and <textarea>
element.
Depends on D55773
Assignee | ||
Comment 4•5 years ago
|
||
If PreareEditor()
returns NS_OK
, but if the instance is deleted at returning
from it, GetTextEditor()
will access mTextEditor
. Therefore, this patch
makes PrepareEditor()
return error if the instance is destroyed at its end.
Depends on D55774
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D55775
Updated•5 years ago
|
Assignee | ||
Comment 7•5 years ago
|
||
These patches might cause performance regression due to new kungFuDeathGrip
creation cost. If it'd occur, we would need to try to redesign of the hot path.
Comment 8•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/00fbfc983413
https://hg.mozilla.org/mozilla-central/rev/5ac500c686d5
https://hg.mozilla.org/mozilla-central/rev/263be8792c1d
https://hg.mozilla.org/mozilla-central/rev/5814ca6a68ae
https://hg.mozilla.org/mozilla-central/rev/13bec3d1eba3
Description
•