Closed
Bug 1257480
Opened 9 years ago
Closed 9 years ago
null check for GetOrCreateGlobalScope() in WorkerDebuggerGlobalScope
Categories
(Core :: DOM: Workers, defect)
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: baku, Assigned: baku)
References
Details
Attachments
(1 file)
(deleted),
patch
|
khuey
:
review+
ejpbruel
:
feedback+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8731626 -
Flags: review?(khuey)
Assignee | ||
Comment 1•9 years ago
|
||
I wrote this patch because I'm not 100% sure that we have a WorkerGlobalScope at any time we are playing with a WorkerDebuggerGlobalScope. If this is, we don't need all these security checks and we can use directory WorkerPrivate::GlobalScope().
Attachment #8731626 -
Flags: review?(khuey) → review+
Component: DOM → DOM: Workers
Attachment #8731626 -
Flags: feedback?(ejpbruel)
Comment 2•9 years ago
|
||
Comment on attachment 8731626 [details] [diff] [review]
console0.patch
GetOrCreateGlobalScope gets the worker's global scope, or creates it if it doesn't yet exist (this can happen, because the worker is registered before it starts running, so the debugger can initialise before the worker itself).
In other words, GetOrCreateGlobalScope can never return nullptr, so this patch is unnecessary.
Attachment #8731626 -
Flags: feedback?(ejpbruel) → feedback-
Assignee | ||
Comment 3•9 years ago
|
||
Good. It means that we can use WorkerPrivate::GlobalScope() directly. New patch coming.
Assignee | ||
Comment 4•9 years ago
|
||
Hold on, GetOrCreateGlobalScope() can fail. This patch covers this scenario.
Assignee | ||
Updated•9 years ago
|
Flags: needinfo?(ejpbruel)
Comment 5•9 years ago
|
||
Huh. You're right!
I don't know if this was originally not the case, or that we just forgot to check for it properly. In any case, we need to check against it, which is what your patch.
Good catch!
Flags: needinfo?(ejpbruel)
Updated•9 years ago
|
Attachment #8731626 -
Flags: feedback- → feedback+
Comment 7•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•