Follow pointer guideline for dom/quota/ActorsParent.cpp
Categories
(Core :: Storage: Quota Manager, enhancement, P3)
Tracking
()
People
(Reporter: tt, Assigned: tt)
Details
Attachments
(10 files)
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review | |
|
47 bytes,
text/x-phabricator-request
|
Details | Review |
| Assignee | ||
Comment 1•6 years ago
|
||
| Assignee | ||
Comment 2•6 years ago
|
||
Depends on D77077
| Assignee | ||
Comment 3•6 years ago
|
||
Depends on D77078
| Assignee | ||
Comment 4•6 years ago
|
||
Depends on D77079
| Assignee | ||
Comment 5•6 years ago
|
||
I would like to start applying that with actor classes and then class for directory locks.
Updated•6 years ago
|
| Assignee | ||
Comment 6•6 years ago
|
||
| Assignee | ||
Comment 7•6 years ago
|
||
I plan to apply the guideline to some other classes in dom/quota/ActorsParent.cpp
Comment 9•6 years ago
|
||
| bugherder | ||
| Assignee | ||
Comment 10•6 years ago
|
||
| Assignee | ||
Comment 11•6 years ago
|
||
Depends on D78062
| Assignee | ||
Comment 12•6 years ago
|
||
Depends on D78065
| Assignee | ||
Comment 13•6 years ago
|
||
Depends on D78066
| Assignee | ||
Comment 14•6 years ago
|
||
Depends on D78067
| Assignee | ||
Comment 15•6 years ago
|
||
I plan to make DirectoryLock as a SafeRefPtr and update DirectoryLockAcquired
Updated•6 years ago
|
Updated•6 years ago
|
| Assignee | ||
Updated•6 years ago
|
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
Backed out for assertion failures on FlippedOnce.h and crashes on OpenDirectory
backout: https://hg.mozilla.org/integration/autoland/rev/77ca88c4478a8c1ad318022a7dab4e1964fb8dfe
failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=305665839&repo=autoland&lineNumber=58879
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - Assertion failure: mValue == Initial, at /builds/worker/workspace/obj-build/dist/include/mozilla/dom/FlippedOnce.h:30
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - DEBUG: Starting phase xpcom-will-shutdown
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - #01: mozilla::dom::quota::(anonymous namespace)::NormalOriginOperationBase::Open()[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x3c41c4d]
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - #02: mozilla::dom::quota::(anonymous namespace)::OriginOperationBase::Run()[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x3c37034]
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - DEBUG: Spinning the event loop
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - #03: mozilla::dom::quota::(anonymous namespace)::Quota::RecvPQuotaRequestConstructor(mozilla::dom::quota::PQuotaRequestParent*, mozilla::dom::quota::RequestParams const&)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x3c3f156]
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - DEBUG: Finished phase xpcom-will-shutdown
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - DEBUG: Starting phase web-workers-shutdown
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - #04: mozilla::dom::quota::PQuotaParent::OnMessageReceived(IPC::Message const&)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0xcec8a2]
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - DEBUG: Spinning the event loop
[task 2020-06-09T17:20:27.948Z] 17:20:27 INFO - DEBUG: Finished phase web-workers-shutdown
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - #05: mozilla::ipc::PBackgroundParent::OnMessageReceived(IPC::Message const&)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0xe85b8e]
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - [Child 1406, Main Thread] WARNING: nsAppShell::Exit() called redundantly: file /builds/worker/checkouts/gecko/widget/cocoa/nsAppShell.mm, line 714
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - #06: mozilla::ipc::MessageChannel::DispatchAsyncMessage(mozilla::ipc::ActorLifecycleProxy*, IPC::Message const&)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x9c8ae0]
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - #07: mozilla::ipc::MessageChannel::DispatchMessage(IPC::Message&&)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x9c676a]
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - #08: mozilla::ipc::MessageChannel::RunMessage(mozilla::ipc::MessageChannel::MessageTask&)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x9c7485]
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - #09: mozilla::ipc::MessageChannel::MessageTask::Run()[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x9c7b4a]
[task 2020-06-09T17:20:27.949Z] 17:20:27 INFO - #10: nsThread::ProcessNextEvent(bool, bool*)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x18b49c]
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - #11: NS_ProcessNextEvent(nsIThread*, bool)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x190f1c]
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - #12: mozilla::ipc::MessagePumpForNonMainThreads::Run(base::MessagePump::Delegate*)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x9cd8c1]
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - #13: MessageLoop::Run()[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x95997e]
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - #14: nsThread::ThreadFunc(void*)[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/XUL +0x18744a]
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - #15: _pt_root[/Users/cltbld/tasks/task_1591722249/build/application/Firefox NightlyDebug.app/Contents/MacOS/libnss3.dylib +0x1842d1]
[task 2020-06-09T17:20:27.954Z] 17:20:27 INFO - #16: _pthread_body[/usr/lib/system/libsystem_pthread.dylib +0x32eb]
[task 2020-06-09T17:20:27.955Z] 17:20:27 INFO - #17: _pthread_start[/usr/lib/system/libsystem_pthread.dylib +0x6249]
[task 2020-06-09T17:20:28.060Z] 17:20:28 INFO - Exiting due to channel error.
[task 2020-06-09T17:20:28.104Z] 17:20:28 INFO - [Child 1406, Main Thread] WARNING: Extra shutdown CC: 'i < NORMAL_SHUTDOWN_COLLECTIONS', file /builds/worker/checkouts/gecko/xpcom/base/nsCycleCollector.cpp, line 3359
| Assignee | ||
Comment 18•6 years ago
|
||
It's toolkit/components/cleardata/tests/marionette/test_service_worker_at_shutdown.py. I only verified all tests for dom/quota pass. Sorry for that. I will check this tomorrow.
| Assignee | ||
Comment 19•6 years ago
|
||
It's because we set mInvalidate to true twice in this test.
So, I think I misunderstood the design of DirectoryLockImpl::Invalidate(). I thought we shouldn't invalidate a lock more than one time, but, actually, the code doesn't guarantee that and Invalidate() is designed to be like ensuing mInvalidate is set.
We can make it like:
if (!mInvalidate) {
mInvalidated = true;
}
, but I believe abandon D78067 is a better way to do since it doesn't match the semantic of FlippedOnce.
Updated•6 years ago
|
| Assignee | ||
Comment 20•6 years ago
|
||
Comment 21•6 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #19)
It's because we set
mInvalidatetotruetwice in this test.So, I think I misunderstood the design of
DirectoryLockImpl::Invalidate(). I thought we shouldn't invalidate a lock more than one time, but, actually, the code doesn't guarantee that andInvalidate()is designed to be like ensuingmInvalidateis set.
We can make it like:if (!mInvalidate) { mInvalidated = true; }, but I believe abandon D78067 is a better way to do since it doesn't match the semantic of
FlippedOnce.
Actually I think it does match the design. You just need to use EnsureFlipped instead of Flip. FlippedOnce still ensures that it never gets back to false once it was set to true.
| Assignee | ||
Comment 22•6 years ago
•
|
||
(In reply to Simon Giesecke [:sg] [he/him] from comment #21)
Actually I think it does match the design. You just need to use
EnsureFlippedinstead ofFlip.FlippedOncestill ensures that it never gets back tofalseonce it was set totrue.
Ah, okay. I wasn't aware of EnsureFlipped. Will check that and maybe revert the change I just made. Thanks for the suggestion!
Updated•6 years ago
|
| Assignee | ||
Comment 23•6 years ago
|
||
| Assignee | ||
Comment 24•6 years ago
|
||
I don't see anything suspecious, so I am going to land these patches again.
Comment 25•6 years ago
|
||
Comment 26•6 years ago
|
||
| bugherder | ||
Comment 27•5 years ago
|
||
The leave-open keyword is there and there is no activity for 6 months.
:tt, maybe it's time to close this bug?
| Assignee | ||
Comment 28•5 years ago
|
||
(In reply to Release mgmt bot [:sylvestre / :calixte / :marco for bugbug] from comment #27)
The leave-open keyword is there and there is no activity for 6 months.
:tt, maybe it's time to close this bug?
I still have a few unfinished patches but they need to be updated and I am not sure if I will get back to them soon. Therefore, I will just close this bug and file another one when I complete them. Thanks for the notice anyway!
Description
•