Closed Bug 593061 Opened 14 years ago Closed 14 years ago

setTimer / setInterval don't behave as expected

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: irakli, Assigned: irakli)

References

Details

Attachments

(1 file, 1 obsolete file)

setTimeout & setInterval behaves differently from the browsers native same named functions.

Example:

setTimeout(function(test) { console.log(Array.prototype.slice(arguments)) }, 0, 'some data', 3, 'bla');

Expected behavior:
"some data,3,bla" to be logged in the console
Actual behavior:
""
Assignee: nobody → rFobic
Attached patch Fix (obsolete) — Splinter Review
Attachment #471534 - Flags: review?(avarma)
Comment on attachment 471534 [details] [diff] [review]
Fix

Cool, do you think you could add tests for this in tests/test-timer.js though?
Attachment #471534 - Flags: review?(avarma) → review-
Sure!! Don't know why forgot to do that in a first patch.
Attachment #471534 - Attachment is obsolete: true
Attachment #471795 - Flags: review?(avarma)
Comment on attachment 471795 [details] [diff] [review]
adding test + docs

Awesome! Do you have commit access to the repo yet, or should I commit it?
Attachment #471795 - Flags: review?(avarma) → review+
No I don't have it yet.
Wold be nice if you'll commit it.
Keywords: push-needed
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Hey, is this patch bit-rotted or anything? I'm trying to commit it, but I'm getting a weird "hunk failure" on test-timer.js.

I'm going to keep this bug open until it's landed, if that's ok--otherwise I might lose track of it.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I sew it was committed already:
https://hg.mozilla.org/labs/jetpack-sdk/rev/0c846452f77c

I thought it was you.. Guess you can commit because patch is already in your tip
I meant you can't because ...
Oh, nice! Sorry about that, re-marking the bug as fixed.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → FIXED
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: