summaryrefslogtreecommitdiffstats
path: root/base/memory
Commit message (Collapse)AuthorAgeFilesLines
* Revert 165006 - Revert 165005 until skia_webkit.gyp is present everywhere.bungeman@chromium.org2012-10-301-9/+1
| | | | | | | TBR=bungeman@chromium.org Review URL: https://codereview.chromium.org/11344041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165007 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 165005 until skia_webkit.gyp is present everywhere.bungeman@chromium.org2012-10-301-1/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@165006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix move.h's to use a concrete RValue carrier object rather than hacking a ↵ajwong@chromium.org2012-10-152-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | RValue&. For move semantics, we need to create a private "RValue" type that is used to create move constructors and move operators. Previously, we emulated Boost's idea of making the RValue type a subclass of the move-only type that doesn't add any new member fields. We then just reinterpret_cast "this" into a RValue& depending on the fact that RValue is just a type pun for the move-only type. This ends up being undefined behavior though (C++98 5.2.10.7). This change makes use a concrete RValue class that contains a pointer to the move-only type. With -O2 on clang version 3.2 (trunk 163674), this yields identical assembly code to the previous implementation. With -O0, we generate 2 more instructions to allocate and initialize the temporary RValue struct's object field when calling Pass(). This should be acceptable. The snowman says so ☃. BUG=155436 Review URL: https://chromiumcodereview.appspot.com/11078014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161945 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] base::scoped_nsobject<>::autorelease()shess@chromium.org2012-10-132-0/+16
| | | | | | | | | | | | | | | | | | | | To give up ownership of this object to the autorelease pool: scoped_nsobject<MyClass> obj; you could write: [[obj retain] autorelease]; obj.reset(); or: [obj.release() autorelease]; This CL makes it more explicit: obj.autorelease(); BUG=none Review URL: https://chromiumcodereview.appspot.com/11066079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161750 0039d316-1c4b-4281-b951-d872f2087c98
* Allow scoped_ptr variables to be used in boolean expressionsenne@chromium.org2012-10-061-0/+15
| | | | | | | | | BUG=none Review URL: https://chromiumcodereview.appspot.com/11028044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160570 0039d316-1c4b-4281-b951-d872f2087c98
* Add WARN_UNUSED_RESULT to scoped_refptr::release.xiaomings@google.com2012-08-281-1/+2
| | | | | | | | | | | | | | Also fixed some possible leaks related by scoped_refptr::release. See https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/b5thcBgubsM BUG= Review URL: https://chromiumcodereview.appspot.com/10874054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153719 0039d316-1c4b-4281-b951-d872f2087c98
* Purge ImplementsThreadSafeReferenceCounting() from the codebase now that ↵fischman@chromium.org2012-08-071-4/+0
| | | | | | | | | | Task is dead. TBR=ananta@chromium.org,apatrick@chromium.org Review URL: https://chromiumcodereview.appspot.com/10836116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150202 0039d316-1c4b-4281-b951-d872f2087c98
* base: Fix minor warnings reported by cppcheck.tfarina@chromium.org2012-08-061-7/+9
| | | | | | | | | | | | | | Found with: $ cppcheck --enable=all -j4 --force base 2> base-errors R=jar@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/10827112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150059 0039d316-1c4b-4281-b951-d872f2087c98
* base: Suggest forward declare DefaultSingletonTraits in header files.tfarina@chromium.org2012-07-311-1/+2
| | | | | | | | | | | | | Instead of including singleton.h in header files we can forward declare it, and include only in the source file. There is also a presubmit check for this, I didn't know ;) R=willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10835029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149095 0039d316-1c4b-4281-b951-d872f2087c98
* Upgrade AlignedMemory to support dynamic allocations.dalecurtis@chromium.org2012-07-263-6/+120
| | | | | | | | | | | | | | | | | | | | | | | | Adds two new methods: AlignedAlloc and AlignedFree for creating and destroying dynamic aligned allocations respectively. Also adds a helper class, ScopedPtrAlignedFree, for use with scoped_ptr_malloc. AlignedAlloc uses posix_memalign for OS X (now that we're targeting 10.6), Linux and _aligned_alloc() on Windows. Android and NaCl use memalign() since they do not expose posix_memalign() and memalign() is safe to use with free() on those platforms. Also hacks around a bug in Visual C++ where __alignof will sometimes return zero: http://connect.microsoft.com/VisualStudio/feedback/details/682695/c-alignof-fails-to-properly-evalute-alignment-of-dependent-types BUG=none TEST=base_unittests + new test, trybots. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147988 Review URL: https://chromiumcodereview.appspot.com/10796020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148483 0039d316-1c4b-4281-b951-d872f2087c98
* base: Class member variables should be ended with trailing underscores.tfarina@chromium.org2012-07-241-35/+35
| | | | | | | | | | | | | | Fix ScopedVector API to follow this style. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml?showone=Variable_Names#Variable_Names BUG=136196 R=willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10796028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148057 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 147988 - Upgrade AlignedMemory to support dynamic allocations.acolwell@chromium.org2012-07-243-121/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Adds two new methods: AlignedAlloc and AlignedFree for creating and destroying dynamic aligned allocations respectively. Also adds a helper class, ScopedPtrAlignedFree, for use with scoped_ptr_malloc. AlignedAlloc uses posix_memalign for OS X (now that we're targeting 10.6), Linux and _aligned_alloc() on Windows. Android and NaCl use memalign() since they do not expose posix_memalign() and memalign() is safe to use with free() on those platforms. Also hacks around a bug in Visual C++ where __alignof will sometimes return zero: http://connect.microsoft.com/VisualStudio/feedback/details/682695/c-alignof-fails-to-properly-evalute-alignment-of-dependent-types BUG=none TEST=base_unittests + new test, trybots. Review URL: https://chromiumcodereview.appspot.com/10796020 TBR=dalecurtis@chromium.org Review URL: https://chromiumcodereview.appspot.com/10817021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148016 0039d316-1c4b-4281-b951-d872f2087c98
* Upgrade AlignedMemory to support dynamic allocations.dalecurtis@chromium.org2012-07-233-7/+121
| | | | | | | | | | | | | | | | | | | | | | Adds two new methods: AlignedAlloc and AlignedFree for creating and destroying dynamic aligned allocations respectively. Also adds a helper class, ScopedPtrAlignedFree, for use with scoped_ptr_malloc. AlignedAlloc uses posix_memalign for OS X (now that we're targeting 10.6), Linux and _aligned_alloc() on Windows. Android and NaCl use memalign() since they do not expose posix_memalign() and memalign() is safe to use with free() on those platforms. Also hacks around a bug in Visual C++ where __alignof will sometimes return zero: http://connect.microsoft.com/VisualStudio/feedback/details/682695/c-alignof-fails-to-properly-evalute-alignment-of-dependent-types BUG=none TEST=base_unittests + new test, trybots. Review URL: https://chromiumcodereview.appspot.com/10796020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147988 0039d316-1c4b-4281-b951-d872f2087c98
* Enable aligned_memory_unittest.cc on iOS.leng@chromium.org2012-07-201-3/+7
| | | | | | | | | | | One case of the StackAlignment test is #defined out for iOS on ARM (not simulator), due to a clang armv7 codegen bug. A crbug has been created to re-enable these cases when the clang bug is fixed. BUG=None TEST=None Review URL: https://chromiumcodereview.appspot.com/10785019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147649 0039d316-1c4b-4281-b951-d872f2087c98
* base: Make ScopedVector::clear() destroy elements.derat@chromium.org2012-07-192-6/+21
| | | | | | | | | | | | | | | | | | | This makes ScopedVector's clear() method destroy the elements before clearing the internal vector, matching the behavior of the erase() method. I'm moving clear()'s previous element-preserving behavior into a new weak_clear() method, matching weak_erase(). I'm also removing ScopedVector::reset(), as it duplicated clear()'s new behavior and isn't a part of std::vector. BUG=137909 TEST=added Review URL: https://chromiumcodereview.appspot.com/10797017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@147360 0039d316-1c4b-4281-b951-d872f2087c98
* Second try of http://codereview.chromium.org/10698063/kaiwang@chromium.org2012-07-112-158/+292
| | | | | | | | 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
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-1116-16/+0
| | | | | | | | | 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
* Revert 145402 - Rename/re-comment tests and 2 new death tests for WeakPtrraymes@google.com2012-07-042-209/+137
| | | | | | | | | 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
* Rename/re-comment tests and 2 new death tests for WeakPtrkaiwang@chromium.org2012-07-042-137/+209
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10698063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145402 0039d316-1c4b-4281-b951-d872f2087c98
* base: Remove dereference structure operator (i.e ->) from ScopedVector.tfarina@chromium.org2012-06-301-2/+9
| | | | | | | | | BUG=128663 R=brettw@chromium.org,willchan@chromium.org Review URL: https://chromiumcodereview.appspot.com/10669038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145073 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, base/ editionrsleevi@chromium.org2012-06-262-4/+11
| | | | | | | | | | 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
* RefCounted types should not have public destructorsrsleevi@chromium.org2012-06-251-0/+4
| | | | | | | | | | | | | Change content::ResourceResponse to be base::RefCountedData<> rather than directly inheriting from both ResourceResponseHead and base::RefCounted. BUG=123295 TEST=existing Review URL: https://chromiumcodereview.appspot.com/10416003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143880 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scoped_ptr::Pass to not rely on undefined behaviordmichael@chromium.org2012-06-201-3/+18
| | | | | | | | | | | | Invoking "other.release()" where other is of type RValue invokes undefined behavior, because the given pointer is actually of type scoped_ptr<C>. With the NaCl toolchain, this doesn't work as intended, and the pointed-to object gets destructed twice. BUG=116317 TEST= Review URL: https://chromiumcodereview.appspot.com/10579030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143150 0039d316-1c4b-4281-b951-d872f2087c98
* Add element_type in scoped_refptr.xhwang@chromium.org2012-06-191-0/+2
| | | | | | | | | | | | | | This will enable ::testing::IsNull and ::testing::NotNull on scoped_refptr. It was not working because GetRawPointer needs element_type to be defined in the Pointer type. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10558017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142997 0039d316-1c4b-4281-b951-d872f2087c98
* Add make_scoped_ptr to scoped_ptr.hkalman@chromium.org2012-06-181-0/+8
| | | | | | Review URL: https://chromiumcodereview.appspot.com/10565038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142848 0039d316-1c4b-4281-b951-d872f2087c98
* Add weak pointer static casting.gavinp@chromium.org2012-06-153-5/+211
| | | | | | | | | | | | 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
* Use ScopedVector in RenderTextWin.asvitkine@chromium.org2012-06-041-0/+5
| | | | | | | | | | | Also, add front() and back() functions to ScopedVector. BUG=none TEST=existing unit tests Review URL: https://chromiumcodereview.appspot.com/10519013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140423 0039d316-1c4b-4281-b951-d872f2087c98
* Implement media::VideoDecodeAccelerator on Macsail@chromium.org2012-06-023-18/+39
| | | | | | | | | | | | | | | | | This CL implements media::VideoDecodeAccelerator for Mac. This will be used to implement hardware video decoding for Pepper Flash. Currently a couple things are still missing: - the new VideoDecodeAcceleratorMac class needs to be hooked up to GpuVideoDecodeAccelerator - the PPB_VideoDecoder_Dev::Create() API needs to be extended so clients can specify the extra AVC data. BUG=127414 TEST=Ran on Mac and Windows. Sending ARM try bots now. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=140153 Review URL: https://chromiumcodereview.appspot.com/10388108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140187 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Implement media::VideoDecodeAccelerator on Mac"sail@chromium.org2012-06-023-39/+18
| | | | | | | | | | | | | | | | | | | This reverts commit e80c92698a601d2e737a2c5cf5e128b291fc46d5. Revert "mac: Try to unbreak component build after 140153" This reverts commit 6358de7919e7788e373f98260ce6486fd490f2a0. Revert "Try to fix the previous fix." This reverts commit 179b333fa898f7969623d0f7404a9a7cfa122c61. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10494008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140164 0039d316-1c4b-4281-b951-d872f2087c98
* Implement media::VideoDecodeAccelerator on Macsail@chromium.org2012-06-023-18/+39
| | | | | | | | | | | | | | | This CL implements media::VideoDecodeAccelerator for Mac. This will be used to implement hardware video decoding for Pepper Flash. Currently a couple things are still missing: - the new VideoDecodeAcceleratorMac class needs to be hooked up to GpuVideoDecodeAccelerator - the PPB_VideoDecoder_Dev::Create() API needs to be extended so clients can specify the extra AVC data. BUG=127414 TEST=Ran on Mac and Windows. Sending ARM try bots now. Review URL: https://chromiumcodereview.appspot.com/10388108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140153 0039d316-1c4b-4281-b951-d872f2087c98
* Let WeakPtrFactory operations fail once its dtor is calledoshima@chromium.org2012-05-181-0/+8
| | | | | | | | | | | | | | | | | 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
* Make ScopedGenericObj compile with strict warnings when used with non-pointers.thakis@chromium.org2012-05-161-3/+3
| | | | | | | | | | | | No intended functionality change. Required for a future clang roll. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10310183 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137361 0039d316-1c4b-4281-b951-d872f2087c98
* Move RefCountedMemory Class to Base namespacesimon.hong81@gmail.com2012-05-022-6/+3
| | | | | | | | | BUG=none TEST=compiles chrome, browser_tests and ui_tests Review URL: http://codereview.chromium.org/10272004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135011 0039d316-1c4b-4281-b951-d872f2087c98
* RefCounted types should not have public destructors, base/ editionrsleevi@chromium.org2012-04-253-11/+9
| | | | | | | | | | BUG=123295 TEST=none Review URL: http://codereview.chromium.org/10065037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133825 0039d316-1c4b-4281-b951-d872f2087c98
* Move RefCountedStaticMemory to base namespacesimon.hong81@gmail.com2012-04-242-4/+4
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/10165020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133702 0039d316-1c4b-4281-b951-d872f2087c98
* Move RefCountedBytes Class to base namespace.simon.hong81@gmail.com2012-04-202-6/+6
| | | | | | | | | BUG=none TEST=compiles and tests pass on trybots Review URL: http://codereview.chromium.org/10083022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133170 0039d316-1c4b-4281-b951-d872f2087c98
* Add virtual and OVERRIDE to base/ implementation filesrsleevi@chromium.org2012-04-065-16/+15
| | | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/10004001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131098 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that scoped_ptr<> cannot be used with ref-counted objects.sergeyu@chromium.org2012-04-052-0/+36
| | | | | | | | | | | | | It's easy to type scoped_ptr<> instead of scoped_refptr<>. Such bugs are hard to debug sometimes. This change adds compile-time check to make sure that scoped_ptr<> is not used for ref-counted objects. Also fixed one (benign) instance of scoped_ptr<> being used for a ref-counted object. Review URL: http://codereview.chromium.org/9958150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130835 0039d316-1c4b-4281-b951-d872f2087c98
* Go ahead and forward all the std::vector<> typedefs through ScopedVector. ↵pkasting@chromium.org2012-03-261-2/+8
| | | | | | | | | | | At least MSVC 2010 wanted "value_type" in addition to the ones that were there already, so just future-proof it by adding them all. BUG=none TEST=none TBR=willchan Review URL: https://chromiumcodereview.appspot.com/9866009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129019 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ScopedVector<T> passing via base::Bind()willchan@chromium.org2012-03-231-1/+41
| | | | | | | | | | | | | | | The original implementation neglected to define the necessary CallbackParamTraits and CallbackForward implementations for ScopedVector. Fix scoped_ptr_malloc and scoped_array while I'm at it. Awesome. BUG=NONE TEST=scoped_vector_unittest.cc Review URL: http://codereview.chromium.org/9827003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128350 0039d316-1c4b-4281-b951-d872f2087c98
* Add "reference" and "const_reference" typedefs to ScopedVector to enable it ↵pkasting@chromium.org2012-03-211-0/+2
| | | | | | | | | | to support std::back_inserter. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/9804002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127996 0039d316-1c4b-4281-b951-d872f2087c98
* Make WeakPtr::operator* return reference instead of pointerhashimoto@chromium.org2012-02-292-4/+6
| | | | | | | | | | | | | 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
* Fix weak_ptr's operator* implementation.mnaganov@chromium.org2012-02-242-3/+11
| | | | | | | | | | | | | 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
* Add ALIGNAS and ALIGNOF macros to ensure proper alignment of ↵jbates@chromium.org2012-02-234-12/+170
| | | | | | | | | | StaticMemorySingletonTraits BUG=95006 Review URL: https://chromiumcodereview.appspot.com/9186057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123270 0039d316-1c4b-4281-b951-d872f2087c98
* Update scoped_nsobject to be copyable.qsr@chromium.org2012-02-092-136/+160
| | | | | | | | | | | | | | | Having copyable scoped_nsobject allows to use those in C++ structure, in stl datatypes as well as with the base::Callback API. This CL also introduces an optional parameter to the constructor of scoped_nsobject to allow to state what is the ownership policy. BUG= none TEST= memory/scoped_nsobject_mac_unittest.mm Review URL: http://codereview.chromium.org/9349016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121215 0039d316-1c4b-4281-b951-d872f2087c98
* Add assert() for scoped_refptr<T>::operator->()akalin@chromium.org2012-01-311-1/+6
| | | | | | | | | | | | | | This is to make NULL dereference crashes more obvious. Also matches scoped_ptr (which uses assert) and weak_ptr (which uses DCHECK). DCHECK wasn't used because it pulls in logging.h, and that somehow conflicts with a webkit #define of LOG. BUG= TEST= Review URL: http://codereview.chromium.org/9232069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119820 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a scoped_nsprotocolqsr@chromium.org2012-01-271-1/+64
| | | | | | | | | | | | | This allow to easily own protocol. The syntax is: scoped_nsobject<id<MyProtocol> > object; BUG= none TEST= none Review URL: http://codereview.chromium.org/9290046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119419 0039d316-1c4b-4281-b951-d872f2087c98
* Add scoped_ptr<>::PassAs<>().sergeyu@chromium.org2012-01-253-0/+66
| | | | | | | | | The new PassAs<>() method can be used to explicitly upcast scoped_ptr instances. Review URL: http://codereview.chromium.org/9283028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118958 0039d316-1c4b-4281-b951-d872f2087c98
* remove ; which breaks nacl_integration since they use -pedanticajwong@chromium.org2012-01-202-4/+4
| | | | | | | | | | BUG=none TEST=nacl_integration goes green TBR=darin Review URL: https://chromiumcodereview.appspot.com/9195035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118391 0039d316-1c4b-4281-b951-d872f2087c98
* Transfer the C++03 move-only type emulation into base/move.h and also make ↵ajwong@chromium.org2012-01-203-51/+81
| | | | | | | | | | | | | | | | | ScopedVector move-only. Also: * Add a lot of documentation explaining what this macro does. * Change the implementation of RValue so it cannot be instantiated. The change to always use RValue& makes for more efficent code in debug builds. Looking at the disassembly for a simple use case (calling a function with one parameter), it removes the creation of one temporary. BUG=96118 TEST=new unittests. exist code still compiles. Review URL: https://chromiumcodereview.appspot.com/9207021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118388 0039d316-1c4b-4281-b951-d872f2087c98