Closed Bug 277475 Opened 20 years ago Closed 20 years ago

output w/ value attr broken when inside group or switch

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 265467
mozilla1.8beta1

People

(Reporter: darin.moz, Assigned: darin.moz)

References

()

Details

(Whiteboard: [fixed XFORMS_20050106_BRANCH])

Attachments

(1 file)

output w/ value attr broken when inside group or switch
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
Attached patch v1 patchSplinter Review
Attachment #170607 - Flags: review?(smaug)
Attachment #170607 - Flags: review?(smaug) → review+
Attachment #170607 - Flags: superreview?(bryner)
Attachment #170607 - Flags: superreview?(bryner) → superreview+
I'm not too happy with ignoring the return result, that sort of defies its purpose. There is a problem, yes, but it lies somewhere else. I'd rather not see this patch committed.
Allan: the point is that EvaluateNodeBinding throws an exception to indicate that it cannot evalate the node binding (for whatever reason). but, we don't want to propagate that exception. that is not an exception from the point of view of our caller. you seem to be proposing a change to EvaluateNodeBinding such that it does not throw an exception in this case. i agree, that would work too, but then that would impact other callers of EvaluateNodeBinding who might depend on that exception being thrown.
(In reply to comment #3) > you seem to be proposing a change to EvaluateNodeBinding > such that it does not throw an exception in this case. i agree, that would work > too, but then that would impact other callers of EvaluateNodeBinding who might > depend on that exception being thrown. My opinion is that if an exception is thrown, it should not be ignored. The other callers should be fixed then. My ever-growing patch in bug 265467 has proper implementation and handling of EvaluateNodeBinding().
> My opinion is that if an exception is thrown, it should not be ignored. The > other callers should be fixed then. In general, yes.. thrown exceptions should not be ignored. But, we are not really "ignoring" the exception here. Instead, we are blanket catching all exceptions and treating them as non-fatal errors. In other words, the caller of EvaluateNodeBinding knows that exceptions will be thrown when the element does not have the required attributes to satisfy the EvaulateNodeBinding call. But, that is not an exceptional condition from the point of view of the <group> or <repeat> element. It has a code path it wants to take when those exceptions occur. So, it just turns out that "ignoring" the return value of EvaluateNodeBinding yields that code path (and involves little code). What I am doing effectively is making the GetContext method return NS_OK with a NULL context out-param to specify that there is no context information. That seems better than adding checks to all of the callers to check for an exception. Then the caller only has to check the out-param to see if it is NULL. NOTE: nsIXFormsContextControl::GetContext refers to the possibility of an empty model ID being returned. That seems consistent with the way I am changing the implementation here. The documentation also doesn't say anything about throwing exceptions to indicate that there is no context.
fixed on XFORMS_20050106_BRANCH
Whiteboard: [fixed XFORMS_20050106_BRANCH]
*** Bug 275105 has been marked as a duplicate of this bug. ***
Fixed in bug 265467. *** This bug has been marked as a duplicate of 265467 ***
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: