Closed
Bug 993435
Opened 10 years ago
Closed 10 years ago
Crash getting 'navigator.connection' from closed window
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
FIXED
mozilla31
Tracking | Status | |
---|---|---|
firefox31 | - | --- |
People
(Reporter: jruderman, Assigned: johnshih.bugs)
References
Details
(Keywords: crash, testcase)
Crash Data
Attachments
(4 files)
No description provided.
Reporter | ||
Updated•10 years ago
|
Attachment #8403330 -
Attachment description: testcase (crashes Firefox when loaded) → testcase (requires popups) (crashes Firefox when loaded)
Reporter | ||
Comment 1•10 years ago
|
||
Reporter | ||
Comment 2•10 years ago
|
||
Reporter | ||
Comment 3•10 years ago
|
||
bp-1ebe5cd6-3690-404e-a0d0-787532140408
Crash Signature: [@ mozilla::dom::WrapNewBindingObjectHelper<nsRefPtr<mozilla::dom::network::Connection>, true>::Wrap(JSContext*, JS::Handle<JSObject*>, nsRefPtr<mozilla::dom::network::Connection> const&, JS::MutableHandle<JS::Value>) ]
Comment 4•10 years ago
|
||
This is a regression from bug 960426. In particular, this change: 1.16 - readonly attribute MozConnection? mozConnection; 1.18 + readonly attribute NetworkInformation connection; but the actual getter can in fact return null, no? NS_ENSURE_TRUE(mWindow->GetDocShell(), nullptr);
tracking-firefox31:
--- → ?
Flags: needinfo?(jshih)
(In reply to Boris Zbarsky [:bz] from comment #4) > This is a regression from bug 960426. In particular, this change: > > 1.16 - readonly attribute MozConnection? mozConnection; > 1.18 + readonly attribute NetworkInformation connection; > > but the actual getter can in fact return null, no? > > NS_ENSURE_TRUE(mWindow->GetDocShell(), nullptr); It's a bug, I'll fix it.
Assignee: nobody → jshih
Flags: needinfo?(jshih)
Comment 6•10 years ago
|
||
I think we should make this [Throws] and throw an exception in the error condition.
(In reply to :Ehsan Akhgari (lagging on bugmail, needinfo? me!) from comment #6) > I think we should make this [Throws] and throw an exception in the error > condition. Yeah, I think we already do that. The bug is due to I didn't remove "NS_ENSURE_TRUE(mWindow->GetDocShell(), nullptr);" as Boris pointed out when change the API to non-nullable.
I've verified the crash isn't reproducible after applying the patch.
Attachment #8403728 -
Flags: review?(bzbarsky)
Can you have a double check? Thanks very much!
Flags: needinfo?(jruderman)
Comment 10•10 years ago
|
||
Comment on attachment 8403728 [details] [diff] [review] Bug 993435 - Not return null for navigator.connection. r=bz r=me as long as the Connection object doesn't depend on there being a docshell.
Attachment #8403728 -
Flags: review?(bzbarsky) → review+
Keywords: checkin-needed
Comment 11•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc31b43ccafe
Keywords: checkin-needed
Comment 12•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fc31b43ccafe
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 13•10 years ago
|
||
Since this is not a regression and has been resolved not going to track this
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•