WARNING: '!mInitSucceeded', file /z/moz/l/editor/libeditor/TextEditSubActionHandler.cpp, line 103
Categories
(Core :: DOM: Editor, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox77 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
Details
Attachments
(1 file)
On startup of a debug build, I get this warning:
WARNING: '!mInitSucceeded', file /z/moz/l/editor/libeditor/TextEditSubActionHandler.cpp, line 103
This happens early on when a browser window is opened. The JS stack is:
0 get editor() ["resource:///modules/UrlbarInput.jsm":1008:4]
1 UrlbarInput(options = "[object Object]") ["resource:///modules/UrlbarInput.jsm":217:4]
2 anonymous() ["chrome://browser/content/browser.js":325:15]
3 get() ["resource://gre/modules/XPCOMUtils.jsm":129:50]
4 _setInitialFocus/<(uriToLoad = ""about:home"") ["chrome://browser/content/browser.js":2104:8]
5 _callWithURIToLoad(callback = [function]) ["chrome://browser/content/browser.js":2360:14]
6 _setInitialFocus() ["chrome://browser/content/browser.js":2102:9]
7 onDOMContentLoaded("[object Event]") ["chrome://browser/content/browser.js":1791:9]
8 onDOMContentLoaded("[object Event]") ["self-hosted":844:0]
and above that the C++ stack is:
#0 0x00007f5ae8b19b92 in mozilla::TextEditor::OnStartToHandleTopLevelEditSubAction(mozilla::EditSubAction, short, mozilla::ErrorResult&) (this=0x7f5a27967f20, aTopLevelEditSubAction=mozilla::EditSubAction::eCreatePaddingBRElementForEmptyEditor, aDirectionOfTopLevelEditSubAction=0, aRv=...) at /z/moz/l/editor/libeditor/TextEditSubActionHandler.cpp:103
#1 0x00007f5ae8a1b7d6 in mozilla::EditorBase::AutoEditSubActionNotifier::AutoEditSubActionNotifier(mozilla::EditorBase&, mozilla::EditSubAction, short, mozilla::ErrorResult&, mozilla::detail::GuardObjectNotifier&&) (this=0x7ffca67dcdf8, aEditorBase=..., aEditSubAction=mozilla::EditSubAction::eCreatePaddingBRElementForEmptyEditor, aDirection=0, aRv=..., _notifier=...) at /z/moz/l/obj/dist/include/mozilla/EditorBase.h:2729
#2 0x00007f5ae89fc104 in mozilla::EditorBase::MaybeCreatePaddingBRElementForEmptyEditor() (this=0x7f5a27967f20) at /z/moz/l/editor/libeditor/EditorBase.cpp:4433
#3 0x00007f5ae8b19302 in mozilla::TextEditor::InitEditorContentAndSelection() (this=0x7f5a27967f20) at /z/moz/l/editor/libeditor/TextEditSubActionHandler.cpp:51
#4 0x00007f5ae8b20597 in mozilla::TextEditor::Init(mozilla::dom::Document&, mozilla::dom::Element*, nsISelectionController*, unsigned int, nsTSubstring<char16_t> const&) (this=0x7f5a27967f20, aDoc=..., aRoot=0x7f5ac0dc48b0, aSelCon=0x7f5ac1e0e550, aFlags=8323, aInitialValue=...) at /z/moz/l/editor/libeditor/TextEditor.cpp:146
#5 0x00007f5ae7346e94 in mozilla::TextControlState::PrepareEditor(nsTSubstring<char16_t> const*) (this=0x7f5ab88827b0, aValue=0x0) at /z/moz/l/dom/html/TextControlState.cpp:1830
#6 0x00007f5ae7344ef0 in mozilla::TextControlState::GetTextEditor() (this=0x7f5ab88827b0) at /z/moz/l/dom/html/TextControlState.cpp:1564
#7 0x00007f5ae72758cb in mozilla::dom::HTMLInputElement::GetTextEditorFromState() (this=0x7f5ab8a10f20) at /z/moz/l/dom/html/HTMLInputElement.cpp:2231
#8 0x00007f5ae7275885 in mozilla::dom::HTMLInputElement::GetEditor() (this=0x7f5ab8a10f20) at /z/moz/l/dom/html/HTMLInputElement.cpp:2224
#9 0x00007f5ae68dd27a in mozilla::dom::HTMLInputElement_Binding::get_editor(JSContext*, JS::Handle<JSObject*>, void*, JSJitGetterCallArgs) (cx=0x7f5ad751b000, obj=..., void_self=0x7f5ab8a10f20, args=...) at HTMLInputElementBinding.cpp:5779
So we're under TextEditor::Init, but TextEditor::OnStartToHandleTopLevelEditSubAction is warning that Init hasn't completed successfully yet.
Can we make MaybeCreatePaddingBRElementForEmptyEditor not use a AutoEditSubActionNotifier if we're under Init still? Or should we just move the mInitSucceeded = true; statement above the InitEditorContentAndSelection() call?
Comment 1•6 years ago
|
||
Ah, good point.
Or should we just move the mInitSucceeded = true; statement above the InitEditorContentAndSelection() call?
I think that this is the right approach. And then, if failed something after setting mInitSucceeded to true, it should be overwritten with false.
| Assignee | ||
Comment 2•6 years ago
|
||
Thanks, I will do that.
| Assignee | ||
Comment 3•6 years ago
|
||
| Assignee | ||
Comment 4•6 years ago
|
||
Comment 6•6 years ago
|
||
| bugherder | ||
Description
•