While we're on the topic of scoped_ptr improvements, is there interest in introducing a pass_scoped_ptr type? As it stands, it's dangerous to pass around scoped_ptrs as parameters due to the problem described in http://www.webkit.org/coding/RefPtr.html (section "PassRefPtr"). I ran into a subtle bug caused by this just last week.
--
Alex--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
Here's the buggy code I wrote while using .Pass() for the first time:bool WebLayerTreeViewImpl::initialize(const WebLayerTreeView::Settings& webSettings, scoped_ptr<Thread> implThread){...m_layerTreeHost = LayerTreeHost::create(this, settings, implThread.Pass());if (implThread)m_hasImplThread = true;...}