Closed
Bug 499921
Opened 14 years ago
Closed 14 years ago
add support for NPAPI NPN_ScheduleTimer/NPN_UnscheduleTimer
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jaas, Assigned: jaas)
References
Details
Attachments
(1 file, 2 obsolete files)
27.85 KB,
patch
|
Details | Diff | Splinter Review |
We should add support for NPAPI NPN_ScheduleTimer/NPN_UnscheduleTimer. This was originally specified as part of the Cocoa NPAPI event model but it not specific to the Cocoa event model.
Fully functional implementation with tests, but I think it leaks. More on that soon.
Fixes memory leaks.
Attachment #384818 -
Attachment is obsolete: true
Attachment #384947 -
Flags: review?(bent.mozilla)
Updated•14 years ago
|
Attachment #384947 -
Flags: review?(jst)
Attachment #384947 -
Flags: review?(jst) → superreview?(jst)
Comment 3•14 years ago
|
||
Comment on attachment 384947 [details] [diff] [review] fix v1.1 - In timerTest(): + id->timerID1 = NPN_ScheduleTimer(npp, 50, false, timerCallback); + id->timerID2 = NPN_ScheduleTimer(npp, 150, true, timerCallback); + + NPObject* windowObject; + NPN_GetValue(npp, NPNVWindowNPObject, &windowObject); + if (!windowObject) { + NPN_UnscheduleTimer(npp, id->timerID1); + NPN_UnscheduleTimer(npp, id->timerID2); + return false; + } If you call NPN_GetValue() before you schedule the timers here you don't need to worry about unscheduling if getting the window fails here. r+sr=jst. But was this discussed on plugin-futures yet? I know apple shipped this w/o any discussion, but I really don't think we should put this in the tree before we at least announce these API changes.
Attachment #384947 -
Flags: superreview?(jst)
Attachment #384947 -
Flags: superreview+
Attachment #384947 -
Flags: review?(bent.mozilla)
Attachment #384947 -
Flags: review+
Updated to current trunk, addresses jst's comment, includes some header file cleanup.
Attachment #384947 -
Attachment is obsolete: true
We should file a bug about pausing NPAPI timers when a window minimizes. I think WebKit does that.
pushed to mozilla-central http://hg.mozilla.org/mozilla-central/rev/6135c784b458
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Filed bug 501702 about possibly pausing timers when windows minimize.
Updated•10 months ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•