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

Side by Side Diff: nspr/pr/src/misc/prtrace.c

Issue 200653003: Update to NSPR 4.10.4. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nspr/pr/src/misc/prnetdb.c ('k') | nspr/pr/src/pthreads/ptio.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public 2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 5
6 /* 6 /*
7 ** prtrace.c -- NSPR Trace Instrumentation 7 ** prtrace.c -- NSPR Trace Instrumentation
8 ** 8 **
9 ** Implement the API defined in prtrace.h 9 ** Implement the API defined in prtrace.h
10 ** 10 **
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (!PR_CLIST_IS_EMPTY( &qNameList )) 215 if (!PR_CLIST_IS_EMPTY( &qNameList ))
216 { 216 {
217 qnp = (QName *) PR_LIST_HEAD( &qNameList ); 217 qnp = (QName *) PR_LIST_HEAD( &qNameList );
218 do { 218 do {
219 if ( strcmp(qnp->name, qName) == 0) 219 if ( strcmp(qnp->name, qName) == 0)
220 { 220 {
221 matchQname = PR_TRUE; 221 matchQname = PR_TRUE;
222 break; 222 break;
223 } 223 }
224 qnp = (QName *)PR_NEXT_LINK( &qnp->link ); 224 qnp = (QName *)PR_NEXT_LINK( &qnp->link );
225 } while( qnp != (QName *)PR_LIST_HEAD( &qNameList )); 225 } while( qnp != (QName *)&qNameList );
226 } 226 }
227 /* 227 /*
228 ** If we did not find a matching QName, 228 ** If we did not find a matching QName,
229 ** allocate one and initialize it. 229 ** allocate one and initialize it.
230 ** link it onto the qNameList. 230 ** link it onto the qNameList.
231 ** 231 **
232 */ 232 */
233 if ( matchQname != PR_TRUE ) 233 if ( matchQname != PR_TRUE )
234 { 234 {
235 qnp = PR_NEWZAP( QName ); 235 qnp = PR_NEWZAP( QName );
236 PR_ASSERT( qnp != NULL ); 236 PR_ASSERT( qnp != NULL );
237 PR_INIT_CLIST( &qnp->link ); 237 PR_INIT_CLIST( &qnp->link );
238 PR_INIT_CLIST( &qnp->rNameList ); 238 PR_INIT_CLIST( &qnp->rNameList );
239 strcpy( qnp->name, qName ); 239 strcpy( qnp->name, qName );
240 PR_APPEND_LINK( &qnp->link, &qNameList ); 240 PR_APPEND_LINK( &qnp->link, &qNameList );
241 } 241 }
242 242
243 /* Do we already have a matching RName? */ 243 /* Do we already have a matching RName? */
244 if (!PR_CLIST_IS_EMPTY( &qnp->rNameList )) 244 if (!PR_CLIST_IS_EMPTY( &qnp->rNameList ))
245 { 245 {
246 rnp = (RName *) PR_LIST_HEAD( &qnp->rNameList ); 246 rnp = (RName *) PR_LIST_HEAD( &qnp->rNameList );
247 do { 247 do {
248 /* 248 /*
249 ** No duplicate RNames are allowed within a QName 249 ** No duplicate RNames are allowed within a QName
250 ** 250 **
251 */ 251 */
252 PR_ASSERT( strcmp(rnp->name, rName)); 252 PR_ASSERT( strcmp(rnp->name, rName));
253 rnp = (RName *)PR_NEXT_LINK( &rnp->link ); 253 rnp = (RName *)PR_NEXT_LINK( &rnp->link );
254 } while( rnp != (RName *)PR_LIST_HEAD( &qnp->rNameList )); 254 } while( rnp != (RName *)&qnp->rNameList );
255 } 255 }
256 256
257 /* Get a new RName structure; initialize its members */ 257 /* Get a new RName structure; initialize its members */
258 rnp = PR_NEWZAP( RName ); 258 rnp = PR_NEWZAP( RName );
259 PR_ASSERT( rnp != NULL ); 259 PR_ASSERT( rnp != NULL );
260 PR_INIT_CLIST( &rnp->link ); 260 PR_INIT_CLIST( &rnp->link );
261 strcpy( rnp->name, rName ); 261 strcpy( rnp->name, rName );
262 strcpy( rnp->desc, description ); 262 strcpy( rnp->desc, description );
263 rnp->lock = PR_NewLock(); 263 rnp->lock = PR_NewLock();
264 rnp->state = Running; 264 rnp->state = Running;
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 879
880 *found = copied; 880 *found = copied;
881 rc = ( fetchLostData == PR_TRUE )? 1 : 0; 881 rc = ( fetchLostData == PR_TRUE )? 1 : 0;
882 fetchLostData = PR_FALSE; 882 fetchLostData = PR_FALSE;
883 883
884 PR_Unlock( traceLock ); 884 PR_Unlock( traceLock );
885 return rc; 885 return rc;
886 } /* end PR_GetTraceEntries() */ 886 } /* end PR_GetTraceEntries() */
887 887
888 /* end prtrace.c */ 888 /* end prtrace.c */
OLDNEW
« no previous file with comments | « nspr/pr/src/misc/prnetdb.c ('k') | nspr/pr/src/pthreads/ptio.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698