Bug 1628201 : Use MOZ_NEVER_INLINE to prevent linking error on windows pgo build. r=dmajor
authorYoshi Cheng-Hao Huang <allstars.chh@gmail.com>
Thu, 16 Apr 2020 17:36:55 +0000
changeset 524572 dd0e24feda2d5e7825915c7d8df947b4cde4b792
parent 524571 83bb64e5b26d6a318400fad084afdc7d26afd68b
child 524573 c4b9a9cfe19910239554102b9f95c18cfb7cfb39
push id37323
push userdluca@mozilla.com
push dateFri, 17 Apr 2020 16:25:55 +0000
treeherdermozilla-central@b4b1d6f91ef0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdmajor
bugs1628201, 1630189
milestone77.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1628201 : Use MOZ_NEVER_INLINE to prevent linking error on windows pgo build. r=dmajor Filed Bug 1630189 for the weird linking error on windows pgo build and use MOZ_NEVER_INLINE to prevent it. Differential Revision: https://phabricator.services.mozilla.com/D71162
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -1903,17 +1903,21 @@ JS_PUBLIC_API JSObject* JS_NewObjectForC
 
 JS_PUBLIC_API bool JS_IsNative(JSObject* obj) { return obj->isNative(); }
 
 JS_PUBLIC_API void JS::AssertObjectBelongsToCurrentThread(JSObject* obj) {
   JSRuntime* rt = obj->compartment()->runtimeFromAnyThread();
   MOZ_RELEASE_ASSERT(CurrentThreadCanAccessRuntime(rt));
 }
 
-JS_PUBLIC_API void SetHelperThreadTaskCallback(
+// TODO:
+// Bug 1630189: Windows PGO build will have a linking error for
+// HelperThreadTaskCallback, use MOZ_NEVER_INLINE to prevent this. See
+// https://bugzilla.mozilla.org/show_bug.cgi?id=1630189#c4
+JS_PUBLIC_API MOZ_NEVER_INLINE void SetHelperThreadTaskCallback(
     void (*callback)(js::UniquePtr<js::RunnableTask>)) {
   HelperThreadTaskCallback = callback;
 }
 
 JS_PUBLIC_API void JS::SetFilenameValidationCallback(
     JS::FilenameValidationCallback cb) {
   js::gFilenameValidationCallback = cb;
 }