Closed Bug 1678374 Opened 4 years ago Closed 3 years ago

Cleanup includes around JS engine

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- wontfix
firefox88 --- fixed

People

(Reporter: sg, Assigned: sg)

References

Details

Attachments

(4 files, 1 obsolete file)

No description provided.
Component: General → JavaScript Engine
Product: Firefox Build System → Core
Severity: -- → N/A
Priority: -- → P3

Depends on D97614

Pushed by malexandru@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4687a0127320
Avoid including js/RootingAPI.h from header files. r=jandem
https://hg.mozilla.org/integration/autoland/rev/1631f34e1b79
Reduce dependencies on js, in particular on jsfriendapi.h. r=jandem
https://hg.mozilla.org/integration/autoland/rev/b3f3d3c0994d
Avoid including jsapi.h from header files. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---

One of the patches seems to cause the linker annotations to break, but only in a release build:

11:22.12 ld.lld: error: undefined hidden symbol: JS::SetHostCleanupFinalizationRegistryCallback(JSContext*, void (*)(JSFunction*, JSObject*, void*), void*)
11:22.12 >>> referenced by CycleCollectedJSContext.cpp:79 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:79)
11:22.12 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::~CycleCollectedJSContext())
11:22.12 >>> referenced by CycleCollectedJSContext.cpp:781 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:781)
11:22.12 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.13 ld.lld: error: undefined hidden symbol: JS_SetContextPrivate(JSContext*, void*)
11:22.13 >>> referenced by CycleCollectedJSContext.cpp:81 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:81)
11:22.13 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::~CycleCollectedJSContext())
11:22.13 >>> referenced by CycleCollectedJSContext.cpp:153 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:153)
11:22.13 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 ld.lld: error: undefined hidden symbol: JS_DestroyContext(JSContext*)
11:22.14 >>> referenced by CycleCollectedJSContext.cpp:107 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:107)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::~CycleCollectedJSContext())
11:22.14 >>> referenced by ProxyAutoConfig.cpp:617 (/home/simon/work/refactor/netwerk/base/ProxyAutoConfig.cpp:617)
11:22.14 >>>               lto.tmp:(mozilla::net::ProxyAutoConfig::SetupJS())
11:22.14 >>> referenced by ProxyAutoConfig.cpp:617 (/home/simon/work/refactor/netwerk/base/ProxyAutoConfig.cpp:617)
11:22.14 >>>               lto.tmp:(mozilla::net::ProxyAutoConfig::SetupJS())
11:22.14 >>> referenced 1 more times
11:22.14 ld.lld: error: undefined hidden symbol: JS_NewContext(unsigned int, JSRuntime*)
11:22.14 >>> referenced by CycleCollectedJSContext.cpp:126 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:126)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 >>> referenced by ProxyAutoConfig.cpp:593 (/home/simon/work/refactor/netwerk/base/ProxyAutoConfig.cpp:593)
11:22.14 >>>               lto.tmp:(mozilla::net::ProxyAutoConfig::SetupJS())
11:22.14 ld.lld: error: undefined hidden symbol: JS::SetJobQueue(JSContext*, JS::JobQueue*)
11:22.14 >>> referenced by CycleCollectedJSContext.cpp:140 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:140)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 ld.lld: error: undefined hidden symbol: JS::SetPromiseRejectionTrackerCallback(JSContext*, void (*)(JSContext*, bool, JS::Handle<JSObject*>, JS::PromiseRejectionHandlingState, void*), void*)
11:22.14 >>> referenced by CycleCollectedJSContext.cpp:141 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:141)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 ld.lld: error: undefined hidden symbol: JS::AddPersistentRoot(JS::RootingContext*, JS::RootKind, JS::PersistentRooted<void*>*)
11:22.14 >>> referenced by RootingAPI.h:1342 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/js/RootingAPI.h:1342)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 >>> referenced by RootingAPI.h:1342 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/js/RootingAPI.h:1342)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 >>> referenced by RootingAPI.h:1342 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/js/RootingAPI.h:1342)
11:22.14 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::Initialize(JSRuntime*, unsigned int))
11:22.14 >>> referenced 35 more times
11:22.14 ld.lld: error: undefined hidden symbol: JS::GetPromiseID(JS::Handle<JSObject*>)
11:22.15 >>> referenced by CycleCollectedJSContext.cpp:322 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:322)
11:22.15 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::PromiseRejectionTrackerCallback(JSContext*, bool, JS::Handle<JSObject*>, JS::PromiseRejectionHandlingState, void*))
11:22.15 >>> referenced by CycleCollectedJSContext.cpp:706 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:706)
11:22.15 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
11:22.15 >>> referenced by CycleCollectedJSContext.cpp:746 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:746)
11:22.15 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Cancel())
11:22.15 >>> referenced 1 more times
11:22.15 ld.lld: error: undefined hidden symbol: JS::GetPromiseResult(JS::Handle<JSObject*>)
11:22.15 >>> referenced by CycleCollectedJSContext.cpp:353 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:353)
11:22.15 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::PromiseRejectionTrackerCallback(JSContext*, bool, JS::Handle<JSObject*>, JS::PromiseRejectionHandlingState, void*))
11:22.15 >>> referenced by CycleCollectedJSContext.cpp:712 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:712)
11:22.15 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
11:22.15 >>> referenced by PromiseDebugging.cpp:95 (/home/simon/work/refactor/dom/promise/PromiseDebugging.cpp:95)
11:22.15 >>>               lto.tmp:(mozilla::dom::PromiseDebugging::GetState(mozilla::dom::GlobalObject&, JS::Handle<JSObject*>, mozilla::dom::PromiseDebuggingStateHolder&, mozilla::ErrorResult&))
11:22.15 >>> referenced 2 more times
11:22.15 ld.lld: error: undefined hidden symbol: JS_GetContextPrivate(JSContext*)
11:22.15 >>> referenced by CycleCollectedJSContext.cpp:163 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:163)
11:22.15 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::GetFor(JSContext*))
11:22.15 >>> referenced by AtomList.h:18 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/mozilla/dom/AtomList.h:18)
11:22.15 >>>               lto.tmp:(mozilla::dom::FrameUniformityResults::ToObjectInternal(JSContext*, JS::MutableHandle<JS::Value>) const)
11:22.15 >>> referenced by AtomList.h:18 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/mozilla/dom/AtomList.h:18)
11:22.15 >>>               lto.tmp:(mozilla::dom::FrameUniformityResults::ToObjectInternal(JSContext*, JS::MutableHandle<JS::Value>) const)
11:22.15 >>> referenced 792 more times
11:22.16 ld.lld: error: undefined hidden symbol: JS::CurrentGlobalOrNull(JSContext*)
11:22.16 >>> referenced by CycleCollectedJSContext.cpp:250 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:250)
11:22.16 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>))
11:22.16 >>> referenced by WrapperFactory.cpp:808 (/home/simon/work/refactor/js/xpconnect/wrappers/WrapperFactory.cpp:808)
11:22.16 >>>               lto.tmp:(nsSystemInfo::GetProcessInfo(JSContext*, mozilla::dom::Promise**))
11:22.16 >>> referenced by ToJSValue.h:337 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/mozilla/dom/ToJSValue.h:337)
11:22.16 >>>               lto.tmp:(mozilla::intl::Localization::FormatValues(JSContext*, mozilla::dom::Sequence<mozilla::dom::OwningUTF8StringOrL10nIdArgs> const&, mozilla::ErrorResult&))
11:22.16 >>> referenced 2778 more times
11:22.16 ld.lld: error: undefined hidden symbol: JS::GetPromiseUserInputEventHandlingState(JS::Handle<JSObject*>)
11:22.16 >>> referenced by CycleCollectedJSContext.cpp:186 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:186)
11:22.16 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::enqueuePromiseJob(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>, JS::Handle<JSObject*>))
11:22.17 ld.lld: error: undefined hidden symbol: JS::JobQueueMayNotBeEmpty(JSContext*)
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:635 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:635)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool))
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:562 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:562)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::DispatchToMicroTask(already_AddRefed<mozilla::MicroTaskRunnable>))
11:22.17 >>> referenced by RuntimeService.cpp:938 (/home/simon/work/refactor/dom/workers/RuntimeService.cpp:938)
11:22.17 >>>               lto.tmp:(mozilla::dom::WorkerJSContext::DispatchToMicroTask(already_AddRefed<mozilla::MicroTaskRunnable>))
11:22.17 >>> referenced 1 more times
11:22.17 ld.lld: error: undefined hidden symbol: JS::JobQueueIsEmpty(JSContext*)
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:640 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:640)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::PerformMicroTaskCheckPoint(bool))
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:685 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:685)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::PerformDebuggerMicroTaskCheckpoint())
11:22.17 ld.lld: error: undefined hidden symbol: js::MallocArena
11:22.17 >>> referenced by Utility.h:387 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/js/Utility.h:387)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::saveJobQueue(JSContext*))
11:22.17 >>> referenced by Vector.h:0 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/mozilla/Vector.h:0)
11:22.17 >>>               lto.tmp:(mozilla::Vector<JS::Value, 8ul, js::TempAllocPolicy>::growStorageBy(unsigned long))
11:22.17 >>> referenced by AllocPolicy.h:160 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/js/AllocPolicy.h:160)
11:22.17 >>>               lto.tmp:(mozilla::Vector<JS::Value, 8ul, js::TempAllocPolicy>::growStorageBy(unsigned long))
11:22.17 >>> referenced 75 more times
11:22.17 ld.lld: error: undefined hidden symbol: JS_ReportOutOfMemory(JSContext*)
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:301 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:301)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::saveJobQueue(JSContext*))
11:22.17 >>> referenced by Dashboard.cpp:549 (/home/simon/work/refactor/netwerk/base/Dashboard.cpp:549)
11:22.17 >>>               lto.tmp:(mozilla::net::Dashboard::GetSockets(mozilla::net::SocketData*))
11:22.17 >>> referenced by Dashboard.cpp:0 (/home/simon/work/refactor/netwerk/base/Dashboard.cpp:0)
11:22.17 >>>               lto.tmp:(mozilla::net::Dashboard::GetHttpConnections(mozilla::net::HttpData*))
11:22.17 >>> referenced 588 more times
11:22.17 ld.lld: error: undefined hidden symbol: JS::IsIdleGCTaskNeeded(JSRuntime*)
11:22.17 >>> referenced by CycleCollectedJSRuntime.h:298 (/home/simon/work/refactor/obj-x86_64-pc-linux-gnu-release/dist/include/mozilla/CycleCollectedJSRuntime.h:298)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::AfterProcessTask(unsigned int))
11:22.17 ld.lld: error: undefined hidden symbol: JS::ClearKeptObjects(JSContext*)
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:490 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:490)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::AfterProcessMicrotasks())
11:22.17 ld.lld: error: undefined hidden symbol: JS::GetPromiseIsHandled(JS::Handle<JSObject*>)
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:707 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:707)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:724 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:724)
11:22.17 >>>               lto.tmp:(mozilla::CycleCollectedJSContext::NotifyUnhandledRejections::Run())
11:22.17 ld.lld: error: undefined hidden symbol: JS_GetFunctionObject(JSFunction*)
11:22.17 >>> referenced by CycleCollectedJSContext.cpp:817 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSContext.cpp:817)
11:22.17 >>>               lto.tmp:(mozilla::FinalizationRegistryCleanup::DoCleanup())
11:22.17 >>> referenced by CycleCollectedJSRuntime.cpp:1328 (/home/simon/work/refactor/xpcom/base/CycleCollectedJSRuntime.cpp:1328)
11:22.18 >>>               lto.tmp:(CheckZoneTracer::Trace(JS::Heap<JSFunction*>*, char const*, void*) const)
11:22.18 >>> referenced by XrayWrapper.cpp:414 (/home/simon/work/refactor/js/xpconnect/wrappers/XrayWrapper.cpp:414)
11:22.18 >>>               lto.tmp:(xpc::TryResolvePropertyFromSpecs(JSContext*, JS::Handle<JS::PropertyKey>, JS::Handle<JSObject*>, JSFunctionSpec const*, JSPropertySpec const*, JS::MutableHandle<JS::PropertyDescriptor>))

Jeff, maybe you have an idea what to look for that might cause this?

Attachment #9188902 - Attachment is obsolete: true
Pushed by sgiesecke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8fdbcaa80217
Fix includes in js/public. r=jandem

The issue mentioned in comment 8 is gone, the final patch has landed, and the bug will be closed once it reaches m-c.

Status: REOPENED → RESOLVED
Closed: 4 years ago3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: