Rewrite MainThreadErrorContext with OffThreadErrorContext + a step to convert to runtime error
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox107 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(16 files, 5 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Things to do:
- factor out the code around conversion fro
OffThreadFrontendErrors
to runtime error, from helper thread
for (const UniquePtr<CompileError>& error : parseTask->ec_.errors()) {
error->throwError(cx);
}
- possibly temporarily add a workaround to support
MainThreadErrorContext
-specific thing inOffThreadErrorContext
as optional path. such asonAllocationOverflow
and WASI recursion limit - rewrite
MainThreadErrorContext
consumer to useOffThreadErrorContext
and the conversion above - remove
MainThreadErrorContext
after them we can cleanup the code path around error reporting and OffThreadErrorContext
in bug 1785762, and rename things with Frontend*
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
This requires all exceptions being set through ErrorContext in frontend,
including OOM during allocation.
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Depends on D156091
Assignee | ||
Comment 4•2 years ago
|
||
Depends on D156092
Assignee | ||
Comment 5•2 years ago
|
||
Depends on D156093
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D156094
Assignee | ||
Comment 7•2 years ago
|
||
Depends on D156095
Assignee | ||
Comment 8•2 years ago
|
||
remaining things to do:
- rewrite query on JSContext error status
- rewrite recover from error
Assignee | ||
Comment 9•2 years ago
|
||
Also:
- split error and warnings, and add different accessor
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 10•2 years ago
|
||
Depends on D156091
Assignee | ||
Comment 11•2 years ago
|
||
Depends on D157442
Assignee | ||
Comment 12•2 years ago
|
||
Depends on D157443
Assignee | ||
Comment 13•2 years ago
|
||
Depends on D157444
Assignee | ||
Comment 14•2 years ago
|
||
Depends on D157445
Assignee | ||
Comment 15•2 years ago
|
||
Depends on D157446
Assignee | ||
Comment 16•2 years ago
|
||
Depends on D157447
Assignee | ||
Comment 17•2 years ago
|
||
Depends on D157448
Assignee | ||
Comment 18•2 years ago
|
||
Depends on D157449
Assignee | ||
Comment 19•2 years ago
|
||
The frontend error is converted into the runtime error in
AutoReportFrontendContext destructor, and it can GC.
If the function's return value is GC thing, AutoReportFrontendContext
destructor must be called before the return statement, and thus
AutoReportFrontendContext must be put into a block, and the return value
must be stored into JS::Rooted
outside of the block.
Depends on D157450
Assignee | ||
Comment 20•2 years ago
|
||
Depends on D157451
Assignee | ||
Comment 21•2 years ago
|
||
Depends on D157452
Assignee | ||
Comment 22•2 years ago
|
||
Depends on D157453
Assignee | ||
Comment 23•2 years ago
|
||
Depends on D157454
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 24•2 years ago
|
||
Depends on D157453
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 25•2 years ago
|
||
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/3b43722447cb Part 1: Move the OffThreadFrontendErrors-to-runtime-error conversion to OffThreadErrorContext. r=bthrall https://hg.mozilla.org/integration/autoland/rev/320050bb2c1d Part 2: Support allocation overflow in OffThreadErrorContext. r=bthrall https://hg.mozilla.org/integration/autoland/rev/387a484747dd Part 3: Cleanup ErrorContext::hadErrors. r=bthrall https://hg.mozilla.org/integration/autoland/rev/b29e3a509e61 Part 4: Add OffThreadErrorContext::maybeCx_. r=bthrall https://hg.mozilla.org/integration/autoland/rev/a9c6b783ae5f Part 5: Add OffThreadFrontendErrors::warnings and Warning parameter to convertToRuntimeError. r=bthrall https://hg.mozilla.org/integration/autoland/rev/1d7e29232e58 Part 6: Always use ErrorContext::hadErrors in AutoAssertReportedException. r=bthrall https://hg.mozilla.org/integration/autoland/rev/deb867238cb2 Part 7: Use ErrorContext in XDR error check. r=bthrall https://hg.mozilla.org/integration/autoland/rev/c0fbf5e9476b Part 8: Use ErrorContext for checking errors in asm.js. r=bthrall https://hg.mozilla.org/integration/autoland/rev/dd22e38e5474 Part 9: Use ErrorContext for checking errors in BytecodeCompiler. r=bthrall https://hg.mozilla.org/integration/autoland/rev/d8a24b7bd7d8 Part 10: Use ErrorContext::recoverFromOutOfMemory in EmitterScope. r=bthrall https://hg.mozilla.org/integration/autoland/rev/ca77d788facb Part 11: Add AutoReportFrontendContext and use it in CompilationAndEvaluation.cpp. r=bthrall https://hg.mozilla.org/integration/autoland/rev/86a890c4b6fa Part 12: Use AutoReportFrontendContext in simple cases. r=bthrall https://hg.mozilla.org/integration/autoland/rev/5210028e7137 Part 13: Use AutoReportFrontendContext with block for functions that returns GC things. r=bthrall https://hg.mozilla.org/integration/autoland/rev/328ec7d3e3ba Part 14: Add AutoPrintSelfHostingFrontendContext. r=bthrall https://hg.mozilla.org/integration/autoland/rev/f31a45362842 Part 15: Add AutoReportFrontendContext::{clearAutoReport,convertToRuntimeErrorAndClear} and use it in complex cases. r=bthrall https://hg.mozilla.org/integration/autoland/rev/0ac06d10a688 Part 16: Remove MainThreadErrorContext. r=bthrall
Comment 26•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3b43722447cb
https://hg.mozilla.org/mozilla-central/rev/320050bb2c1d
https://hg.mozilla.org/mozilla-central/rev/387a484747dd
https://hg.mozilla.org/mozilla-central/rev/b29e3a509e61
https://hg.mozilla.org/mozilla-central/rev/a9c6b783ae5f
https://hg.mozilla.org/mozilla-central/rev/1d7e29232e58
https://hg.mozilla.org/mozilla-central/rev/deb867238cb2
https://hg.mozilla.org/mozilla-central/rev/c0fbf5e9476b
https://hg.mozilla.org/mozilla-central/rev/dd22e38e5474
https://hg.mozilla.org/mozilla-central/rev/d8a24b7bd7d8
https://hg.mozilla.org/mozilla-central/rev/ca77d788facb
https://hg.mozilla.org/mozilla-central/rev/86a890c4b6fa
https://hg.mozilla.org/mozilla-central/rev/5210028e7137
https://hg.mozilla.org/mozilla-central/rev/328ec7d3e3ba
https://hg.mozilla.org/mozilla-central/rev/f31a45362842
https://hg.mozilla.org/mozilla-central/rev/0ac06d10a688
Description
•