Closed Bug 282792 Opened 20 years ago Closed 20 years ago

guarantee existence of the binding manager

Categories

(Core :: XBL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bryner, Assigned: bryner)

Details

Attachments

(2 files)

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().
Attached patch patch (deleted) — Splinter Review
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+
checked in
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: