Closed Bug 621103 Opened 9 years ago Closed 9 years ago

Should js::Anchor be JS::Anchor?

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- .x+

People

(Reporter: jimb, Assigned: jimb)

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(1 file)

Waldo tells me public C++ API should be the JS:: namespace, and the js:: namespace is reserved for internal stuff.  If that's true, then js::Anchor should be JS::Anchor.

Is this, in fact, the case?
I don't know.
$ grep '^namespace ' jsapi.h
namespace js {
namespace JS {

It's early but the first one was JS. It fits the old API style, However, that first occurrence was just C-like API with :: instead of _ and I objected that we should stick with extern "C" in jsapi.h where there's no C++ win.

Anchors are C++ win, of course. Are we ready to put them out under JS::? I guess.

/be
Assignee: general → jimb
Attachment #507925 - Flags: review?
Attachment #507925 - Flags: review? → review?(jwalden+bmo)
Comment on attachment 507925 [details] [diff] [review]
Rename js::Anchor to JS::Anchor: 'JS' is the public namespace.

rs=me
Attachment #507925 - Flags: review?(jwalden+bmo) → review+
Okay. Unless someone can argue that this should block, I'll land this after FF4, I guess.
blocking2.0: --- → ?
This seems like a "why bother waiting?" fix to me that you should just land.
(In reply to comment #6)
> This seems like a "why bother waiting?" fix to me that you should just land.

Agreed.
blocking2.0: ? → .x
Attachment #507925 - Flags: approval2.0+
Status: NEW → ASSIGNED
Whiteboard: [fixed-in-tracemonkey]
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.