Closed Bug 1027095 Opened 10 years ago Closed 10 years ago

Convert XPathResult to WebIDL bindings

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: peterv, Assigned: peterv)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

      No description provided.
Attached patch Move files and rename class v1 (deleted) — Splinter Review
Attachment #8442408 - Flags: review?(bzbarsky)
Attachment #8442410 - Flags: review?(bzbarsky)
Comment on attachment 8442408 [details] [diff] [review]
Move files and rename class v1

Need a bug number in the commit message.

r=me
Attachment #8442408 - Flags: review?(bzbarsky) → review+
Comment on attachment 8442410 [details] [diff] [review]
Add WebIDL API and switch to the WebIDL binding v1

>+++ b/content/xul/templates/src/nsXMLBinding.cpp
> nsXMLBindingValues::GetNodeAssignmentFor(nsXULTemplateResultXML* aResult,
>+    CallQueryInterface(result->GetSingleNodeValue(rv), aNode);

GetSingleNodeValue() can return null, no?  CallQI is not null-safe.

>+++ b/dom/xslt/xpath/txXPathTreeWalker.h
>+        return CallQueryInterface(getNode(aNode), aResult);

Is that known non-null?

r=me modulo that
Attachment #8442410 - Flags: review?(bzbarsky) → review+
(In reply to Boris Zbarsky [:bz] from comment #4)
> GetSingleNodeValue() can return null, no?  CallQI is not null-safe.

Good catch, made a last-minute change and didn't think it through.

> Is that known non-null?

Should be, yes. We don't allow creating invalid node "wrappers".

https://hg.mozilla.org/integration/mozilla-inbound/rev/aa8fd3a1f130
https://hg.mozilla.org/integration/mozilla-inbound/rev/11cb9168a860
https://hg.mozilla.org/mozilla-central/rev/aa8fd3a1f130
https://hg.mozilla.org/mozilla-central/rev/11cb9168a860
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: