bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Improve comment for PR_FileDesc2NativeHandle in pprio.h.

RESOLVED FIXED in 4.7.2

Status

NSPR
NSPR
--
trivial
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Wan-Teh Chang, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.41 KB, patch
Details | Diff | Splinter Review
(Assignee)

Description

10 years ago
Created attachment 319123 [details] [diff] [review]
Proposed patch

Update an old comment that's no longer accurate.

Describe the caveats of using PR_FileDesc2NativeHandle.
Attachment #319123 - Flags: review?(nelson)
Comment on attachment 319123 [details] [diff] [review]
Proposed patch

r=nelson

>+** If you use this function, you need to understand what NSPR does to
>+** the native handle.  For example, NSPR puts native socket handles in
>+** non-blocking mode or associates them with an I/O completion port (the
>+** WINNT build configuration only).  Your use of the native handle should
>+** not interfere with NSPR's use of the native handle.

I might suggest making a stronger statement, e.g. 
If your code changes the configuration of the underlying native socket,
(e.g. changes it to blocking, or binds it, or closes it) NSPR will not 
work correctly.
Attachment #319123 - Flags: review?(nelson) → review+
(Assignee)

Comment 2

10 years ago
Created attachment 319236 [details] [diff] [review]
Proposed patch (as checked in)

Thank you for the suggestion, Nelson.  I added that sentence
to the comment.

I checked in the patch on the NSPR trunk (NSPR 4.7.2).

Checking in pprio.h;
/cvsroot/mozilla/nsprpub/pr/include/private/pprio.h,v  <--  pprio.h
new revision: 3.17; previous revision: 3.16
done
Attachment #319123 - Attachment is obsolete: true
(Assignee)

Updated

10 years ago
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.7.2
You need to log in before you can comment on or make changes to this bug.