Improve warning under libeditor for making investigation of web-compat and regressions easier
Categories
(Core :: DOM: Editor, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
(Blocks 2 open bugs)
Details
Attachments
(31 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
Currently, libeditor
uses NS_WARN_IF(NS_FAILED(rv))
in a lot of places, but meaningful information of it is only the line number. So, basically, we should rewrite the warnings as:
nsresult rv = Foo();
if (NS_FAILED(rv)) {
NS_WARNING("TextEditor::Foo() failed");
return rv;
}
Assignee | ||
Comment 1•5 years ago
|
||
Mirko, when are you going to land your MOZ_CAN_RUN_SCRIPT
patches for Selection
? They may conflict with patches for this bug.
Comment 2•5 years ago
|
||
Part 1 and part 2 of https://bugzilla.mozilla.org/show_bug.cgi?id=1619617 I intend to land now. Is that OK for you? I don't plan to land other MOZ_CAN_RUN_SCRIPT
patches soon (including the one about SelectAllChildren
).
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Mirko Brodesser (:mbrodesser) from comment #2)
Part 1 and part 2 of https://bugzilla.mozilla.org/show_bug.cgi?id=1619617 I intend to land now. Is that OK for you? I don't plan to land other
MOZ_CAN_RUN_SCRIPT
patches soon (including the one aboutSelectAllChildren
).
Yeah, go ahead. Anyway, my patches are risky to land at this moment.
FYI: If you write one line declaration as MOZ_CAN_RUN_SCRIPT void Foo();
in header if possible, developers can check whether the method may run script or not with grep or searchfox's search like:
https://searchfox.org/mozilla-central/search?q=EditorBase%3A%3ADeleteNodeWithTransaction&case=false®exp=false&path=
Comment 4•5 years ago
•
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #3)
(In reply to Mirko Brodesser (:mbrodesser) from comment #2)
Part 1 and part 2 of https://bugzilla.mozilla.org/show_bug.cgi?id=1619617 I intend to land now. Is that OK for you? I don't plan to land other
MOZ_CAN_RUN_SCRIPT
patches soon (including the one aboutSelectAllChildren
).Yeah, go ahead. Anyway, my patches are risky to land at this moment.
Ok.
FYI: If you write one line declaration as
MOZ_CAN_RUN_SCRIPT void Foo();
in header if possible, developers can check whether the method may run script or not with grep or searchfox's search like:
https://searchfox.org/mozilla-central/search?q=EditorBase%3A%3ADeleteNodeWithTransaction&case=false®exp=false&path=
Ah, great, I didn't think about it. I assumed the automatic formatting would enforce one style anyway. Thanks!
Assignee | ||
Comment 5•5 years ago
|
||
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D65866
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D65867
Assignee | ||
Comment 8•5 years ago
|
||
Depends on D65869
Assignee | ||
Comment 9•5 years ago
|
||
Depends on D65870
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D65871
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D65872
Assignee | ||
Comment 12•5 years ago
|
||
Depends on D65873
Assignee | ||
Comment 13•5 years ago
|
||
This also changes mChildren
to array of OwningNonNull
for removing
unnecessary nullptr
checks.
Depends on D65874
Assignee | ||
Comment 14•5 years ago
|
||
Depends on D65875
Assignee | ||
Comment 15•5 years ago
|
||
Depends on D65876
Assignee | ||
Comment 16•5 years ago
•
|
||
FYI: If you think the warnings are messy when you read the editor code and you use VSCode, install "Highlight" extension and add these lines into your settings.json
.
"highlight.regexFlags": "g",
"highlight.regexes": {
"(\\n)([\\s\\t]*(NS_WARNING(_ASSERTION)?|MOZ_ASSERT(_IF)?|NS_ERROR|NS_ASSERTION|MOZ_LOG)\\([^;]*(\\n[^;]*){0,10}\\);)(\\n)": {
"decorations": [
{},
{
"opacity": "0.5",
},
{},
],
},
},
Comment 17•5 years ago
|
||
Comment 18•5 years ago
|
||
Comment 19•5 years ago
|
||
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
Comment 22•5 years ago
|
||
bugherder |
Comment 23•5 years ago
|
||
Comment 24•5 years ago
|
||
Comment 25•5 years ago
|
||
bugherder |
Assignee | ||
Comment 26•5 years ago
|
||
Depends on D65877
Assignee | ||
Comment 27•5 years ago
|
||
Depends on D66174
Assignee | ||
Comment 28•5 years ago
|
||
Depends on D66175
Assignee | ||
Comment 29•5 years ago
|
||
Depends on D66176
Assignee | ||
Comment 30•5 years ago
|
||
Depends on D66177
Assignee | ||
Comment 31•5 years ago
|
||
Additionally, this makes some nsIAbsorbingTransaction
methods infallible for
reducing unnecessary warnings.
Depends on D66178
Comment 32•5 years ago
|
||
Comment 33•5 years ago
|
||
bugherder |
Comment 34•5 years ago
|
||
Comment 35•5 years ago
|
||
Assignee | ||
Comment 36•5 years ago
|
||
Depends on D66179
Assignee | ||
Comment 37•5 years ago
|
||
Depends on D66226
Comment 38•5 years ago
|
||
Comment 39•5 years ago
|
||
bugherder |
Comment 40•5 years ago
|
||
Comment 41•5 years ago
|
||
bugherder |
Comment 42•5 years ago
|
||
Comment 43•5 years ago
|
||
Comment 44•5 years ago
|
||
bugherder |
Comment 45•5 years ago
|
||
Comment 46•5 years ago
|
||
Comment 47•5 years ago
|
||
bugherder |
Comment 48•5 years ago
|
||
Comment 49•5 years ago
|
||
Comment 50•5 years ago
|
||
bugherder |
Comment 51•5 years ago
|
||
bugherder |
Assignee | ||
Comment 52•5 years ago
|
||
This changes a lot of arguments from pointer to reference.
Depends on D66227
Assignee | ||
Comment 53•5 years ago
|
||
Depends on D66851
Comment 54•5 years ago
|
||
Comment 55•5 years ago
|
||
bugherder |
Assignee | ||
Comment 56•5 years ago
|
||
Depends on D66852
Assignee | ||
Comment 57•5 years ago
|
||
Depends on D66979
Assignee | ||
Comment 58•5 years ago
|
||
Depends on D66980
Assignee | ||
Comment 59•5 years ago
|
||
Depends on D66981
Assignee | ||
Comment 60•5 years ago
|
||
Depends on D66983
Assignee | ||
Comment 61•5 years ago
|
||
Depends on D66984
Assignee | ||
Comment 62•5 years ago
|
||
Depends on D66985
Comment 63•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 64•5 years ago
|
||
bugherder |
Assignee | ||
Comment 65•5 years ago
|
||
Depends on D66986
Assignee | ||
Comment 66•5 years ago
|
||
Depends on D67130
Assignee | ||
Comment 67•5 years ago
|
||
Depends on D67131
Comment 68•5 years ago
|
||
Comment 69•5 years ago
|
||
Comment 70•5 years ago
|
||
Comment 71•5 years ago
|
||
Comment 72•5 years ago
|
||
bugherder |
Comment 73•5 years ago
|
||
bugherder |
Comment 74•5 years ago
|
||
bugherder |
Comment 75•5 years ago
|
||
Comment 76•5 years ago
|
||
Comment 77•5 years ago
|
||
Comment 78•5 years ago
|
||
bugherder |
Comment 79•5 years ago
|
||
Comment 80•5 years ago
|
||
Comment 81•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Comment 82•5 years ago
|
||
Comment 83•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/550f335d1a24
https://hg.mozilla.org/mozilla-central/rev/e75be1e21827
Description
•