Closed
Bug 191800
Opened 22 years ago
Closed 22 years ago
Move FIXptr and XPointer into xmlextras
Categories
(Core :: XML, defect)
Core
XML
Tracking
()
RESOLVED
FIXED
mozilla1.4beta
People
(Reporter: hjtoi-bugzilla, Assigned: hjtoi-bugzilla)
References
Details
(Keywords: memory-footprint)
Attachments
(1 file, 3 obsolete files)
56.35 KB,
patch
|
harishd
:
review+
hjtoi-bugzilla
:
superreview+
|
Details | Diff | Splinter Review |
FIXptr (and XPointer when it lands) live in content/xml/document. However, they
are so rarely used that it would make sense to move their implementation to
xmlextras.
Updated•22 years ago
|
Summary: Move FIXptr and XPointer into xmlextras → Move FIXptr and XPointer into xmlextras
Assignee | ||
Comment 1•22 years ago
|
||
Filename change also needed, see
http://bugzilla.mozilla.org/show_bug.cgi?id=182323#c30
Another issues that could be done here as well is to switch into string
iterators where appropriate, and lazily evaluate result from XPath.
Assignee | ||
Comment 2•22 years ago
|
||
Assignee | ||
Comment 3•22 years ago
|
||
Assignee | ||
Comment 4•22 years ago
|
||
leaf: Could you copy 4 files on the CVS server for me, see the second attachment
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•22 years ago
|
||
Add this to nsXMLExtrasModule.cpp:
rv = catman->AddCategoryEntry(JAVASCRIPT_DOM_CLASS,
"XPointerResult",
XMLEXTRAS_DOMCI_EXTENSION_CONTRACTID,
PR_TRUE, PR_TRUE, getter_Copies(previous));
NS_ENSURE_SUCCESS(rv, rv);
and everything will work. There is one thing that I do not like, though. You can
now do this in JS: |new XPointerResult|. That should not work; the only way to
get XPointerResult object should be the return value from
document.evaluateXPointer(). How do I make that happen?
Comment 6•22 years ago
|
||
Hmm, you could try JAVASCRIPT_DOM_INTERFACE but I'm not sure it'll work since
your interface name is the same as your class name (XPointerResult).
Assignee | ||
Comment 7•22 years ago
|
||
jst thinks there is no way to do what I want currently, so we should file a bug
to dynamically add script accessible objects that cannot be created directly.
I will attach a cleaned up patch with this problem still present that can be
fixed later once the infrastructure is in place. There are other objects like
this besides XPointerResult: at least SOAPFault.
Assignee | ||
Comment 8•22 years ago
|
||
Proposed fix, minus changes in nsFIXptr.* and nsXPointer.* (I need leaf to copy
the files on the CVS server for that).
Attachment #120883 -
Attachment is obsolete: true
Assignee | ||
Comment 9•22 years ago
|
||
So there is a way to make it impossible to create objects with new, and that was
to pass null instead of CID as the last parameter to macro
NS_DOMCI_EXTENSION_ENTRY_END_NO_PRIMARY_IF(). Did that, and now |new
XPointerResult()| will throw exception "cannot create object in this context"
which is ok.
Assignee | ||
Comment 10•22 years ago
|
||
leaf copied the files on the CVS server so this is now the final (?) complete
fix.
Attachment #120884 -
Attachment is obsolete: true
Attachment #121004 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #121330 -
Flags: superreview?(jst)
Attachment #121330 -
Flags: review?(harishd)
Comment 11•22 years ago
|
||
Comment on attachment 121330 [details] [diff] [review]
Proposed fix
sr=jst
Attachment #121330 -
Flags: superreview?(jst) → superreview+
Comment 12•22 years ago
|
||
Comment on attachment 121330 [details] [diff] [review]
Proposed fix
r=harishd
Attachment #121330 -
Flags: superreview?(jst)
Attachment #121330 -
Flags: superreview+
Attachment #121330 -
Flags: review?(harishd)
Attachment #121330 -
Flags: review+
Assignee | ||
Comment 13•22 years ago
|
||
Comment on attachment 121330 [details] [diff] [review]
Proposed fix
harishd wiped this out - it was sr=jst earlier
Attachment #121330 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 14•22 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•