Last Comment Bug 739531 - Can't duplicate a tab with designMode and no body
: Can't duplicate a tab with designMode and no body
Status: VERIFIED FIXED
[fixed-in-fx-team]
:
Product: Firefox
Classification: Client Software
Component: Session Restore (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 15
Assigned To: Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
:
: Mike de Boer [:mikedeboer]
Mentors:
https://bug713417.bugzilla.mozilla.or...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-26 23:26 PDT by Paul Silaghi, QA [:pauly]
Modified: 2012-05-28 07:14 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v0.1 (2.03 KB, patch)
2012-03-27 14:37 PDT, Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
dietrich: feedback+
Details | Diff | Splinter Review
Patch v0.2 (4.92 KB, patch)
2012-05-23 14:29 PDT, Paul O'Shannessy [:zpao] (not reading much bugmail, email directly)
ttaubert: review+
Details | Diff | Splinter Review

Description Paul Silaghi, QA [:pauly] 2012-03-26 23:26:23 PDT
STR:
1. Open https://bug713417.bugzilla.mozilla.org/attachment.cgi?id=584240
2. Try to duplicate the tab (hold CTRL key and drag the tab to the right)

Actual results:
Nothing happens

Expected results:
The tab should duplicate

Note:
Reproducible on FF 14 (2012-03-26) on all platforms
Comment 1 Jesse Ruderman 2012-03-26 23:52:13 PDT
The error console shows:

Error: uncaught exception: [Exception... "'[JavaScript Error: "aContent.document.body is null" {file: "resource:///components/nsSessionStore.js" line: 2176}]' when calling method: [nsISessionStore::duplicateTab]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://browser/content/tabbrowser.xml :: duplicateTab :: line 2189"  data: yes]

http://hg.mozilla.org/mozilla-central/annotate/a30fd69f1e0c/browser/components/sessionstore/src/nsSessionStore.js#l2193 assumes the document has a body element, and throws when the assumption doesn't hold.

(To reproduce on Mac, hold Option rather than Ctrl.)
Comment 2 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2012-03-27 14:37:42 PDT
Created attachment 609890 [details] [diff] [review]
Patch v0.1

This does the trick. I covered both ends - saving & restoring - in case we do save data & try to restore into a document we no longer can.
Comment 3 Dietrich Ayala (:dietrich) 2012-03-28 11:56:27 PDT
Comment on attachment 609890 [details] [diff] [review]
Patch v0.1

Review of attachment 609890 [details] [diff] [review]:
-----------------------------------------------------------------

looks good. should be easily testable, will r+ with that.
Comment 4 Paul O'Shannessy [:zpao] (not reading much bugmail, email directly) 2012-05-23 14:29:04 PDT
Created attachment 626593 [details] [diff] [review]
Patch v0.2

Cleaning out my assigned bugs and this was easy enough to finish up.
Comment 5 Tim Taubert [:ttaubert] 2012-05-25 01:45:35 PDT
https://hg.mozilla.org/integration/fx-team/rev/41fdd17ee9d3
Comment 6 Rob Campbell [:rc] (:robcee) 2012-05-26 10:28:07 PDT
https://hg.mozilla.org/mozilla-central/rev/41fdd17ee9d3
Comment 7 Paul Silaghi, QA [:pauly] 2012-05-28 07:14:28 PDT
Duplication works ok now. Verified fixed on FF 15.0a1 (2012-05-27) on Win 7, Ubuntu 12.04 and Mac OS X 10.6.

Note You need to log in before you can comment on or make changes to this bug.