Closed Bug 554171 Opened 15 years ago Closed 9 years ago

Add thread checks to several functions that must only be called on the main thread

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: bent.mozilla, Assigned: cpeterson)

Details

Attachments

(1 file)

_getvalueforurl _setvalueforurl _getauthenticationinfo _scheduletimer _unscheduletimer _popupcontextmenu _convertpoint All these need thread checks.
1. Add plugin thread checks to functions that must only be called on the main thread. I did some basic testing of Flash and Silverlight and didn't see them calling these APIs from a non-main thread, but they could still have some uncommon code paths that might. This bug has been open for five years and these APIs modify global shared state, so presumably plugins are well behaved or we have random crashes that we have just not attributed to these data races? 2. s/NPN_write/NPN_destroystream/ in _destroystream log message. 3. Remove redundant !url check in _setvalueforurl.
Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Attachment #8648588 - Flags: review?(jmathies)
Comment on attachment 8648588 [details] [diff] [review] plugin-main-thread-checks.patch Review of attachment 8648588 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/plugins/base/nsNPAPIPlugin.cpp @@ +2703,5 @@ > > switch (variable) { > case NPNURLVCookie: > { > + if (!value || 0 == len) lets reverse this - len == 0, or since this is unsigned, I think you could just do !len.
Attachment #8648588 - Flags: review?(jmathies) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: