Closed
Bug 817818
Opened 13 years ago
Closed 12 years ago
Miscellaneous rooting fixes
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: sfink, Assigned: sfink)
References
Details
Attachments
(1 file)
40.63 KB,
patch
|
terrence
:
review+
sfink
:
checkin+
|
Details | Diff | Splinter Review |
A collection of fixes that I have accumulated while working on various things.
Assignee | ||
Comment 1•13 years ago
|
||
I should really mark this f? instead of r?, since you're going to r- it for the UnrootedScript/UnrootedFunction stuff. I really ought to add some more general header-setting to bzexport...
Anyway, this r? is really a question about how to declare RawT and UnrootedT. I couldn't just use your existing ForwardDeclare(type) #define because:
1. The 'JS' removal in JSScript -> UnrootedScript
2. Namespaces. JSScript is in the global namespace. Unrooted<T> is inside js::gc::, I think. UnrootedScript probably ought to end up in JS or somewhere.
3. class vs struct -- currently, you forward-declare a class. JSScript is a struct. MSVC, at least, isn't going to be happy about that.
Attachment #687951 -
Flags: review?(terrence)
Comment 2•13 years ago
|
||
Comment on attachment 687951 [details] [diff] [review]
Miscellaneous rooting fixes
Review of attachment 687951 [details] [diff] [review]:
-----------------------------------------------------------------
I've currently got all of the changes you made to script pointers in a separate patch, so this saves me a bit of work. I'm going to go ahead and r+ this under the assumption that we will be able to hammer out a decision on what to do about the forward declarations today. Even if we don't, it's easy enough to fix later.
What I have right now is this unbelievable ugly hack:
# define ForwardDeclareJS(type) \
class JS##type; \
namespace js { \
typedef Unrooted<JS##type*> Unrooted##type; \
typedef JS##type * Raw##type; \
} \
class JS##type
Also, thank you for the reminder abound |struct|! Maybe this would be a good time to make these |class JSFoo { public: }|?
Attachment #687951 -
Flags: review?(terrence) → review+
Assignee | ||
Updated•12 years ago
|
Attachment #687951 -
Flags: checkin+
Assignee | ||
Comment 3•12 years ago
|
||
Comment 4•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
This landed with the struct/class mismatch problem that spews warnings on MSVC :-(
You need to log in
before you can comment on or make changes to this bug.
Description
•