Closed
Bug 1314341
Opened 8 years ago
Closed 8 years ago
Missing check for baseURI in ServiceWorkerManager::Register
Categories
(Core :: DOM: Service Workers, defect)
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
Details
Attachments
(1 file)
1.41 KB,
patch
|
bkelly
:
review+
|
Details | Diff | Splinter Review |
I found this writing a browser mochitest. Probably this cannot be reproduced in 'normal' content pages.
Attachment #8806440 -
Flags: review?(bkelly)
Comment 1•8 years ago
|
||
Comment on attachment 8806440 [details] [diff] [review] sw.patch Review of attachment 8806440 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/workers/ServiceWorkerContainer.cpp @@ +202,5 @@ > + nsAutoCString spec; > + scriptURI->GetSpec(spec); > + NS_ConvertUTF8toUTF16 wSpec(spec); > + aRv.ThrowTypeError<MSG_INVALID_SCOPE>(aOptions.mScope.Value(), wSpec); > + } nit: Can you use ternary to set the URI pointer and then avoid duplicating the rest here? Like: nsIURI* uri = baseURI ? baseURI : scriptURI; nsAutoCString spec; uri->GetSpec(spec); // etc
Attachment #8806440 -
Flags: review?(bkelly) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/cd3745be7445 Missing check for baseURI in ServiceWorkerManager::Register, r=bkelly
Comment 3•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cd3745be7445
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•