Removed some "obsolete" functions.
git-svn-id: svn://10.0.0.236/trunk@33441 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -140,10 +140,26 @@ PREF_Cleanup();
|
||||
PR_EXTERN(PrefResult)
|
||||
PREF_ReadLockFile(const char *filename);
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_EXTERN(JSBool) PREF_EvaluateJSBuffer(const char * js_buffer, size_t length);
|
||||
PR_EXTERN(JSBool) PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length);
|
||||
/* Like the above but does not generate callbacks. */
|
||||
PR_EXTERN(JSBool) PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length);
|
||||
/* Like the above but does not generate callbacks and executes in scope of global config object */
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
PR_EXTERN(JSBool)
|
||||
PREF_EvaluateConfigScript(const char * js_buffer, size_t length,
|
||||
const char* filename, PRBool bGlobalContext, PRBool bCallbacks,
|
||||
PRBool skipFirstLine);
|
||||
/*
|
||||
// This routine is newer than the above which are not being called externally,
|
||||
// as far as I know. The following is used from mkautocf to evaluate a
|
||||
// config URL file with callbacks.
|
||||
|
||||
// <font color=blue>
|
||||
// Pass an arbitrary JS buffer to be evaluated in the Preference context.
|
||||
// On startup modules will want to setup their preferences with reasonable
|
||||
// On startup modules will want to set up their preferences with reasonable
|
||||
// defaults. For example netlib might call with a buffer of:
|
||||
//
|
||||
// pref("network.tcpbufsize",4096);
|
||||
@@ -156,30 +172,6 @@ PREF_ReadLockFile(const char *filename);
|
||||
// PREF_RegisterCallback() for any user values that have changed.
|
||||
// </font>
|
||||
*/
|
||||
PR_EXTERN(JSBool)
|
||||
PREF_EvaluateJSBuffer(const char * js_buffer, size_t length);
|
||||
|
||||
/*
|
||||
// Like the above but does not generate callbacks.
|
||||
*/
|
||||
PR_EXTERN(JSBool)
|
||||
PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length);
|
||||
|
||||
/*
|
||||
// Like the above but does not generate callbacks and executes in scope of global config object
|
||||
*/
|
||||
PR_EXTERN(JSBool)
|
||||
PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length);
|
||||
|
||||
/*
|
||||
// This routine is newer than the above which are not being called externally,
|
||||
// as far as I know. The following is used from mkautocf to evaluate a
|
||||
// config URL file with callbacks.
|
||||
*/
|
||||
PR_EXTERN(JSBool)
|
||||
PREF_EvaluateConfigScript(const char * js_buffer, size_t length,
|
||||
const char* filename, PRBool bGlobalContext, PRBool bCallbacks,
|
||||
PRBool skipFirstLine);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -289,7 +289,7 @@ PrefResult pref_OpenFile(
|
||||
#endif
|
||||
}
|
||||
JS_GC(gMochaContext);
|
||||
return (ok);
|
||||
return ok;
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
@@ -623,6 +623,7 @@ PREF_EvaluateConfigScript(const char * js_buffer, size_t length,
|
||||
return ok;
|
||||
}
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_IMPLEMENT(JSBool)
|
||||
PREF_EvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
{
|
||||
@@ -633,15 +634,17 @@ PREF_EvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_IMPLEMENT(JSBool)
|
||||
PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
{
|
||||
JSBool ok;
|
||||
JSBool ok = JS_FALSE;
|
||||
jsval result;
|
||||
|
||||
if (!gMochaContext || !gMochaPrefObject)
|
||||
return PREF_NOT_INITIALIZED;
|
||||
return JS_FALSE;
|
||||
|
||||
JS_BeginRequest(gMochaContext);
|
||||
ok = JS_EvaluateScript(gMochaContext, gMochaPrefObject,
|
||||
@@ -651,7 +654,9 @@ PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
/* Hey, this really returns a JSBool */
|
||||
return ok;
|
||||
}
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_IMPLEMENT(JSBool)
|
||||
PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length)
|
||||
{
|
||||
@@ -659,7 +664,7 @@ PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length)
|
||||
jsval result;
|
||||
|
||||
if (!gMochaContext || !gGlobalConfigObject)
|
||||
return PREF_NOT_INITIALIZED;
|
||||
return JS_FALSE;
|
||||
|
||||
JS_BeginRequest(gMochaContext);
|
||||
ok = JS_EvaluateScript(gMochaContext, gGlobalConfigObject,
|
||||
@@ -669,6 +674,7 @@ PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length)
|
||||
/* Hey, this really returns a JSBool */
|
||||
return ok;
|
||||
}
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
static char * str_escape(const char * original)
|
||||
{
|
||||
|
||||
@@ -289,7 +289,7 @@ PrefResult pref_OpenFile(
|
||||
#endif
|
||||
}
|
||||
JS_GC(gMochaContext);
|
||||
return (ok);
|
||||
return ok;
|
||||
}
|
||||
#endif /* PREF_SUPPORT_OLD_PATH_STRINGS */
|
||||
|
||||
@@ -623,6 +623,7 @@ PREF_EvaluateConfigScript(const char * js_buffer, size_t length,
|
||||
return ok;
|
||||
}
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_IMPLEMENT(JSBool)
|
||||
PREF_EvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
{
|
||||
@@ -633,15 +634,17 @@ PREF_EvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_IMPLEMENT(JSBool)
|
||||
PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
{
|
||||
JSBool ok;
|
||||
JSBool ok = JS_FALSE;
|
||||
jsval result;
|
||||
|
||||
if (!gMochaContext || !gMochaPrefObject)
|
||||
return PREF_NOT_INITIALIZED;
|
||||
return JS_FALSE;
|
||||
|
||||
JS_BeginRequest(gMochaContext);
|
||||
ok = JS_EvaluateScript(gMochaContext, gMochaPrefObject,
|
||||
@@ -651,7 +654,9 @@ PREF_QuietEvaluateJSBuffer(const char * js_buffer, size_t length)
|
||||
/* Hey, this really returns a JSBool */
|
||||
return ok;
|
||||
}
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
#if 0 /* OBSOLETE */
|
||||
PR_IMPLEMENT(JSBool)
|
||||
PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length)
|
||||
{
|
||||
@@ -659,7 +664,7 @@ PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length)
|
||||
jsval result;
|
||||
|
||||
if (!gMochaContext || !gGlobalConfigObject)
|
||||
return PREF_NOT_INITIALIZED;
|
||||
return JS_FALSE;
|
||||
|
||||
JS_BeginRequest(gMochaContext);
|
||||
ok = JS_EvaluateScript(gMochaContext, gGlobalConfigObject,
|
||||
@@ -669,6 +674,7 @@ PREF_QuietEvaluateJSBufferWithGlobalScope(const char * js_buffer, size_t length)
|
||||
/* Hey, this really returns a JSBool */
|
||||
return ok;
|
||||
}
|
||||
#endif /* OBSOLETE */
|
||||
|
||||
static char * str_escape(const char * original)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user