Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Issue 8949057: Revert 115441 - Redo r113722 - Add Pass(), which implements move semantics, to scoped_ptr, scoped... (Closed)

Created:
9 years ago by jeremya
Modified:
9 years ago
Reviewers:
awong
CC:
chromium-reviews, jstritar+watch_chromium.org, yusukes+watch_chromium.org, Paweł Hajdan Jr., jam, penghuang+watch_chromium.org, dpranke-watch+content_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, brettw-cc_chromium.org, James Su, mihaip+watch_chromium.org
Visibility:
Public.

Description

Revert 115441 - Redo r113722 - Add Pass(), which implements move semantics, to scoped_ptr, scoped_array.... (This undoes the revert in r114247. Win canaries still can't link, but this change has been deemed safe). Add Pass(), which implements move semantics, to scoped_ptr, scoped_array, and scoped_ptr_malloc. This modification to the scopers implements the "moveable but not copyable" semantics that were introduced in C++11's unique_ptr<>. With this, is now possible to use scopers as an argument type or a return type. This signifies, in the type system, transfer of ownership into a function or out of a function respectively. Calling, or returning such a function MUST use the temporary resulting from a function or explicit cast. This distinction makes it possible to avoid the implicit ownership transfer issues of auto_ptr, but still allow us to have compiler enforced ownership transfer. Also adds a Passed() helper that allows using a scoper with Bind(). BUG=96118 TEST=new unittests Review URL: http://codereview.chromium.org/9021032 TBR=ajwong@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=115444

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -657 lines) Patch
M base/bind_helpers.h View 8 chunks +31 lines, -121 lines 0 comments Download
M base/bind_internal.h View 78 chunks +78 lines, -189 lines 0 comments Download
M base/bind_internal.h.pump View 8 chunks +8 lines, -7 lines 0 comments Download
M base/bind_unittest.cc View 5 chunks +5 lines, -62 lines 0 comments Download
M base/callback.h View 7 chunks +28 lines, -28 lines 0 comments Download
M base/callback.h.pump View 1 chunk +1 line, -1 line 0 comments Download
M base/callback_internal.h View 2 chunks +0 lines, -59 lines 0 comments Download
M base/memory/scoped_ptr.h View 10 chunks +12 lines, -81 lines 0 comments Download
M base/memory/scoped_ptr_unittest.cc View 2 chunks +0 lines, -92 lines 0 comments Download
M chrome/common/extensions/extension_manifests_unittest.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_win.cc View 2 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
jeremya
9 years ago (2011-12-21 23:37:45 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698