Closed Bug 845713 Opened 11 years ago Closed 11 years ago

Remove unnecessary RangedPtr includes

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file, 1 obsolete file)

In doing a little research on RangedPtr, I noticed several files that #include it without using it, all in the /js/src directory.

Filing this bug on removing those #includes.
The files in question are:
 * jsarray.cpp
    - #include was added in https://hg.mozilla.org/mozilla-central/rev/570ff6efe5ef#l9.16 for bug 668024, apparently accidentally. (Nothing in that commit uses RangedPtr)

 * jsfun.cpp
     - #include was added in https://hg.mozilla.org/mozilla-central/rev/e080642175e6#l39.12 for Bug 761723.
     - That patch's RangedPtr usage was later replaced with StableCharPtr in bug 761723

 * jsonparser.h
     - #include was added in https://hg.mozilla.org/mozilla-central/rev/739c0fd21ccc#l3.12
      - That ptach's RangedPtr usage was later replaced with StableCharPtr in bug 798624
Depends on: 668024, savesource
Depends on: 662001, 798624
Attached patch fix (obsolete) — Splinter Review
Attachment #718865 - Flags: review?(jwalden+bmo)
Assignee: general → dholbert
Status: NEW → ASSIGNED
Attachment #718865 - Flags: review?(jwalden+bmo) → review+
Just rediscovered this bug -- apparently I forgot to land its patch.

Looks like the first chunk, for jsarray.cpp, was fixed in bug 634839 part 1:
 https://hg.mozilla.org/mozilla-central/rev/9ab1119d4596#l6.1

The other two chunks are still valid, though.
RE the jsonparser.h tweak: jsonparser.cpp (not .h) *does* actually have some RangedPtr usage, so it technically should be including RangedPtr.

It gets it for free from jsapi, so it builds fine regardless, but it'd be better to include it directly rather than depending on a several-levels-removed #include.
Tagging Waldo for review on the jsonparser.cpp tweak. (adding the #include there)

(For completeness, the RangedPtr usages there are:
 http://mxr.mozilla.org/mozilla-central/source/js/src/jsonparser.cpp#207
and
 http://mxr.mozilla.org/mozilla-central/source/js/src/jsonparser.cpp#389
)
Attachment #718865 - Attachment is obsolete: true
Attachment #744891 - Flags: review?(jwalden+bmo)
Attachment #744891 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/47ad8bdaae94
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: