Closed Bug 1002571 Opened 11 years ago Closed 10 years ago

Implement ServiceWorkerContainer.getRegistrations() and ServiceWorkerContainer.getRegistration()

Categories

(Core :: DOM: Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: nsm, Assigned: baku)

References

Details

Attachments

(1 file, 3 obsolete files)

GetAll has been renamed to getRegistrations
Summary: Implement ServiceWorkerContainer.getAll() → Implement ServiceWorkerContainer.getRegistrations()
Assignee: nobody → amarchesini
Attached patch getRegistrations.patch (obsolete) — Splinter Review
Attachment #8469147 - Flags: review?(nsm.nikhil)
Summary: Implement ServiceWorkerContainer.getRegistrations() → Implement ServiceWorkerContainer.getRegistrations() and ServiceWorkerContainer.getRegistration()
Attached patch getRegistrations.patch (obsolete) — Splinter Review
This new patch implements both getRegistration and getRegistrations
Attachment #8469147 - Attachment is obsolete: true
Attachment #8469147 - Flags: review?(nsm.nikhil)
Attachment #8469200 - Flags: review?(nsm.nikhil)
Attached patch getRegistrations.patch (obsolete) — Splinter Review
tests updated.
Attachment #8469200 - Attachment is obsolete: true
Attachment #8469200 - Flags: review?(nsm.nikhil)
Attachment #8469214 - Flags: review?(nsm.nikhil)
Comment on attachment 8469214 [details] [diff] [review] getRegistrations.patch Review of attachment 8469214 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/ServiceWorkerManager.cpp @@ +585,5 @@ > + } > + > + for (uint32_t i = 0; i < domainInfo->mOrderedScopes.Length(); ++i) { > + nsresult rv = principal->CheckMayLoad(docURI, true /* report */, > + false /* allowIfInheritsPrinciple */); I don't understand this, principal and docURI are derived from the same document. @@ +592,5 @@ > + } > + > + nsRefPtr<ServiceWorkerRegistration> swr = > + new ServiceWorkerRegistration(mWindow, > + NS_ConvertUTF8toUTF16(domainInfo->mOrderedScopes[i])); Indentation. @@ +629,5 @@ > + > + nsCOMPtr<nsIURI> documentURI = window->GetDocumentURI(); > + if (!documentURI) { > + return NS_ERROR_FAILURE; > + } This entire block in unnecessary when the runnable deals with it, correct? @@ +735,5 @@ > + > + nsCOMPtr<nsIURI> documentURI = window->GetDocumentURI(); > + if (!documentURI) { > + return NS_ERROR_FAILURE; > + } This entire block in unnecessary when the runnable deals with it, correct?
Attachment #8469214 - Flags: review?(nsm.nikhil) → review-
Attachment #8469214 - Attachment is obsolete: true
Attachment #8476120 - Flags: review?(nsm.nikhil)
Attachment #8476120 - Flags: review?(nsm.nikhil) → review+
OS: Linux → All
Hardware: x86_64 → All
Keywords: checkin-needed
Do you have a link to a recent try run handy for this patch before we check it in?
Flags: needinfo?(amarchesini)
Keywords: checkin-needed
Here is one with the patch https://tbpl.mozilla.org/?tree=Try&rev=28d7624a47fe The related mochitests are actually disabled on non-windows platforms, so it should be ok to take this.
Flags: needinfo?(amarchesini)
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: