Closed
Bug 1369246
Opened 8 years ago
Closed 7 years ago
startPersistence crashes in GetSubdocumentWithOuterWindowId
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla55
People
(Reporter: Oriol, Assigned: Oriol)
References
Details
(Keywords: crash, crashreportid, regression)
Crash Data
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
Open the browser console, and run this code:
gBrowser.selectedTab = gBrowser.addTab("about:newtab");
var aBrowser = gBrowser.selectedBrowser;
window.open("about:home");
var persistable = aBrowser.QueryInterface(Ci.nsIFrameLoaderOwner)
.frameLoader.QueryInterface(Ci.nsIWebBrowserPersistable);
persistable.startPersistence(1234, {
onDocumentReady: function(document) {
console.log("startPersistence succeeded with no crash");
},
onError: function(status) {
throw new Error("startPersistence failed with no crash");
}
});
Firefox crashes.
https://crash-stats.mozilla.com/report/index/71781656-b386-4b59-a771-387f20170601
Regression window: https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=54eea211e234217c0faa8c05bf4de9fd3005f5c2&tochange=b2a3dc4b161fdfac6db78cc5bbfb1f53a383b65a
I guess it's bug 1241764.
Assignee | ||
Comment 1•8 years ago
|
||
I don't have much idea about these window pointers but this seems to work.
Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Attachment #8873266 -
Flags: review?(amarchesini)
Comment 2•8 years ago
|
||
Comment on attachment 8873266 [details] [diff] [review]
window-fixcrash.patch
Review of attachment 8873266 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/base/nsContentUtils.cpp
@@ +4448,5 @@
> if (!aDocument || !aOuterWindowId) {
> return nullptr;
> }
>
> + nsGlobalWindow* window = nsGlobalWindow::GetOuterWindowWithId(aOuterWindowId);
RefPtr<window> nsGlobalWindow::GetOuterWindowWithId(aOuterWindowId);
Attachment #8873266 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #2)
> RefPtr<window> nsGlobalWindow::GetOuterWindowWithId(aOuterWindowId);
Changing to that produces a compile error:
> 'RefPtr': 'window' is not a valid template type argument for parameter 'T'
Flags: needinfo?(amarchesini)
Comment 4•7 years ago
|
||
Sorry I meant:
RefPtr<nsGlobalWindow> window = nsGlobalWindow::GetOuterWindowWithId(aOuterWindowId);
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8873266 -
Attachment is obsolete: true
Attachment #8873402 -
Flags: review?(amarchesini)
Updated•7 years ago
|
Attachment #8873402 -
Flags: review?(amarchesini) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c52cd79ee39d
Check if window pointer is null before attempting to call a method. r=baku
Keywords: checkin-needed
Comment 7•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Wontfix for 54 since we're shipping 54 next week.
Updated•7 years ago
|
status-firefox-esr52:
--- → wontfix
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•