Closed
Bug 911043
Opened 11 years ago
Closed 11 years ago
Move the "inject JS:: names into js::" block into its own file, to reduce dependencies on jsapi.h.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(2 files)
22.28 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
12.30 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
I don't like having the "import JS:: names into js::" hack in jsapi.h, for two reasons. - Numerous files within SM include jsapi.h just for this. - The js:: version of those names are visible outside of SpiderMonkey.
Assignee | ||
Comment 1•11 years ago
|
||
This patch moves it into js/src/NamespaceHack.h. Note that I can't do IsPoisonedId() in the new file because it's a function defined in jsapi.h. But it doesn't actually need to be in JS::, so I just moved it to js::. The patch also fixes a bunch of places in Gecko where we had js::Foo instead of JS::Foo. And I had to add some "using namespace JS;" declarations in xpconnect. This change allows numerous |#include "jsapi.h"| statements to be removed, but I'll do them in the next patch.
Attachment #797698 -
Flags: review?(luke)
Assignee | ||
Comment 2•11 years ago
|
||
The majority of these were enabled by the creation of NamespaceHack.h.
Attachment #797727 -
Flags: review?(luke)
Comment 3•11 years ago
|
||
Comment on attachment 797698 [details] [diff] [review] (part 1) - Move the "inject JS:: names into js::" block into its own file, to reduce dependencies on jsapi.h. NamespaceHack.h sounds a bit to self-deprecating for what it is doing; it's a pretty reasonable thing to do. How about NamespaceImports.h?
Attachment #797698 -
Flags: review?(luke) → review+
Updated•11 years ago
|
Attachment #797727 -
Flags: review?(luke) → review+
Assignee | ||
Comment 4•11 years ago
|
||
> NamespaceHack.h sounds a bit to self-deprecating for what it is doing; it's
> a pretty reasonable thing to do. How about NamespaceImports.h?
Sounds good, particularly because I won't have to reorder any of the include statements, which means I won't have a painful rebase for part 2 :)
Assignee | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e60625da760 https://hg.mozilla.org/integration/mozilla-inbound/rev/0dce2a6b6e3d
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3e60625da760 https://hg.mozilla.org/mozilla-central/rev/0dce2a6b6e3d
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Assignee | ||
Updated•11 years ago
|
Summary: (part 1) - Move the "inject JS:: names into js::" block into its own file, to reduce dependencies on jsapi.h. → Move the "inject JS:: names into js::" block into its own file, to reduce dependencies on jsapi.h.
You need to log in
before you can comment on or make changes to this bug.
Description
•