Closed Bug 1152602 Opened 10 years ago Closed 10 years ago

Useless counter value in dom/workers/test/serviceworkers/importscript.sjs

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: ehsan.akhgari, Assigned: baku)

References

Details

Attachments

(1 file, 1 obsolete file)

The counter variable there is only ever read from... Is that test really doing what we want?
Flags: needinfo?(amarchesini)
Attached patch counter.patch (obsolete) — Splinter Review
Flags: needinfo?(amarchesini)
Attachment #8590127 - Flags: review?(ehsan)
Comment on attachment 8590127 [details] [diff] [review] counter.patch Review of attachment 8590127 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/test/serviceworkers/importscript.sjs @@ +2,5 @@ > function handleRequest(request, response) { > if (!counter) { > response.setHeader("Content-Type", "application/javascript", false); > response.write("callByScript();"); > + counter++; I'm not sure if this does the right thing. Have you tested this? As far as I know, global variables are not preserved across sjs runs. You probably need to use the getState/setState APIs: <https://dxr.mozilla.org/mozilla-central/source/netwerk/test/httpserver/nsIHttpServer.idl#184>
Attachment #8590127 - Flags: review?(ehsan) → review-
Attached patch counter.patchSplinter Review
Attachment #8590127 - Attachment is obsolete: true
Attachment #8590433 - Flags: review?(ehsan)
Attachment #8590433 - Flags: review?(ehsan) → review+
Assignee: nobody → amarchesini
OS: Mac OS X → All
Hardware: x86 → All
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: