Closed Bug 640793 Opened 14 years ago Closed 1 year ago

Come up with a better method for including JS inlines in Gecko

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mrbkap, Unassigned)

Details

See bug 615834 comment 18. The problem is that Gecko #define's free(x) moz_free(x), and this ends up confusing us when we compile js/src/ stuff. Right now, we have some macros that we use to undefine and redefine the Gecko memory stuff, but that leads to Gal being sad. We should do something better.
Bug 632137 is about pretty much this problem.
Good god yes. I've got this in bug 634155, in a different way. jsutil.h is included in some nsHttpSomething file, which turns nsHttpSomeClass::free to nsHttpSomeClass::moz_free. And I can't figure out the pixie dust.
FWIW, I have a patch (built on top of bug 634155), which adds an underscore to {rt,cx}->{malloc,free,realloc,calloc}. If that's the right solution, it's ready to go.
Its simple. jsutil.h should not be exported. nsHttpSomething has no business including anything but jsapi.h. Remove the include dependency.
(In reply to comment #4) > Its simple. jsutil.h should not be exported. nsHttpSomething has no business > including anything but jsapi.h. Remove the include dependency. It's included via jsapi.h.
(In reply to comment #4) > Its simple. jsutil.h should not be exported. nsHttpSomething has no business > including anything but jsapi.h. Remove the include dependency. Well, nsHttpSomethingThatTheJSEngineDoesntKnowAbout would be more correct, otherwise we wouldn't be able to implement our security wrappers. Either we need to figure out our API story for the new stuff or fix this...
Assignee: general → nobody
Severity: normal → S3
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.