Closed Bug 1628201 Opened 2 months ago Closed 1 month ago

HelperThreadTaskHandler should use UniquePtr for mOffThreadTask

Categories

(Core :: XPConnect, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

HelperThreadTaskHandler use the RunnableTask* passed by HelperThreadTaskCallback()
https://searchfox.org/mozilla-central/rev/a707541ff423ade0d81cef6488e6ecfa09273886/js/xpconnect/src/XPCJSThreadPool.h#27

The ownership of the RunableTask could be forwarded to XPCOM thread pool.

Status: NEW → ASSIGNED
Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/152d46945b27
HelperThreadTaskHandler should use UniquePtr for mOffThreadTask. r=KrisWright

lld-link: error: undefined symbol: void (__cdecl *js::HelperThreadTaskCallback)(class mozilla::UniquePtr<struct js::RunnableTask, struct JS::DeletePolicy<struct js::RunnableTask>>)

It looks like for windows,
The definition in JSRuntime.cpp
void (*HelperThreadTaskCallback)(UniquePtr<RunnableTask>);
the parameter UniquePtr, it uses mozilla::UniquePtr instead of js::UniquePtr, will add js:: to fix this.

Flags: needinfo?(allstars.chh)
Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/ad3f58c996e5
HelperThreadTaskHandler should use UniquePtr for mOffThreadTask. r=KrisWright

Filed Bug 1630189 for the weird linking error on windows pgo build and
use MOZ_NEVER_INLINE to prevent it.

fixed the linking error in my 2nd patch.

Flags: needinfo?(allstars.chh)
Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/83bb64e5b26d
HelperThreadTaskHandler should use UniquePtr for mOffThreadTask. r=KrisWright
https://hg.mozilla.org/integration/autoland/rev/dd0e24feda2d
Use MOZ_NEVER_INLINE to prevent linking error on windows pgo build. r=dmajor
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.