If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

guarantee existence of the binding manager

RESOLVED FIXED

Status

()

Core
XBL
RESOLVED FIXED
13 years ago
13 years ago

People

(Reporter: Brian Ryner (not reading), Assigned: Brian Ryner (not reading))

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

13 years ago
We check, very inconsistently, for a null binding manager on documents.  Since
documents create the binding manager up-front, we can just make this part of
Init(), and callers need not check for a null binding manager.  As part of this,
we should rename nsIDocument::GetBindingManager() to BindingManager().
(Assignee)

Comment 1

13 years ago
Created attachment 174752 [details] [diff] [review]
patch
(Assignee)

Comment 2

13 years ago
Created attachment 174753 [details] [diff] [review]
patch with -w for easier reviewing
Attachment #174753 - Flags: superreview?(bzbarsky)
Attachment #174753 - Flags: review?(bzbarsky)
Comment on attachment 174753 [details] [diff] [review]
patch with -w for easier reviewing

>Index: extensions/inspector/base/src/inDeepTreeWalker.cpp
>       nsCOMPtr<nsIBindingManager> bindingManager = inLayoutUtils::GetBindingManagerFor(aNode);
>       nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
>-      if (bindingManager) {

No, this still needs a null-check, I think.  If aNode has a null ownerDocument,
inLayoutUtils::GetBindingManagerFor() will return null....

r+sr=bzbarsky with this change reverted (and the else reinstated).
Attachment #174753 - Flags: superreview?(bzbarsky)
Attachment #174753 - Flags: superreview+
Attachment #174753 - Flags: review?(bzbarsky)
Attachment #174753 - Flags: review+
(Assignee)

Comment 4

13 years ago
checked in
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.