Closed
Bug 238928
Opened 21 years ago
Closed 21 years ago
domstubs.idl should not include nsAString.h
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: mpgritti, Assigned: mpgritti)
Details
Attachments
(2 files)
14.09 KB,
patch
|
benjamin
:
review+
jst
:
superreview+
dbaron
:
approval1.7+
|
Details | Diff | Splinter Review |
14.06 KB,
patch
|
Details | Diff | Splinter Review |
As per #238088 nsStringAPI.h and nsAString.h conflicts. nsAString.h should only
be used by files in the mozilla codebase.
Including it in domstubs.idl we make impossible to use nsIDOMXXX and
nsEmbedString contemporarily by embedding applications.
Comment 1•21 years ago
|
||
This makes the frozen DOM interfaces unusable with the SDK.
Flags: blocking1.7?
Assignee | ||
Comment 2•21 years ago
|
||
Is the Truncate () necessary ?
nsTSubstring SetIsVoid (PR_TRUE) method seem to be doing it already
http://lxr.mozilla.org/mozilla/source/xpcom/string/src/nsTSubstring.cpp#485
Also there is similar SetToNull code without the Truncate () call
http://lxr.mozilla.org/mozilla/source/extensions/webservices/soap/src/nsSOAPUtils.h#175
If so would s/DOMStringIsNull/IsVoid s/SetDOMStringToNull/SetIsVoid(TRUE) be
considered an acceptable solution ? I dont see disadvantages in using the string
api directly but I'm not familiar with either DOM or string code.
The disadvantage to using the string API directly is that it's not frozen so we
don't guarantee binary compatibility.
The easiest solution is probably to move these helpers elsewhere, into something
not included by frozen headers.
Assignee | ||
Comment 5•21 years ago
|
||
Ok, I looked in the dom headers and I couldnt find any good candidate.
Suggestions are welcome.
Maybe nsDOMUtils.cpp/.h is in order ? (IHMO at that point getting rid of the
helpers and use the aString.IsVoid/SetIsVoid in the mozilla DOM implementation
would be cleaner, at least if Truncate() is redundant).
Assignee | ||
Comment 6•21 years ago
|
||
I did not use nsDOMUtils.h because there is a file with the same name in
extensions/
Assignee | ||
Updated•21 years ago
|
Attachment #145028 -
Flags: superreview?(jst)
Attachment #145028 -
Flags: review?(bsmedberg)
Comment 7•21 years ago
|
||
Comment on attachment 145028 [details] [diff] [review]
Move the helpers out to nsDOMString.h
+inline void SetDOMStringToNull(nsAString& aString)
+{
+ aString.Truncate();
+ aString.SetIsVoid(PR_TRUE);
+}
Seems like you can remove the call to Truncate(), as you mentioned earlier.
sr=jst for making this change, I'm sure we'll find more helpers to add to this
header file as we move forward...
Attachment #145028 -
Flags: superreview?(jst) → superreview+
Updated•21 years ago
|
Attachment #145028 -
Flags: review?(bsmedberg)
Attachment #145028 -
Flags: review+
Attachment #145028 -
Flags: approval1.7?
Assignee | ||
Comment 8•21 years ago
|
||
Attachment #145028 -
Flags: approval1.7? → approval1.7+
Comment 9•21 years ago
|
||
fixed-on-trunk for 1.7 final
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•21 years ago
|
Flags: blocking1.7?
Comment 10•14 years ago
|
||
V. based on code inspection.
Assignee: general → mpgritti
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•