Commit Graph

10 Commits

Author SHA1 Message Date
494f20977e Move CriticalSection into rtc_base_approved.
This class is being used from both libjingle and webrtc but we recently had a regression when we added dependency on libjingle's Thread class. This cleans that up and moves the implementation of CriticalSection and helper classes into the source file.

I'm also improving debugging facilities and constness.

BUG=
R=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/51769004

Cr-Commit-Position: refs/heads/master@{#9089}
2015-04-27 15:39:00 +00:00
67186fe00c Fix clang style warnings in webrtc/base
Mostly this consists of marking functions with override when
applicable, and moving function bodies from .h to .cc files.

Not inlining virtual functions with simple bodies such as

  { return false; }

strikes me as probably losing more in readability than we gain in
binary size and compilation time, but I guess it's just like any other
case where enabling a generally good warning forces us to write
slightly worse code in a couple of places.

BUG=163
R=kjellander@webrtc.org, tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/47429004

Cr-Commit-Position: refs/heads/master@{#8656}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8656 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-09 22:24:25 +00:00
679d2f1352 Disable CS_TRACK_OWNER on Mac in debug mode.
Local testing indicates that the pthread_t member variable might be causing alignment problems on the Chromium bots.  After landing this (and once the Chromium tree is open again), I'll try a roll again to see if this has an effect.

R=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48449004

Cr-Commit-Position: refs/heads/master@{#8644}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8644 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-03-07 20:15:24 +00:00
2af3057b24 Revert "When clearing the priority message queue, don't copy an item to itself."
This reverts commit 2bffc3cb72e2250cbf6ed7e5f4b399395ca046cb.

BUG=4100
R=juberti@webrtc.org,pthatcher@webrtc.org
TBR=juberti@webrtc.org,pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/38189004

Cr-Commit-Position: refs/heads/master@{#8450}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8450 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-21 02:00:26 +00:00
2bffc3cb72 When clearing the priority message queue, don't copy an item to itself.
This avoids a memcpy to overlapping---in this case the same---memory locations.

BUG=4100
R=juberti@webrtc.org, pthatcher@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/33019004

Cr-Commit-Position: refs/heads/master@{#8449}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8449 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-21 01:45:20 +00:00
ff689be3c0 Use std::min and std::max instead of self-defined functions such as rtc::_min/_max.
R=tommi@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35079004

Cr-Commit-Position: refs/heads/master@{#8347}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8347 4adac7df-926f-26a2-2b94-8c16560cd09d
2015-02-12 11:55:32 +00:00
99b4162ccf Rebase webrtc/base 6163:6216 (svn diff -r 6163:6216 http://webrtc.googlecode.com/svn/trunk/talk/base, apply diff manually)
BUG=3379
TBR=wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/17619004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6217 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-21 20:42:17 +00:00
f048872e91 Adds a modified copy of talk/base to webrtc/base. It is the first step in
migrating talk/base to webrtc/base.

BUG=N/A
R=niklas.enbom@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/17479005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6129 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-13 18:00:26 +00:00
e9a604accd Revert 6107 "Adds a modified copy of talk/base to webrtc/base. I..."
This breaks Chromium FYI builds and prevent roll of webrtc/libjingle to Chrome.

http://chromegw.corp.google.com/i/chromium.webrtc.fyi/builders/Win%20Builder/builds/457


> Adds a modified copy of talk/base to webrtc/base. It is the first step in migrating talk/base to webrtc/base.
> 
> BUG=N/A
> R=andrew@webrtc.org, wu@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/12199004

TBR=henrike@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/14479004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6116 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-13 08:15:48 +00:00
2c7d1b39b9 Adds a modified copy of talk/base to webrtc/base. It is the first step in migrating talk/base to webrtc/base.
BUG=N/A
R=andrew@webrtc.org, wu@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/12199004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6107 4adac7df-926f-26a2-2b94-8c16560cd09d
2014-05-12 18:03:09 +00:00