Closed
Bug 1057135
Opened 10 years ago
Closed 10 years ago
ServiceWorkerManager::Register() should use entry settings object
Categories
(Core :: DOM: Workers, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: nsm, Assigned: nsm)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
ehsan.akhgari
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED
Assignee | ||
Updated•10 years ago
|
Attachment #8477074 -
Flags: review?(ehsan)
Comment 2•10 years ago
|
||
Comment on attachment 8477074 [details] [diff] [review]
Bug 1057135 - ServiceWorkerManager::Register() uses entry global
Review of attachment 8477074 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/workers/ServiceWorkerManager.cpp
@@ +555,5 @@
> MOZ_ASSERT(!nsContentUtils::IsCallerChrome());
>
> + nsCOMPtr<nsIGlobalObject> sgo = GetEntryGlobal();
> + if (!sgo) {
> + NS_WARNING("Register() should only be called from a valid entry settings object!");
Please use MOZ_ASSERT instead, we don't want people to get this wrong by accident.
@@ +622,5 @@
> + return NS_ERROR_FAILURE;
> + }
> +
> + nsCOMPtr<nsPIDOMWindow> window = do_QueryObject(sgo);
> + if (!window) {
I wonder if this can really happen... I guess better safe than sorry.
Attachment #8477074 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
Comment 5•10 years ago
|
||
Per IRC discussion just now, the "return NS_ERROR_FAILURE;" line after the MOZ_CRASH (from comment 4) is unreachable and should be removed.
Flags: needinfo?(nsm.nikhil)
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(nsm.nikhil)
Comment 6•10 years ago
|
||
Looks like the unreachable "return NS_ERROR_FAILURE" from comment 5 still exists on inbound tip -- adding back needinfo=nsm to remove it in a followup.
Flags: needinfo?(nsm.nikhil)
Comment 7•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cad3b206c267
https://hg.mozilla.org/mozilla-central/rev/0fab98234790
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Assignee | ||
Comment 8•10 years ago
|
||
Simplifies the whole shebang.
Attachment #8478652 -
Flags: review?(ehsan)
Assignee | ||
Updated•10 years ago
|
Attachment #8477074 -
Attachment is obsolete: true
Updated•10 years ago
|
Attachment #8478652 -
Flags: review?(ehsan) → review+
Assignee | ||
Comment 9•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Flags: needinfo?(nsm.nikhil)
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
:nsm, was this patch backed out, I see stuff landed on the 22nd and the 25th, but no real context in the bug about what it is?
I ask because on the 22nd there was a 6% linux64 dromaeo dom regression which disappeared on the 25th.
Flags: needinfo?(nsm.nikhil)
Assignee | ||
Comment 12•10 years ago
|
||
nope it's still there, and I can't think of any way this patch would cause the regression, so I never acted on the dromaeo warning email I received :)
Flags: needinfo?(nsm.nikhil)
Comment 13•10 years ago
|
||
ok, it does appear that this change did cause a regression and I am only making an assumption it was fixed by the followup change. Either way we are not looking at a regression on firefox 34, so there is no need to worry!
You need to log in
before you can comment on or make changes to this bug.
Description
•