WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
197385
[iOS] The UIProcess may get killed for trying to stay runnable in the background for more than 30 seconds
https://bugs.webkit.org/show_bug.cgi?id=197385
Summary
[iOS] The UIProcess may get killed for trying to stay runnable in the backgro...
Chris Dumez
Reported
2019-04-29 13:55:51 PDT
The UIProcess may get killed for trying to stay runnable in the background for more than 30 seconds.
Attachments
Patch
(4.19 KB, patch)
2019-04-29 14:03 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-04-29 13:56:06 PDT
<
rdar://problem/50001505
>
Chris Dumez
Comment 2
2019-04-29 14:03:16 PDT
Created
attachment 368490
[details]
Patch
Geoffrey Garen
Comment 3
2019-04-29 14:18:12 PDT
Comment on
attachment 368490
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=368490&action=review
> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:72 > + [self _updateBackgroundTask];
I think you need to capture a weak reference to self, otherwise you have a memory leak (the global Notification Center has a reference to self, and never goes away). Once that leak is fixed, don't we also need to unregister for this notification in our dealloc method?
Chris Dumez
Comment 4
2019-04-29 14:19:42 PDT
Comment on
attachment 368490
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=368490&action=review
>> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:72 >> + [self _updateBackgroundTask]; > > I think you need to capture a weak reference to self, otherwise you have a memory leak (the global Notification Center has a reference to self, and never goes away). > > Once that leak is fixed, don't we also need to unregister for this notification in our dealloc method?
self is a static object though, so I would not expect the dealloc method to ever get called.
Chris Dumez
Comment 5
2019-04-29 14:23:21 PDT
Comment on
attachment 368490
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=368490&action=review
>>> Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm:72 >>> + [self _updateBackgroundTask]; >> >> I think you need to capture a weak reference to self, otherwise you have a memory leak (the global Notification Center has a reference to self, and never goes away). >> >> Once that leak is fixed, don't we also need to unregister for this notification in our dealloc method? > > self is a static object though, so I would not expect the dealloc method to ever get called.
I mean that WKProcessAssertionBackgroundTaskManager (self) is a singleton, so "leaking" it is the expectation.
Geoffrey Garen
Comment 6
2019-04-29 14:26:41 PDT
Comment on
attachment 368490
[details]
Patch r=me
WebKit Commit Bot
Comment 7
2019-04-29 15:40:53 PDT
Comment on
attachment 368490
[details]
Patch Clearing flags on attachment: 368490 Committed
r244761
: <
https://trac.webkit.org/changeset/244761
>
WebKit Commit Bot
Comment 8
2019-04-29 15:40:55 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug