Closed Bug 1904747 Opened 1 year ago Closed 1 year ago

Error is reported by JS_Utf8BufferIsCompilableUnit

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox127 --- wontfix
firefox128 --- fixed
firefox129 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

Bug 1786494 rewritten JS_Utf8BufferIsCompilableUnit to use AutoReportFrontendContext, but the error handling remains using cx,
which results in not clearing errors and reporting errors when the input is not compilable unit.

https://searchfox.org/mozilla-central/rev/67956a15835fc397334668525d528d471b19b273/js/src/vm/CompilationAndEvaluation.cpp#169-172,195-196,223

JS_PUBLIC_API bool JS_Utf8BufferIsCompilableUnit(JSContext* cx,
                                                 HandleObject obj,
                                                 const char* utf8,
                                                 size_t length) {
...
  AutoReportFrontendContext fc(cx,
                               AutoReportFrontendContext::Warning::Suppress);
...
    cx->clearPendingException();

JS_Utf8BufferIsCompilableUnit is used only by shell, so

  • this doesn't affect browser
  • but this affects SpiderMonkey embeddings

https://searchfox.org/mozilla-central/search?q=JS_Utf8BufferIsCompilableUnit&path=&case=false&regexp=false

Severity: -- → S4
Priority: -- → P1

Given this affects SpiderMonkey embeddings, I'd like to uplift this to 128, given it will be the next ESR.
is it okay?

Flags: needinfo?(dmeehan)

Set 128 to affected but we don't have much time left in the cycle. This is the final week of beta if you have something safe to uplift.

Flags: needinfo?(dmeehan)
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/cc549315809f Do not report error or warning in JS_Utf8BufferIsCompilableUnit. r=bthrall
Attachment #9409905 - Flags: approval-mozilla-beta?

beta Uplift Approval Request

  • User impact if declined: This affects SpiderMonkey embeddings. the API behaves in unexpected way.
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: none
  • Risk associated with taking this patch: Very low
  • Explanation of risk level: This API is not used by browser, but only by shells (xpcshell, spidermonkey shell)
  • String changes made/needed: none
  • Is Android affected?: no
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
Attachment #9409905 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: