WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
107539
[ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
https://bugs.webkit.org/show_bug.cgi?id=107539
Summary
[ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
Tim Horton
Reported
2013-01-22 02:47:20 PST
<
rdar://problem/13032692
>
Attachments
patch (I'm going to test one more time)
(172.30 KB, patch)
2013-01-22 16:44 PST
,
Tim Horton
no flags
Details
Formatted Diff
Diff
patch
(113.18 KB, patch)
2013-03-25 17:21 PDT
,
Tim Horton
simon.fraser
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2013-01-22 16:44:05 PST
Created
attachment 184074
[details]
patch (I'm going to test one more time)
WebKit Review Bot
Comment 2
2013-01-22 16:45:36 PST
Attachment 184074
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit2/WebProcess/WebProcess.cpp:1106: One line control clauses should not use braces. [whitespace/braces] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 3
2013-01-22 16:57:51 PST
Comment on
attachment 184074
[details]
patch (I'm going to test one more time) Disregard, it's not having the intended effect. I'll try again.
Tim Horton
Comment 4
2013-03-25 17:21:09 PDT
Created
attachment 194960
[details]
patch
WebKit Review Bot
Comment 5
2013-03-25 17:24:55 PDT
Attachment 194960
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/WebCore.exp.in', u'Source/WebCore/platform/mac/WebCoreSystemInterface.h', u'Source/WebCore/platform/mac/WebCoreSystemInterface.mm', u'Source/WebKit/mac/ChangeLog', u'Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm', u'Source/WebKit2/ChangeLog', u'Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm', u'Source/WebKit2/WebProcess/WebPage/WebPage.cpp', u'Source/WebKit2/WebProcess/WebProcess.cpp', u'Source/WebKit2/WebProcess/WebProcess.h', u'WebKitLibraries/libWebKitSystemInterfaceLion.a', u'WebKitLibraries/libWebKitSystemInterfaceMountainLion.a']" exit_code: 1 Source/WebKit2/WebProcess/WebProcess.cpp:1121: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Total errors found: 1 in 11 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 6
2013-03-26 16:30:53 PDT
Comment on
attachment 194960
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=194960&action=review
> Source/WebCore/platform/mac/WebCoreSystemInterface.mm:195 > +void(*wkCABackingStoreCollectBlocking)(void);
I think we should change this name to something less mysterious.
> Source/WebKit2/WebProcess/WebPage/WebPage.cpp:373 > + if (!parameters.isInWindow) { > + // Page defaults to on-screen, but setIsInWindow depends on it being a valid indicator of actually having been put into a window. > + m_page->setCanStartMedia(false); > + m_page->willMoveOffscreen(); > + }
Is this behavior change detectable at all? Will it break anything?
> Source/WebKit2/WebProcess/WebProcess.cpp:1078 > + m_inWindowPageCount--;
I think you should assert that m_inWindowPageCount is > 0 here. Consider making it signed for slightly less bad behavior if miscounting occurs in a release build.
Tim Horton
Comment 7
2013-03-26 17:06:27 PDT
(In reply to
comment #6
)
> (From update of
attachment 194960
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=194960&action=review
> > > Source/WebCore/platform/mac/WebCoreSystemInterface.mm:195 > > +void(*wkCABackingStoreCollectBlocking)(void); > > I think we should change this name to something less mysterious.
OK.
> > Source/WebKit2/WebProcess/WebPage/WebPage.cpp:373 > > + if (!parameters.isInWindow) { > > + // Page defaults to on-screen, but setIsInWindow depends on it being a valid indicator of actually having been put into a window. > > + m_page->setCanStartMedia(false); > > + m_page->willMoveOffscreen(); > > + } > > Is this behavior change detectable at all? Will it break anything?
I don't think so (on both counts) because it is immediately rectified by setIsInWindow. I do, however, think that we don't need to setCanStartMedia here, because there is no time between when this code runs and when setIsInWindow sets it to the right value, so I'm going to remove that. Also, I'm glad you pointed this out; this patch is from before the isInWindow vs. willMoveOffscreen disambiguation; it really wants to be doing setIsInWindow(false). I'll fix that.
> > Source/WebKit2/WebProcess/WebProcess.cpp:1078 > > + m_inWindowPageCount--; > > I think you should assert that m_inWindowPageCount is > 0 here. Consider making it signed for slightly less bad behavior if miscounting occurs in a release build.
Sure.
Tim Horton
Comment 8
2013-03-26 18:24:21 PDT
http://trac.webkit.org/changeset/146956
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