mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-05 05:30:29 +00:00
Bug 1332523 - Make the Bootstrap API entry point the same for both dependent and standalone linkage. r=bsmedberg
--HG-- extra : rebase_source : 21d9371dfa0a7ed7ff056d8486f28c978df8932d
This commit is contained in:
parent
9d2b3754b7
commit
f9c3dd278b
@ -18,8 +18,7 @@ main(int argc, char *argv[])
|
||||
DllBlocklist_Initialize();
|
||||
#endif
|
||||
|
||||
Bootstrap::UniquePtr bootstrap;
|
||||
XRE_GetBootstrap(bootstrap);
|
||||
Bootstrap::UniquePtr bootstrap = GetBootstrap();
|
||||
if (!bootstrap) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -19,8 +19,7 @@ main(int argc, char** argv)
|
||||
if (argc < 2)
|
||||
return 1;
|
||||
|
||||
Bootstrap::UniquePtr bootstrap;
|
||||
XRE_GetBootstrap(bootstrap);
|
||||
Bootstrap::UniquePtr bootstrap = GetBootstrap();
|
||||
if (!bootstrap) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -60,8 +60,7 @@ main(int argc, char** argv, char** envp)
|
||||
mozilla::sandboxing::GetInitializedBrokerServices();
|
||||
#endif
|
||||
|
||||
mozilla::Bootstrap::UniquePtr bootstrap;
|
||||
XRE_GetBootstrap(bootstrap);
|
||||
mozilla::Bootstrap::UniquePtr bootstrap = mozilla::GetBootstrap();
|
||||
if (!bootstrap) {
|
||||
return 2;
|
||||
}
|
||||
|
@ -125,9 +125,20 @@ public:
|
||||
* "C" linkage. On failure this will be null.
|
||||
* @note This function may only be called once and will crash if called again.
|
||||
*/
|
||||
#ifdef XPCOM_GLUE
|
||||
typedef void (*GetBootstrapType)(Bootstrap::UniquePtr&);
|
||||
Bootstrap::UniquePtr GetBootstrap(const char* aXPCOMFile=nullptr);
|
||||
#else
|
||||
extern "C" NS_EXPORT void NS_FROZENCALL
|
||||
XRE_GetBootstrap(Bootstrap::UniquePtr& b);
|
||||
typedef void (*GetBootstrapType)(Bootstrap::UniquePtr&);
|
||||
|
||||
inline Bootstrap::UniquePtr
|
||||
GetBootstrap(const char* aXPCOMFile=nullptr) {
|
||||
Bootstrap::UniquePtr bootstrap;
|
||||
XRE_GetBootstrap(bootstrap);
|
||||
return bootstrap;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user