Closed Bug 201610 Opened 21 years ago Closed 21 years ago

nsWebBrowserPersist::CancelSave doesn't cancel uploads (publishing)

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.4final

People

(Reporter: jag+mozilla, Assigned: adamlock)

References

()

Details

(Keywords: topembed+, Whiteboard: [adt2])

Attachments

(2 files)

It looks like the EnumCleanupUploadList callback (and prolly some other stuff)
needs some work to fetch the channel for the upload and cancel it.

Before testing on this can be done, bug 201609 needs to be fixed. To test,
create a simple html file with a biiiiig picture embedded, log into your
destination ftp site, and publish the html + img there. Cancel publishing, and
notice (using e.g. ls) how the filesize keeps growing way past you pressing
cancel, up to the full filesize.
Blocks: 201609
--> adamlock
Assignee: jfrancis → adamlock
publishing -> chris.
QA Contact: sairuh → petersen
Editor triage team: nsbeta1+/adt2
Keywords: nsbeta1nsbeta1+
Whiteboard: [adt2]
The UploadList uses the channel as the hash key, so the EnumCleanupUploadList
function should probably do something similar to EnumCleanupOutputMap, calling
channel->Cancel(NS_BINDING_ABORTED) but using the channel QI'd from the
nsISupportsKey associated with each item.
Sounds good. Will you be able to get around to this before 1.4b?
Attached patch PatchSplinter Review
Patch does what I suggested previously, canceling the channel stored in the
hash key
Comment on attachment 120829 [details] [diff] [review]
Patch

Requesting r/sr on this
Attachment #120829 - Flags: superreview?(jaggernaut)
Attachment #120829 - Flags: review?(brade)
Comment on attachment 120829 [details] [diff] [review]
Patch

r=brade for these changes

I think we probably also want to check mCancel in this block:
676	if (mOutputMap.Count() == 0 && mUploadList.Count() == 0)
677	{
678	    // if no documents left in mDocList, --> done
679	    // if we have no files left to serialize and no error result, -->
done
680	    if (mDocList.Count() == 0
681		|| (!SerializeNextFile() && NS_SUCCEEDED(mPersistResult)))
682	    {
683		completed = PR_TRUE;
684	    }
685	}

That can be done as a separate patch if preferred.
Attachment #120829 - Flags: review?(brade) → review+
Comment on attachment 120829 [details] [diff] [review]
Patch

sr=jag
Attachment #120829 - Flags: superreview?(jaggernaut) → superreview+
Patch was checked in today. I'll leave the bug open to cover the other issue.
ADT: Nominating topembed
Keywords: topembed
ADT: Nominating topembed
Comment on attachment 120829 [details] [diff] [review]
Patch

Requesting 1.4 checkin approval. Fixes cancel in composer upload operations
Attachment #120829 - Flags: approval1.4?
Target Milestone: --- → mozilla1.4final
That patch was already checked in. This bug was left open to deal with the other
issue brade brought up in comment 8.
Comment on attachment 120829 [details] [diff] [review]
Patch

Doh! I should read my bugs more carefully in future
Attachment #120829 - Flags: approval1.4?
Discussed in topembed bug triage.  Plussing.  This plus is for comment 8.
Keywords: topembedtopembed+
Attached patch Patch 2Splinter Review
This patch protects the SerializeNextFile() call by checking mCancel.
Comment on attachment 123888 [details] [diff] [review]
Patch 2

Requesting r/sr on this simple check for !mCancel around the call to
SerializeNextFile
Attachment #123888 - Flags: superreview?(jaggernaut)
Attachment #123888 - Flags: review?(brade)
Comment on attachment 123888 [details] [diff] [review]
Patch 2

sr=jag
Attachment #123888 - Flags: superreview?(jaggernaut) → superreview+
Comment on attachment 123888 [details] [diff] [review]
Patch 2

r=brade
seeking a= for 1.4final to fix cancellation issues; this is a simple 1-line fix
Attachment #123888 - Flags: review?(brade)
Attachment #123888 - Flags: review+
Attachment #123888 - Flags: approval1.4?
Comment on attachment 123888 [details] [diff] [review]
Patch 2

a=asa (on behalf of drivers) for checkin to 1.4.
Attachment #123888 - Flags: approval1.4? → approval1.4+
Fix is checked in
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Verified on trunk (2003-06-11-08) and branch (2003-06-11-05) Macho and win32
branch builds.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: