Bug 880917 - Remove js_RevertVersion and associated shell functionality. r=luke

This commit is contained in:
Bobby Holley 2013-06-29 09:11:19 -06:00
parent d12dacd7b6
commit 7776d82812
4 changed files with 0 additions and 35 deletions

View File

@ -828,12 +828,6 @@ JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure)
/************************************************************************/
JS_FRIEND_API(void)
js_RevertVersion(JSContext *cx)
{
cx->clearVersionOverride();
}
JS_PUBLIC_API(const JSDebugHooks *)
JS_GetGlobalDebugHooks(JSRuntime *rt)
{

View File

@ -426,9 +426,6 @@ JS_SetDebugErrorHook(JSRuntime *rt, JSDebugErrorHook hook, void *closure);
/************************************************************************/
extern JS_FRIEND_API(void)
js_RevertVersion(JSContext *cx);
extern JS_PUBLIC_API(const JSDebugHooks *)
JS_GetGlobalDebugHooks(JSRuntime *rt);

View File

@ -649,15 +649,6 @@ Version(JSContext *cx, unsigned argc, jsval *vp)
return true;
}
static JSBool
RevertVersion(JSContext *cx, unsigned argc, jsval *vp)
{
CallArgs args = CallArgsFromVp(argc, vp);
js_RevertVersion(cx);
args.rval().setUndefined();
return true;
}
static JSScript *
GetTopScript(JSContext *cx)
{
@ -3575,10 +3566,6 @@ static const JSFunctionSpecWithHelp shell_functions[] = {
"version([number])",
" Get or force a script compilation version number."),
JS_FN_HELP("revertVersion", RevertVersion, 0, 0,
"revertVersion()",
" Revert previously set version number."),
JS_FN_HELP("options", Options, 0, 0,
"options([option ...])",
" Get or toggle JavaScript options."),

View File

@ -137,19 +137,6 @@ function test()
expect(["a1", "a2", "a3", "b1", "b2", "b3", "c1", "c2", "c3"] + "",
([a + b for (a in 'abc') for (b in '123')]) + "");
/*
* Version switching
*/
if (typeof version == 'function')
{
var v = version(150);
f = new Function("return version(arguments[0])");
revertVersion();
expect(150, f());
expect(150, eval("f()"));
expect(0, eval("f(0); f()"));
revertVersion();
}
print("End of Tests");
/*