Closed Bug 1455210 Opened 7 years ago Closed 7 years ago

misleading use of CycleCollectedJSContext::Get() in WorkerPrivate

Categories

(Core :: DOM: Workers, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: karlt, Assigned: karlt)

Details

Attachments

(2 files)

This is just code clean-up. The behavior will not be changed. https://hg.mozilla.org/mozilla-central/diff/068c59c7c4ec/dom/workers/WorkerPrivate.cpp added a few CycleCollectedJSContext::Get() calls, most, but not all, with a null check. The null checks on the CycleCollectedJSContext pointer are misleading because they imply that it may be null. Some of these null checks were requested for no reason in review. e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1193394#c50 Similarly, fetching the CycleCollectedJSContext multiple times in one function is misleading as it implies the result may change.
Comment on attachment 8969161 [details] bug 1455210 remove misleading CycleCollectedJSContext null checks https://reviewboard.mozilla.org/r/237892/#review243620
Attachment #8969161 - Flags: review?(amarchesini) → review+
Comment on attachment 8969162 [details] bug 1455210 call CycleCollectedJSContext::Get() only once in EnterDebuggerEventLoop() https://reviewboard.mozilla.org/r/237894/#review243622
Attachment #8969162 - Flags: review?(amarchesini) → review+
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7c7be4064df1 remove misleading CycleCollectedJSContext null checks r=baku https://hg.mozilla.org/integration/autoland/rev/eb34acceb9dc call CycleCollectedJSContext::Get() only once in EnterDebuggerEventLoop() r=baku
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
No longer depends on: 1464568
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: