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

Unified Diff: nspr/pr/src/md/windows/w95thred.c

Issue 1843333003: Update NSPR to 4.12 and NSS to 3.23 on iOS (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: nspr/pr/src/md/windows/w95thred.c
diff --git a/nspr/pr/src/md/windows/w95thred.c b/nspr/pr/src/md/windows/w95thred.c
index b2cebaed3de53dafe2584e1ff59a5b2c120a8f16..2741d9482a153a0081e723039dd59416212c309a 100644
--- a/nspr/pr/src/md/windows/w95thred.c
+++ b/nspr/pr/src/md/windows/w95thred.c
@@ -65,7 +65,7 @@ _PR_MD_INIT_THREAD(PRThread *thread)
** suspending). Therefore, get a real handle from
** the pseudo handle via DuplicateHandle(...)
*/
- DuplicateHandle(
+ BOOL ok = DuplicateHandle(
GetCurrentProcess(), /* Process of source handle */
GetCurrentThread(), /* Pseudo Handle to dup */
GetCurrentProcess(), /* Process of handle */
@@ -73,6 +73,11 @@ _PR_MD_INIT_THREAD(PRThread *thread)
0L, /* access flags */
FALSE, /* Inheritable */
DUPLICATE_SAME_ACCESS); /* Options */
+ if (!ok) {
+ return PR_FAILURE;
+ }
+ thread->id = GetCurrentThreadId();
+ thread->md.id = thread->id;
}
/* Create the blocking IO semaphore */

Powered by Google App Engine
This is Rietveld 408576698