Closed Bug 1786819 Opened 3 years ago Closed 3 years ago

Handle ErrorContext in oomTest

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: arai, Assigned: bthrall)

References

Details

oomTest calls ReportOutOfMemory internally, and that path should be covered with new frontend-specific allocator.

https://searchfox.org/mozilla-central/rev/d01591796d5faccf762adb09a311d8ee12f7ca7f/js/public/AllocPolicy.h#108,183-185

class JS_PUBLIC_API TempAllocPolicy : public AllocPolicyBase {
...
  bool checkSimulatedOOM() const {
    if (js::oom::ShouldFailWithOOM()) {
      ReportOutOfMemory(cx_);

Switching everything to SystemAllocPolicy or something might just solve the issue.

adding possible dependency for now.

Depends on: 1782573
Assignee: nobody → bthrall

oomTest's code path with FrontendContext is covered since bug 1782573:

https://searchfox.org/mozilla-central/diff/5bd8898a217bf1752668bc01c8e12055caca79af/js/public/AllocPolicy.h#211

bool checkSimulatedOOM() const {
    if (js::oom::ShouldFailWithOOM()) {
      if (hasJSContext()) {
        ReportOutOfMemory(cx());
      } else {
        ReportOutOfMemory(fc());
      }
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.