| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
WeakPtr supported SequencedTaskRunner in
https://codereview.chromium.org/20754006, but the
documentation was not updated to match.
BUG=none
Review URL: https://codereview.chromium.org/323153002
Cr-Commit-Position: refs/heads/master@{#300717}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Flag's methods can end up getting called across a dll boundary due to inlining.
For example, Flag's destructor ends up being called from gpu.dll when the
following call chain gets inlined:
gpu::gles2::ContextGroup::HaveContexts() ->
std::vector<WeakPtr<gles2::GLES2Decoder>>::remove_if() ->
WeakPtr copy assignment ->
WeakReference copy assignment ->
scoped_refptr<Flag> copy assignment ->
RefCountedThreadSafe<Flag>::Release -> ~Flag.
(Note that dllimport/export isn't inherited by nested classes,
but the visibility attribute that we use on other platforms is.)
BUG=82385
TEST=build gpu.dll with Clang in a shared_library Release build
R=mark@chromium.org
Review URL: https://codereview.chromium.org/321983002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276220 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=234964
Review URL: https://chromiumcodereview.appspot.com/20777008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215470 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a continuation of https://codereview.chromium.org/20163004/#ps55001 and identical to Patchset 4. I'm adding back some death test threadsafe flags that got dropped from the re-apply.
In other words, this CL is:
https://codereview.chromium.org/20163004/#ps55001 +
https://codereview.chromium.org/19617002/
Feel free to revert if it causes issues again.
TBR=akalin,darin,dewittj,rnk
BUG=165590
Review URL: https://codereview.chromium.org/20754006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214411 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Speculative due to base_unittests failures.
> base: Re-apply WeakPtr support for SequencedWorkerPools, fixing deadlock
>
> This reverts the revert found here: https://codereview.chromium.org/19882002
>
> It also fixes the deadlock that caused the revert, reported here:
> http://crbug.com/261448
>
> Patchset 1 is simply what was originally committed (and reverted). Subsequent patchsets show the fix of the deadlock problem.
>
> BUG=165590
> TBR=darin
>
> Review URL: https://chromiumcodereview.appspot.com/20163004
TBR=tommycli@chromium.org
Review URL: https://codereview.chromium.org/20771002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213943 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts the revert found here: https://codereview.chromium.org/19882002
It also fixes the deadlock that caused the revert, reported here:
http://crbug.com/261448
Patchset 1 is simply what was originally committed (and reverted). Subsequent patchsets show the fix of the deadlock problem.
BUG=165590
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/20163004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213906 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As well as revert 212725 "base: Make SequenceChecker death tests multi-threads work correctly."
See http://crbug.com/261448
> base: Change WeakPtr to use SequenceChecker instead of ThreadChecker.
>
> This will enable WeakPtr to be used in SequencedWorkerPool, et al. with a sequence token.
>
> This is a continuation of issue: https://chromiumcodereview.appspot.com/18231002/
>
> The original issue got messed up by a rietveld bug, so refer there for history and comments.
>
> BUG=165590
>
> Review URL: https://chromiumcodereview.appspot.com/18501008
TBR=tommycli@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19695005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212780 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will enable WeakPtr to be used in SequencedWorkerPool, et al. with a sequence token.
This is a continuation of issue: https://chromiumcodereview.appspot.com/18231002/
The original issue got messed up by a rietveld bug, so refer there for history and comments.
BUG=165590
Review URL: https://chromiumcodereview.appspot.com/18501008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211956 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the same trick as scoped_ptr<T>.
Add comments regarding == and != operators and their relation to
the bool trick.
BUG=245942
R=darin@chromium.org, rsleevi@chromium.org
Review URL: https://codereview.chromium.org/15721007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204438 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=245942
R=darin@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=204293
Review URL: https://chromiumcodereview.appspot.com/16267003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204379 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
broke linux chromeos compile:
chromeos-chrome-29.0.1530.0_alpha-r1: content/common/gpu/media/exynos_video_decode_accelerator.cc: In member function 'void content::ExynosVideoDecodeAccelerator::NotifyError(media::VideoDecodeAccelerator::Error)':
chromeos-chrome-29.0.1530.0_alpha-r1: content/common/gpu/media/exynos_video_decode_accelerator.cc:1894:14: error: could not convert '((content::ExynosVideoDecodeAccelerator*)this)->content::ExynosVideoDecodeAccelerator::client_' from 'base::WeakPtr<media::VideoDecodeAccelerator::Client>' to 'bool'
...more errors
> Remove WeakPtr<T>'s operator T*()
>
> BUG=245942
> R=darin@chromium.org
>
> Review URL: https://codereview.chromium.org/16267003
TBR=akalin@chromium.org
Review URL: https://codereview.chromium.org/16229012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204315 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=245942
R=darin@chromium.org
Review URL: https://codereview.chromium.org/16267003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204293 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Linux fixes
BUG=110610
TBR=darin
Review URL: https://chromiumcodereview.appspot.com/16160015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203483 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a re-land of issue 14299011, which broke GLSurfaceGLX, in turn breaking Chrome Linux/Aura.
This CL changes WeakPtr in the following ways:
* Changes thread-bindings semantics so that WeakPtrs only become bound when the first one is dereferenced, or the owning factory invalidates them.
* Removes WeakPtrFactory::DetachFromThread.
* Renames SupportsWeakPtr::DetachFromThread to DetachFromThreadHack.
Calling code changes to allow this:
* Unnecessary use of SupportsWeakPtr removed from SGIVideoSyncProviderThreadShim.
* Unnecessary DetachFromThread() calls removed from PluginInfoMessageFilter, DhcpProxyScript[Adapter]FetcherWin and (Chromoting's) PolicyWatcherLinux.
* DetachFromThread() calls rendered unnecessary by change in binding semantics removed from IOThread, SearchProviderInstallData, RuleRegistryWithCache and GLSurfaceGlx.
WebGraphicsContext3DInProcessCommandBufferImpl uses the re-named DetachFromThreadHack() - bug 234964 tracks work to remove that use.
TBR=darin,awong
BUG=232143, 234964, 243914
Review URL: https://chromiumcodereview.appspot.com/16007009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202811 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Caused local failures in linux_aura builds. Unsure why this isn't showing
up on the bots.
> Remove all but one use of WeakPtrFactory::DetachFromThread.
>
> This CL changes WeakPtr in the following ways:
> * Changes thread-bindings semantics so that WeakPtrs only become bound when the first one is dereferenced, or the owning factory invalidates them.
> * Removes WeakPtrFactory::DetachFromThread.
> * Renames SupportsWeakPtr::DetachFromThread to DetachFromThreadHack.
>
> Calling code changes to allow this:
> * Unnecessary DetachFromThread() calls removed from PluginInfoMessageFilter, DhcpProxyScript[Adapter]FetcherWin and (Chromoting's) PolicyWatcherLinux.
> * DetachFromThread() calls rendered unnecessary by change in binding semantics removed from IOThread, SearchProviderInstallData, RuleRegistryWithCache and GLSurfaceGlx.
>
> WebGraphicsContext3DInProcessCommandBufferImpl uses the re-named DetachFromThreadHack() - bug 234964 tracks work to remove that use.
>
> Review URL: https://chromiumcodereview.appspot.com/14299011
BUG=232143, 234964, 243914
TBR=wez@chromium.org
Review URL: https://codereview.chromium.org/15819004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202193 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL changes WeakPtr in the following ways:
* Changes thread-bindings semantics so that WeakPtrs only become bound when the first one is dereferenced, or the owning factory invalidates them.
* Removes WeakPtrFactory::DetachFromThread.
* Renames SupportsWeakPtr::DetachFromThread to DetachFromThreadHack.
Calling code changes to allow this:
* Unnecessary DetachFromThread() calls removed from PluginInfoMessageFilter, DhcpProxyScript[Adapter]FetcherWin and (Chromoting's) PolicyWatcherLinux.
* DetachFromThread() calls rendered unnecessary by change in binding semantics removed from IOThread, SearchProviderInstallData, RuleRegistryWithCache and GLSurfaceGlx.
WebGraphicsContext3DInProcessCommandBufferImpl uses the re-named DetachFromThreadHack() - bug 234964 tracks work to remove that use.
BUG=232143, 234964
Review URL: https://chromiumcodereview.appspot.com/14299011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202038 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://chromiumcodereview.appspot.com/13556005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@196488 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=179544
Review URL: https://codereview.chromium.org/12387056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@185666 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
Rename/re-comment tests and added new death tests for WeakPtr.
Review URL: https://chromiumcodereview.appspot.com/10690080
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146212 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
For context see this thread:
https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II
TBR=thakis,pkasting,jam
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Review URL: https://chromiumcodereview.appspot.com/10698063
TBR=kaiwang@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10704094
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145409 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://chromiumcodereview.appspot.com/10698063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145402 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=123295
TEST=it compiles
Review URL: https://chromiumcodereview.appspot.com/10332269
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144130 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows classes to more naturally extend classes using WeakPtr.
TEST=None
BUG=
Review URL: https://chromiumcodereview.appspot.com/10537127
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142404 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We had a weird bug (crbug.com/127534) where the task was
posted and executed even after WeakPtrFactory has been deleted.
It turns out that someone was posting a task AFTER its detor was
called while executing destructor, and bots (including valgrind)
couldn't catch this because the memory stays valid until the
hosting object is deleted. This CL is to catch such case early by
resetting the ptr_.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10387063
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137963 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reference is more suitable type for operator*'s return values.
Add test code for operator->.
BUG=None
TEST=base_unittests --gtest_filter="WeakPtrTest.Dereference"
Review URL: http://codereview.chromium.org/9455086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124141 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This looks like a typo. Seems that nobody has tried to use this operator before.
BUG=none
TEST=WeakPtrTest.Dereference
R=darin@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9452021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123456 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and destruction on a thread other than the one where the original
reference was created.
The problem with the current implementation is modifying the flag pointer
from WeakPtr::~WeakPtr which might happen on a different thread (potentially
racing with somebody invalidating the flag on the original thread).
For compatibility reasons, creating the initial reference attaches to the
thread and governs the thread-safety checking logic with respect to checking
a reference to be valid and invalidating it, which should both only be done
on the same thread.
BUG=82509
TEST=added unit tests
Added memleak suppression: http://crbug.com/94345
TBR=timurrrr@chromium.org
Review URL: http://codereview.chromium.org/7677028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98443 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
WeakPtr
and destruction on a thread other than the one where the original
reference was created.
The problem with the current implementation is modifying the flag pointer
from WeakPtr::~WeakPtr which might happen on a different thread (potentially
racing with somebody invalidating the flag on the original thread).
For compatibility reasons, creating the initial reference attaches to the
thread and governs the thread-safety checking logic with respect to checking
a reference to be valid and invalidating it, which should both only be done
on the same thread.
BUG=82509
TEST=added unit tests
Review URL: http://codereview.chromium.org/7677028
TBR=sievers@chromium.org
Review URL: http://codereview.chromium.org/7685054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97846 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and destruction on a thread other than the one where the original
reference was created.
The problem with the current implementation is modifying the flag pointer
from WeakPtr::~WeakPtr which might happen on a different thread (potentially
racing with somebody invalidating the flag on the original thread).
For compatibility reasons, creating the initial reference attaches to the
thread and governs the thread-safety checking logic with respect to checking
a reference to be valid and invalidating it, which should both only be done
on the same thread.
BUG=82509
TEST=added unit tests
Review URL: http://codereview.chromium.org/7677028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97808 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
R=rvargas
Review URL: http://codereview.chromium.org/7461141
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows a base::WeakPtr to be deleted on a different thread, which will modify the refcount on Flag.
BUG=none
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=81142
Review URL: http://codereview.chromium.org/6826034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81148 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
RefCountedThreadSafe.This allows a base::WeakPtr to be deleted on a different thread, which will modify the refcount on Flag.BUG=noneTEST=noneReview URL: http://codereview.chromium.org/6826034
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/6821053
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81144 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows a base::WeakPtr to be deleted on a different thread, which will modify the refcount on Flag.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6826034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81142 0039d316-1c4b-4281-b951-d872f2087c98
|
|
raw_scoped_refptr_mismatch_checker.h
ref_counted.cc
ref_counted.h
ref_counted_memory.cc
ref_counted_memory.h
ref_counted_unittest.cc
scoped_callback_factory.h
scoped_comptr_win.h
scoped_handle.h
scoped_native_library.cc
scoped_native_library.h
scoped_native_library_unittest.cc
scoped_nsobject.h
scoped_open_process.h
scoped_ptr.h
scoped_ptr_unittest.cc
scoped_temp_dir.cc
scoped_temp_dir.h
scoped_temp_dir_unittest.cc
scoped_vector.h
singleton.h
singleton_objc.h
singleton_unittest.cc
linked_ptr.h
linked_ptr_unittest.cc
weak_ptr.cc
weak_ptr.h
weak_ptr_unittest.cc
BUG=None
TEST=Compile
Review URL: http://codereview.chromium.org/6714032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
|