Closed
Bug 842411
Opened 11 years ago
Closed 11 years ago
Fire operation callback before time is up so we can test the non-aborting case
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: luke, Unassigned)
Details
Attachments
(1 file)
2.45 KB,
patch
|
terrence
:
review+
|
Details | Diff | Splinter Review |
Right now, AFAICS, there is no way to test the operation-callback-lets-execution-continue case. This happens a lot in the browser (not just when the user clicks "Continue" on the slow-script dialog, but at regular intervals before we decide to throw up the slow-script dialog. This patch changes WatchdogMain so it fires the callback 10 times a second until the timeout value is exceeded. Terrence, you reviewed Niko's patch to this code, so I think you're the reviewer for this patch, but Niko feel free to let me know if this looks right to you.
Attachment #715278 -
Flags: review?(terrence)
Comment 1•11 years ago
|
||
As part of bug 829602, I have a variation that I am hoping to land soon in which the user can supply a JS function to be called upon timeout: https://bug829602.bugzilla.mozilla.org/attachment.cgi?id=701098 I think this might address your use case?
Reporter | ||
Comment 2•11 years ago
|
||
That would also be good (and would allow us to test non-threadsafe builds). For threadsafe builds though, I like this change since it would mean we are *always* testing the non-abortive operation callback (well, any time we use timeout(), not just when we go through the effort of specifying a callback function that sometimes aborts).
Comment 3•11 years ago
|
||
Comment on attachment 715278 [details] [diff] [review] patch Review of attachment 715278 [details] [diff] [review]: ----------------------------------------------------------------- Excellent idea!
Attachment #715278 -
Flags: review?(terrence) → review+
Reporter | ||
Comment 4•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/408ad90d68dc
Comment 5•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/408ad90d68dc
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•