Open Bug 1899122 Opened 2 years ago Updated 2 years ago

Stackless Exception object is a debug nightmare

Categories

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

task

Tracking

()

People

(Reporter: saschanaz, Unassigned)

References

Details

(Not sure this belongs to bindings component, if yes feel free to move this there)

We allow creating Exception without a proper stack:

  if (aLocation) {
    mLocation = aLocation;
  } else {
    mLocation = GetCurrentJSStack();
    // it is legal for there to be no active JS stack, if C++ code
    // is operating on a JS-implemented interface pointer without
    // having been called in turn by JS.  This happens in the JS
    // component loader.

GetCurrentJSStack() can return empty as the comment says, and then mLocation is left null, making it impossible to be backtraced. Not sure what can be done there, just filing a bug so that we can at least acknowledge the pain.

Perhaps the promise can try refilling the stack when MaybeRejected for the case of bug 1895285? 🤔

Blocks: 1895285
See Also: 1895285
You need to log in before you can comment on or make changes to this bug.