Closed
Bug 82845
Opened 23 years ago
Closed 23 years ago
Add private data type flags for JSContext
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla0.9.4
People
(Reporter: jst, Assigned: brendan)
Details
(Keywords: js1.5)
Attachments
(1 file)
6.29 KB,
patch
|
Details | Diff | Splinter Review |
Currently there's no way to know anything about the type of private data held in a JSContext, all you get is a void*. This makes it unsafe to call JS_GetContextPrivate() and cast the void* to something like a nsISupports* and then calling QuertyInterface() on that pointer. We need something like the JSClass->flags and a set of flags (one of which should be equvalent of JSCLASS_PRIVATE_IS_NSISUPPORTS) to bullet proof code that accesses the private data in JSContext's. Maybe something like: extern JS_PUBLIC_API(uint32) JS_GetContextFlags(JSContext *cx);
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Keywords: js1.5,
mozilla0.9.2
Priority: -- → P3
Target Milestone: --- → mozilla0.9.2
Updated•23 years ago
|
Target Milestone: mozilla0.9.2 → mozilla0.9.3
Assignee | ||
Comment 1•23 years ago
|
||
Too easy not to do soon. Hey, maybe I'll sneak this into the FastLoad branch. /be
Keywords: mozilla0.9.2 → mozilla0.9.4
Target Milestone: mozilla0.9.3 → mozilla0.9.4
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
I don't feel the need to bloat JSContext with yet another word when so many bits remain unallocated from cx->options. Thus, JSOPTION_PRIVATE_IS_NSISUPPORTS and code to test and set it in dom/src/base and js/src/xpconnect/src. The changes to nsGlobalWindow.cpp are :: madness before JS_Foo() and a needed initializer for a cx variable that could be used before set (in the unlikely event that the xpconnect per-thread context stack is unavailable). Cc'ing review pals. /be
Comment 4•23 years ago
|
||
cool. r/sr=waterson
Reporter | ||
Comment 5•23 years ago
|
||
sr=jst, I like it!
Assignee | ||
Comment 6•23 years ago
|
||
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•