Open
Bug 988096
Opened 11 years ago
Updated 3 years ago
Lazily load PeerConnection.js
Categories
(Core :: WebRTC, defect, P5)
Core
WebRTC
Tracking
()
NEW
| backlog | webrtc/webaudio+ |
People
(Reporter: mz_mhs-ctb, Assigned: jib)
References
Details
(Whiteboard: [memshrink:P3])
This shouldn't be needed at startup.
Updated•11 years ago
|
Assignee: nobody → mreavy
Updated•11 years ago
|
Assignee: mreavy → jib
Whiteboard: [memshrink]
Updated•11 years ago
|
Whiteboard: [memshrink] → [memshrink:P3]
Comment 1•11 years ago
|
||
Bug 996989 is related.
Updated•10 years ago
|
Rank: 42
Priority: -- → P4
Updated•10 years ago
|
backlog: --- → webRTC+
Comment 2•9 years ago
|
||
It's not clear to me how we would lazily load this, I don't see it imported anywhere. The best I can tell is it's loaded due to a |do_GetService(IPEERCONNECTION_MANAGER_CONTRACTID)| call [1] in |nsDocument::CanSavePresentation|.
Maybe I'm missing some sort of implicit loading elsewhere?
[1] https://dxr.mozilla.org/mozilla-central/rev/91c2b9d5c1354ca79e5b174591dbb03b32b15bbf/dom/base/nsDocument.cpp#8351-8361
Flags: needinfo?(mz_mhs-ctb)
Comment 3•9 years ago
|
||
CanSavePresentation is used for killing peerconnections when you navigate so they're not held alive in the cache.
It's implicitly loaded elsewhere I believe:
dom/media/bridge/MediaModule.cpp:
namespace mozilla
{
// Factory defined in mozilla::, defines mozilla::PeerConnectionImplConstructor
NS_GENERIC_FACTORY_CONSTRUCTOR(PeerConnectionImpl)
}
$ grep -r "PeerConnection\.js" *
browser/installer/package-manifest.in:@RESPATH@/components/PeerConnection.js
dom/webidl/PeerConnectionImpl.webidl: * PeerConnection.js' interface to the C++ PeerConnectionImpl.
dom/media/PeerConnection.manifest:component {bdc2e533-b308-4708-ac8e-a8bfade6d851} PeerConnection.js
dom/media/PeerConnection.manifest:component {d1748d4c-7f6a-4dc5-add6-d55b7678537e} PeerConnection.js
dom/media/PeerConnection.manifest:component {02b9970c-433d-4cc2-923d-f7028ac66073} PeerConnection.js
dom/media/PeerConnection.manifest:component {1775081b-b62d-4954-8ffe-a067bbf508a7} PeerConnection.js
dom/media/PeerConnection.manifest:component {7293e901-2be3-4c02-b4bd-cbef6fc24f78} PeerConnection.js
dom/media/PeerConnection.manifest:component {7fe6e18b-0da3-4056-bf3b-440ef3809e06} PeerConnection.js
dom/media/PeerConnection.manifest:component {0fb47c47-a205-4583-a9fc-cbadf8c95880} PeerConnection.js
dom/media/PeerConnection.manifest:component {4fff5d46-d827-4cd4-a970-8fd53977440e} PeerConnection.js
dom/media/PeerConnection.manifest:component {d974b814-8fde-411c-8c45-b86791b81030} PeerConnection.js
dom/media/PeerConnection.manifest:component {74b2122d-65a8-4824-aa9e-3d664cb75dc2} PeerConnection.js
dom/media/tests/mochitest/test_peerConnection_bug834153.html: title: "Queue CreateAnswer in PeerConnection.js"
dom/media/bridge/IPeerConnection.idl: * Manager interface to PeerConnection.js so it is accessible from C++.
dom/media/moz.build: 'PeerConnection.js',
mobile/android/installer/package-manifest.in:@BINPATH@/components/PeerConnection.js
obj-debug/_build_manifests/install/dist_bin:1^_components/PeerConnection.js^_/home/jesup/src/mozilla/inbound/dom/media/PeerConnection.js
obj-debug/faster/install_dist_bin:1^_components/PeerConnection.js^_/home/jesup/src/mozilla/inbound/dom/media/PeerConnection.js
Comment 4•9 years ago
|
||
(In reply to Randell Jesup [:jesup] from comment #3)
> CanSavePresentation is used for killing peerconnections when you navigate so
> they're not held alive in the cache.
>
> It's implicitly loaded elsewhere I believe:
> dom/media/bridge/MediaModule.cpp:
>
> namespace mozilla
> {
> // Factory defined in mozilla::, defines
> mozilla::PeerConnectionImplConstructor
> NS_GENERIC_FACTORY_CONSTRUCTOR(PeerConnectionImpl)
> }
>
>
> $ grep -r "PeerConnection\.js" *
> browser/installer/package-manifest.in:@RESPATH@/components/PeerConnection.js
> dom/webidl/PeerConnectionImpl.webidl: * PeerConnection.js' interface to the
> C++ PeerConnectionImpl.
> dom/media/PeerConnection.manifest:component
> {bdc2e533-b308-4708-ac8e-a8bfade6d851} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {d1748d4c-7f6a-4dc5-add6-d55b7678537e} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {02b9970c-433d-4cc2-923d-f7028ac66073} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {1775081b-b62d-4954-8ffe-a067bbf508a7} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {7293e901-2be3-4c02-b4bd-cbef6fc24f78} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {7fe6e18b-0da3-4056-bf3b-440ef3809e06} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {0fb47c47-a205-4583-a9fc-cbadf8c95880} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {4fff5d46-d827-4cd4-a970-8fd53977440e} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {d974b814-8fde-411c-8c45-b86791b81030} PeerConnection.js
> dom/media/PeerConnection.manifest:component
> {74b2122d-65a8-4824-aa9e-3d664cb75dc2} PeerConnection.js
> dom/media/tests/mochitest/test_peerConnection_bug834153.html: title:
> "Queue CreateAnswer in PeerConnection.js"
> dom/media/bridge/IPeerConnection.idl: * Manager interface to
> PeerConnection.js so it is accessible from C++.
> dom/media/moz.build: 'PeerConnection.js',
> mobile/android/installer/package-manifest.in:@BINPATH@/components/
> PeerConnection.js
> obj-debug/_build_manifests/install/dist_bin:1^_components/PeerConnection.
> js^_/home/jesup/src/mozilla/inbound/dom/media/PeerConnection.js
> obj-debug/faster/install_dist_bin:1^_components/PeerConnection.js^_/home/
> jesup/src/mozilla/inbound/dom/media/PeerConnection.js
We discussed a bit on IRC, basically comes down to PeerConnection.js being loaded into compartment because it implements webidl interfaces (not beign Cu.imported). It's not clear to me if we can lazify that.
Comment 5•9 years ago
|
||
> We discussed a bit on IRC, basically comes down to PeerConnection.js being
> loaded into compartment because it implements webidl interfaces (not beign
> Cu.imported). It's not clear to me if we can lazify that.
Perhaps a stub impl that lazily loads the full impl? So the webidl makes the stub loaded, but presumably that's much smaller/faster than the complete one.
Downside is more complexity when adding interfaces.
Comment 6•8 years ago
|
||
Mass change P4->P5 to align with new Mozilla triage process.
Priority: P4 → P5
Comment 7•6 years ago
|
||
Is this still a P3 in memshrink?
Flags: needinfo?(mz_mhs-ctb) → needinfo?(rjesup)
Updated•6 years ago
|
Flags: needinfo?(rjesup) → needinfo?(continuation)
Comment 8•6 years ago
|
||
I think this would be more like a P2 for content process MemShrink, assuming this is loaded into the content process by default. but I don't remember seeing it being loaded on launch when I investigated that a year or so ago.
Kris is more familiar with the current state of loading these various components. Kris, is this something we still need for content process memshrink? Thanks.
Flags: needinfo?(continuation) → needinfo?(kmaglione+bmo)
Comment 9•6 years ago
|
||
I believe this is only loaded eagerly in the parent process. It probably matters for qf, but not for memshrink, I think.
Flags: needinfo?(kmaglione+bmo)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•