Closed
Bug 548341
Opened 15 years ago
Closed 15 years ago
API for privileged access to internals
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: dherman, Assigned: dherman)
Details
Attachments
(1 file, 1 obsolete file)
|
11.79 KB,
patch
|
Details | Diff | Splinter Review |
API's such as ephemeron tables (see bug #547941) need to hide access to internal information that's nonetheless necessary to expose for testing. Propose a simple drop-box API for any special privileged observations that should be conditionally compiled in only for the test harness.
Simple patch with boilerplate forthcoming.
| Assignee | ||
Comment 1•15 years ago
|
||
| Assignee | ||
Updated•15 years ago
|
Attachment #428754 -
Flags: review?(brendan)
Comment 2•15 years ago
|
||
Comment on attachment 428754 [details] [diff] [review]
boilerplate for Internals API
Not sure this helps if we have to --enable-internals for shell builds. Is that on by default?
Andreas should review.
Please fix copied Netscape 1998 license comment boilerplate to use Mozilla Foundation and current year -- exact details matter, again Andreas knows (thanks to Reed, our anal-retentive license comment policy gourmet).
/be
Attachment #428754 -
Flags: review?(brendan) → review?(gal)
| Assignee | ||
Comment 3•15 years ago
|
||
My thought was that it should only be enabled for running tests, but not for public users of the shell and certainly not in the browser. Tests can object-detect and disable themselves:
if (Internals) {
// run the test...
}
so at least that way we can avoid death when JS_HAS_INTERNALS is #ifdef'ed off.
I'll fix the license ASAP and resubmit the patch.
| Assignee | ||
Comment 4•15 years ago
|
||
corrected license, a couple trivial cleanups
Attachment #428754 -
Attachment is obsolete: true
Attachment #428762 -
Flags: review?(gal)
Attachment #428754 -
Flags: review?(gal)
| Assignee | ||
Comment 5•15 years ago
|
||
This isn't worth it. The shell already has lots of these kinds of extra observations implemented in the global object in js.cpp; we can just keep doing that. That's what we should do for bug #547941, too.
Dave
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Comment 6•15 years ago
|
||
(In reply to comment #3)
> My thought was that it should only be enabled for running tests, but not for
> public users of the shell and certainly not in the browser. Tests can
> object-detect and disable themselves:
>
> if (Internals) {
> // run the test...
> }
if (this.Internals), of course ;-).
Yeah, I did not point out the shell testing hacks we've added over the years, since your approach here seemed better for embeddings other than the shell that might also want "internals". But we can keep hacking the shell.
/be
Updated•13 years ago
|
Attachment #428762 -
Flags: review?(gal)
You need to log in
before you can comment on or make changes to this bug.
Description
•