Add componentDidCatch handler in Message component
Categories
(DevTools :: Console, task, P1)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
When the Message component throws, we should render an informative message saying that there was an issue rendering the message and inviting the user to file a bug about it.
We could have a button to copy the message data to the clipboard so the user can provide additional data that would help fixing the bug.
Assignee | ||
Comment 1•5 years ago
|
||
This patch adds a componentDidCatch handler to the Message component
so we don't crash the whole console when a message can't be rendered.
When a message causes a crash, we display an error message instead,
asking the user to file a bug. A button allow to copy the message data
so it can be attached in the bug report.
Assignee | ||
Updated•5 years ago
|
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e2af0f70828c Add componentDidCatch in Message component. r=bgrins.
Comment 3•5 years ago
|
||
Backed out changeset e2af0f70828c for causing bc failures in webconsole.properties
Backout link: https://hg.mozilla.org/integration/autoland/rev/202fecd1adfd61d0ef651c2229bd39c89c181f5e
Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=250622511&repo=autoland&lineNumber=2251
15:27:39 INFO - TEST-START | browser/base/content/test/static/browser_misused_characters_in_strings.js
15:27:39 INFO - TEST-INFO | started process screenshot
15:27:39 INFO - TEST-INFO | screenshot: exit 0
15:27:39 INFO - Buffered messages logged at 15:27:39
15:27:39 INFO - Entering test bound checkAllTheProperties
15:27:39 INFO - TEST-PASS | browser/base/content/test/static/browser_misused_characters_in_strings.js | Found 147 .properties files to scan for misused characters -
15:27:39 INFO - Buffered messages finished
15:27:39 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_misused_characters_in_strings.js | jar:file:///Z:/task_1559917967/build/application/firefox/browser/omni.ja!/chrome/en-US/locale/en-US/devtools/client/webconsole.properties with key=webconsole.message.componentDidCatch.label has a misused apostrophe. Strings with apostrophes should use foo’s instead of foo's. -
15:27:39 INFO - Stack trace:
15:27:39 INFO - chrome://mochikit/content/browser-test.js:test_ok:1313
15:27:39 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForError:123
15:27:39 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForErrors:128
15:27:39 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:checkAllTheProperties:160
15:27:39 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1115
15:27:39 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1143
15:27:39 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1004
15:27:39 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
15:27:39 INFO - Not taking screenshot here: see the one that was previously logged
15:27:39 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/static/browser_misused_characters_in_strings.js | jar:file:///Z:/task_1559917967/build/application/firefox/browser/omni.ja!/chrome/en-US/locale/en-US/devtools/client/webconsole.properties with key=webconsole.message.componentDidCatch.label has a misused single-quote. Single-quoted strings should use Unicode ‘foo’ instead of 'foo'. -
15:27:39 INFO - Stack trace:
15:27:39 INFO - chrome://mochikit/content/browser-test.js:test_ok:1313
15:27:39 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForError:123
15:27:39 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:testForErrors:130
15:27:39 INFO - chrome://mochitests/content/browser/browser/base/content/test/static/browser_misused_characters_in_strings.js:checkAllTheProperties:160
15:27:39 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1115
15:27:39 INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1143
15:27:39 INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1004
15:27:39 INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/waitForFocusInner/focusedOrLoaded/<:803
15:27:39 INFO - Leaving test bound checkAllTheProperties
15:27:39 INFO - Entering test bound checkAllTheDTDs
15:27:39 INFO - TEST-PASS | browser/base/content/test/static/browser_misused_characters_in_strings.js | Found 55 .dtd files to scan for misused characters -
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/406aa9e6a102 Add componentDidCatch in Message component. r=bgrins.
Comment 6•5 years ago
|
||
bugherder |
Description
•