View Message Source + Save Page As gives: ReferenceError: can't access lexical declaration `SAVEMODE_FILEONLY' before initialization contentAreaUtils.js:1359:5
Categories
(Thunderbird :: General, defect)
Tracking
(thunderbird_esr6869+ fixed, thunderbird69 wontfix, thunderbird70 fixed)
People
(Reporter: jorgk-bmo, Assigned: aceman)
Details
Attachments
(1 file, 1 obsolete file)
2.38 KB,
patch
|
jorgk-bmo
:
review+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
ReferenceError: can't access lexical declaration `SAVEMODE_FILEONLY' before initialization contentAreaUtils.js:1359:5
GetSaveModeForContentType chrome://global/content/contentAreaUtils.js:1359
internalSave chrome://global/content/contentAreaUtils.js:466
ViewSourceSavePage chrome://messenger/content/viewSource.js:762
oncommand chrome://messenger/content/viewSource.xul:1
Not working in TB 68 :-(
This fixes the uninitialized constant.
Now the saving fails with:
Security Error: Content at view-source:mailbox:///xxx/Mail/yyy/Sent?number=1 may not load or link to mailbox:///xxx/Mail/yyy/Sent?number=1.
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebBrowserPersist.savePrivacyAwareURI]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://global/content/contentAreaUtils.js :: internalPersist :: line 666" data: no] contentAreaUtils.js:666:13
Reporter | ||
Comment 2•5 years ago
|
||
Do we pass a principal at any stage? Then use a system principal. Surely the two schemes don't match: view-source:mailbox and mailbox:
Reporter | ||
Comment 3•5 years ago
|
||
We've seen this error here: bug 1564094 comment #0.
Good idea, passing system principal helped.
Reporter | ||
Comment 5•5 years ago
|
||
Comment on attachment 9088856 [details] [diff] [review] 1577289.patch v2 Thanks. Great you found the optional principal argument. It works now although the function isn't totally useful, better so just save the message.
Reporter | ||
Updated•5 years ago
|
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/2ecec2c37acf
reorder imports in viewSource.xul to properly initialize SAVEMODE_FILEONLY in contentAreaUtils.js and save the message source using system principal. r=jorgk
Reporter | ||
Comment 7•5 years ago
|
||
TB 68.1 ESR:
https://hg.mozilla.org/releases/comm-esr68/rev/c5df81b5963a8315b3d3f6ffcba172cfb1e7eae3
Reporter | ||
Updated•5 years ago
|
Description
•