Closed Bug 1578623 Opened 5 years ago Closed 5 years ago

Include stacks with console messages for uncaught exceptions in worklet scripts

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

(Blocks 1 open bug)

Details

Attachments

(13 files)

(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details
(deleted), text/x-phabricator-request
Details

Script errors use nsIConsoleService with nsScriptErrorWithStack, which expects a JS stack object, which I assume is usually based on SavedFrame.
Console OTOH uses "console-api-log-event" with ConsoleStackEntry reification of stacks for logging.
WebConsoleActor.prepareStackForRemote() converts SavedFrame to what might be equivalent to ConsoleStackEntry, but is expecting nsIScriptError messages to have stacks in SavedFrame format.
SerializedStackHolder exists for passing SavedFrame stacks across threads.

This will permit implementation of JSPrincipals::write().

Depends on D44603

Depends on D44604

Depends on D44605

Depends on D44607

This is consistent with what the Web Console expects.

Depends on D44609

Line numbers in self-hosted frames are not controlled by the test.

Depends on D44610

Attachment #9090281 - Attachment description: Bug 1578623 implement WorkletPrincipals::write() r?baku → Bug 1578623 implement WorkletPrincipals::write()

The principals used in worklet scripts derive from the relevant settings object
of the main thread Worklet object, rather than the network loads of the scripts.
Moving the data off LoadInfo removes any implication that the principals might
depend on script module loads.

The environment settings object for a WorkletGlobalScope derives from the
relevant settings object of the main-thread Worklet object, but the origin is
a unique opaque origin.
https://drafts.css-houdini.org/worklets/#set-up-a-worklet-environment-settings-object

Depends on D44775

Attachment #9090279 - Attachment description: Bug 1578623 store PrincipalInfo on WorkletLoadInfo for off-main-thread use r?baku → bug 1578623 store PrincipalInfo on WorkletImpl for off-main-thread use r?baku
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe16058974e0 create worklet global with JSPrincipals having reference to WorkletImpl r=baku,bzbarsky https://hg.mozilla.org/integration/autoland/rev/94f6ee4ceef0 remove documentation for non-existent parameter r=bholley https://hg.mozilla.org/integration/autoland/rev/e58800cb5882 use 1 for first line number of worklet scripts r=baku https://hg.mozilla.org/integration/autoland/rev/848723605c2c ignore self-hosted frames when testing console message stack line numbers r=bhackett
Keywords: leave-open
Regressions: 1579325
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3be609a9be36 move principal-related data from LoadInfo to WorkletImpl r=baku https://hg.mozilla.org/integration/autoland/rev/6d7be8a22f8b use an opaque origin for WorkletGlobalScope r=baku https://hg.mozilla.org/integration/autoland/rev/8242877392bd store PrincipalInfo on WorkletImpl for off-main-thread use r=baku https://hg.mozilla.org/integration/autoland/rev/0128e12a910f implement WorkletPrincipals::write() r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/71e58ee8f684 permit SerializeStack() from worklet thread r=baku https://hg.mozilla.org/integration/autoland/rev/3badf9215788 add stack support to AsyncErrorReporter r=bholley https://hg.mozilla.org/integration/autoland/rev/65a7c4daec27 include stack with console message for uncaught exception in worklet script r=baku https://hg.mozilla.org/integration/autoland/rev/e4fddd3d24b4 add test for syntax errors and uncaught exceptions in worklet scripts r=bhackett https://hg.mozilla.org/integration/autoland/rev/52a86c60c866 remove OriginAttributes duplication by reading from PrincipalInfo r=baku
Keywords: leave-open
Flags: needinfo?(karlt)
Depends on: 834505
Flags: needinfo?(karlt)
Keywords: leave-open
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11cda2e9615b move principal-related data from LoadInfo to WorkletImpl r=baku https://hg.mozilla.org/integration/autoland/rev/a83797ed249c use an opaque origin for WorkletGlobalScope r=baku
Keywords: leave-open
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a67e6e7defba store PrincipalInfo on WorkletImpl for off-main-thread use r=baku https://hg.mozilla.org/integration/autoland/rev/99c181965128 implement WorkletPrincipals::write() r=bzbarsky https://hg.mozilla.org/integration/autoland/rev/1720f0a8952b permit SerializeStack() from worklet thread r=baku https://hg.mozilla.org/integration/autoland/rev/52c6a60efe7c add stack support to AsyncErrorReporter r=bholley https://hg.mozilla.org/integration/autoland/rev/ea60c5110b4a include stack with console message for uncaught exception in worklet script r=baku https://hg.mozilla.org/integration/autoland/rev/0665b9520daa add test for syntax errors and uncaught exceptions in worklet scripts r=bhackett https://hg.mozilla.org/integration/autoland/rev/37062227d710 remove OriginAttributes duplication by reading from PrincipalInfo r=baku
Blocks: worklets-1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: