Closed Bug 936143 Opened 11 years ago Closed 11 years ago

Fix js_GetScriptLineExtent. (r=?)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28
Tracking Status
firefox26 --- wontfix
firefox27 --- fixed
firefox28 --- fixed

People

(Reporter: shu, Assigned: shu)

Details

(Whiteboard: [qa-])

Attachments

(4 files, 1 obsolete file)

      No description provided.
This is crazy, js_GetScriptLineExtent has been incorrect for ages AFAICT, for
sequences of source notes where, for N > M,

setline N
setline M
newline

When processing setline M, it stops counting newlines because M <= N, so if the
script ends on source notes, it can give back a short line extent. Test
forthcoming.
Attachment #828839 - Flags: review?(jimb)
Now with test.
Attachment #828864 - Flags: review?(jimb)
Attachment #828839 - Attachment is obsolete: true
Attachment #828839 - Flags: review?(jimb)
> script ends on source notes, it can give back a short line extent.

I meant to say if the script ends on newline source notes.
Comment on attachment 828864 [details] [diff] [review]
Fix js_GetScriptLineExtent. (r=?)

Review of attachment 828864 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit-test/tests/debug/Script-startLine.js
@@ +44,5 @@
>  test(g.f2);
>  test(g.f2);
> +
> +// Having a last = Error().lineNumber forces a setline srcnote, so test a
> +// function that ends with of newline srcnotes.

"ends with of"???
Attachment #828864 - Flags: review?(jimb) → review+
But why not just take out all that hair, while we're here?
Attachment #828881 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/d9ad4cc32e5d
https://hg.mozilla.org/mozilla-central/rev/011dcedf181f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
https://hg.mozilla.org/mozilla-central/rev/dd7de34a6f34
https://hg.mozilla.org/mozilla-central/rev/e1e55ac4e33d
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Comment on attachment 8341333 [details] [diff] [review]
Part 1: Add Debugger.Script.lineCount test where the script's source notes end in newline notes. (

[Approval Request Comment]
Bug caused by (feature/regressing bug #):
  Bug 754201 most recently. Not sure what introduced AutoDebugModeGC initially.

User impact if declined: 
  Firebug unusable with many tabs. Firebug has worked around this by disabling JITs permanently if it's on, which is in some ways worse since it slows down *all* tabs.

Testing completed (on m-c, etc.): 
  On m-c.

Risk to taking this patch (and alternatives if risky): 
  GC behavior changes surfacing existing leaks/OOMs. When landing on m-c new leaks were surfaced (and eventually fixed). I am nominating those fixes for uplift also.

String or IDL/UUID changes made by this patch:
  None

The Firebug slowness metabug is bug 815603. List of bugs I'm nominating for uplift in this batch:

 - bug 936143
 - bug 935228
 - bug 933882
 - bug 935470 
 - bug 942346
 - bug 934799
Attachment #8341333 - Flags: approval-mozilla-beta?
Attachment #8341333 - Flags: approval-mozilla-aurora?
Comment on attachment 8341335 [details] [diff] [review]
Part 2: Simplify and fix js_GetScriptLineExtent. (

[Approval Request Comment]
Bug caused by (feature/regressing bug #):
  Bug 754201 most recently. Not sure what introduced AutoDebugModeGC initially.

User impact if declined: 
  Firebug unusable with many tabs. Firebug has worked around this by disabling JITs permanently if it's on, which is in some ways worse since it slows down *all* tabs.

Testing completed (on m-c, etc.): 
  On m-c.

Risk to taking this patch (and alternatives if risky): 
  GC behavior changes surfacing existing leaks/OOMs. When landing on m-c new leaks were surfaced (and eventually fixed). I am nominating those fixes for uplift also.

String or IDL/UUID changes made by this patch:
  None

The Firebug slowness metabug is bug 815603. List of bugs I'm nominating for uplift in this batch:

 - bug 936143
 - bug 935228
 - bug 933882
 - bug 935470 
 - bug 942346
 - bug 934799
Attachment #8341335 - Flags: approval-mozilla-beta?
Attachment #8341335 - Flags: approval-mozilla-aurora?
Comment on attachment 8341333 [details] [diff] [review]
Part 1: Add Debugger.Script.lineCount test where the script's source notes end in newline notes. (

We can take this on Aurora and thus it will be on Beta in a week, but we're way past the point of taking untracked, major change to Firefox 26 as we are going to build our final candidate today as well as the RC.
Attachment #8341333 - Flags: approval-mozilla-beta?
Attachment #8341333 - Flags: approval-mozilla-beta-
Attachment #8341333 - Flags: approval-mozilla-aurora?
Attachment #8341333 - Flags: approval-mozilla-aurora+
Attachment #8341335 - Flags: approval-mozilla-beta?
Attachment #8341335 - Flags: approval-mozilla-beta-
Attachment #8341335 - Flags: approval-mozilla-aurora?
Attachment #8341335 - Flags: approval-mozilla-aurora+
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: