Skip to content

Commit d4a8935

Browse files
committed
Bug 586711 - Incubator embedding requires switching to XRE_InitEmbedding2. r=mark.finkle
1 parent bfe367e commit d4a8935

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

common/EmbeddingSetup.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ using namespace std;
6868
# define MAX_PATH PATH_MAX
6969
#endif
7070

71-
XRE_InitEmbeddingType XRE_InitEmbedding = 0;
71+
XRE_InitEmbedding2Type XRE_InitEmbedding2 = 0;
7272
XRE_TermEmbeddingType XRE_TermEmbedding = 0;
7373
XRE_NotifyProfileType XRE_NotifyProfile = 0;
7474
XRE_LockProfileDirectoryType XRE_LockProfileDirectory = 0;
@@ -148,9 +148,7 @@ MozEmbedDirectoryProvider::GetFiles(const char *aKey,
148148
return dp2->GetFiles(aKey, aResult);
149149
}
150150

151-
nsresult InitEmbedding(const char* aProfilePath,
152-
const nsStaticModuleInfo* aComps,
153-
int aNumComps)
151+
nsresult InitEmbedding(const char* aProfilePath)
154152
{
155153
nsresult rv;
156154

@@ -189,7 +187,7 @@ nsresult InitEmbedding(const char* aProfilePath,
189187

190188
// load XUL functions
191189
nsDynamicFunctionLoad nsFuncs[] = {
192-
{"XRE_InitEmbedding", (NSFuncPtr*)&XRE_InitEmbedding},
190+
{"XRE_InitEmbedding2", (NSFuncPtr*)&XRE_InitEmbedding2},
193191
{"XRE_TermEmbedding", (NSFuncPtr*)&XRE_TermEmbedding},
194192
{"XRE_NotifyProfile", (NSFuncPtr*)&XRE_NotifyProfile},
195193
{"XRE_LockProfileDirectory", (NSFuncPtr*)&XRE_LockProfileDirectory},
@@ -276,9 +274,8 @@ nsresult InitEmbedding(const char* aProfilePath,
276274
}
277275

278276
// init embedding
279-
rv = XRE_InitEmbedding(xuldir, appdir,
280-
const_cast<MozEmbedDirectoryProvider*>(&kDirectoryProvider),
281-
aComps, aNumComps);
277+
rv = XRE_InitEmbedding2(xuldir, appdir,
278+
const_cast<MozEmbedDirectoryProvider*>(&kDirectoryProvider));
282279
if (NS_FAILED(rv)) {
283280
cerr << "XRE_InitEmbedding failed." << endl;
284281
return 9;

common/EmbeddingSetup.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ typedef PRUint32 nsresult;
5959
* @param aNumComps Optional argument to set number of
6060
* static components.
6161
*/
62-
nsresult InitEmbedding(const char* aProfilePath = 0,
63-
const nsStaticModuleInfo* aComps = 0,
64-
int aNumComps = 0);
62+
nsresult InitEmbedding(const char* aProfilePath = 0);
6563

6664
/**
6765
* Terminates embedding, i.e. does teardown and unloads needed libs.

0 commit comments

Comments
 (0)