Closed
Bug 324092
Opened 19 years ago
Closed 18 years ago
Allow output handlers to fail
Categories
(Core :: XSLT, defect)
Core
XSLT
Tracking
()
RESOLVED
FIXED
People
(Reporter: sicking, Assigned: sicking)
References
Details
Attachments
(2 files)
98.16 KB,
patch
|
Details | Diff | Splinter Review | |
94.86 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
Currently all functions on the output handler interface returns void making it impossible for the output handler to fail.
Patch coming up.
Assignee | ||
Comment 1•19 years ago
|
||
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #209060 -
Flags: superreview?(peterv)
Attachment #209060 -
Flags: review?(peterv)
Comment 3•19 years ago
|
||
Comment on attachment 209060 [details] [diff] [review]
Patch to fix -w
>Index: xslt/src/xslt/txMozillaXMLOutput.cpp
>===================================================================
>+nsresult
>+txMozillaXMLOutput::endDocument(nsresult aResult)
> {
>- closePrevious(eCloseElement | eFlushText);
>+ if (NS_FAILED(aResult)) {
>+ if (mNotifier) {
>+ mNotifier->OnTransformEnd(aResult);
>+ }
>+
>+ return NS_OK;
>+ }
>+
>+ nsresult rv = closePrevious(eCloseElement | eFlushText);
>+ NS_ENSURE_SUCCESS(rv, rv);
Doesn't this need to call OnTransformEnd?
>+
> // This should really be handled by nsIDocument::Reset
> if (mCreatingNewDocument && !mHaveTitleElement) {
> nsCOMPtr<nsIDOMNSDocument> domDoc = do_QueryInterface(mDocument);
> if (domDoc) {
> domDoc->SetTitle(EmptyString());
> }
> }
>
>@@ -221,29 +238,32 @@ void txMozillaXMLOutput::endDocument(nsr
> if (refURI) {
> refURI->SetupRefreshURIFromHeader(doc->GetBaseURI(),
> mRefreshString);
> }
> }
> }
>
> if (mNotifier) {
>- mNotifier->OnTransformEnd(aResult);
>+ mNotifier->OnTransformEnd();
> txTransformNotifier::AddScriptElement(nsIScriptElement* aElement)
> {
>- mScriptElements.AppendObject(aElement);
>+ return mScriptElements.AppendObject(aElement) ? NS_OK
>+ : NS_ERROR_OUT_OF_MEMORY;
return mScriptElements.AppendObject(aElement) ? NS_OK :
NS_ERROR_OUT_OF_MEMORY;
> txTransformNotifier::AddStyleSheet(nsIStyleSheet* aStyleSheet)
> {
>- mStylesheets.AppendObject(aStyleSheet);
>+ return mStylesheets.AppendObject(aStyleSheet) ? NS_OK
>+ : NS_ERROR_OUT_OF_MEMORY;
return mStylesheets.AppendObject(aStyleSheet) ? NS_OK :
NS_ERROR_OUT_OF_MEMORY;
Attachment #209060 -
Flags: superreview?(peterv)
Attachment #209060 -
Flags: superreview+
Attachment #209060 -
Flags: review?(peterv)
Attachment #209060 -
Flags: review+
Assignee | ||
Comment 5•18 years ago
|
||
This was fixed long ago.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•