Bug 1290337 - Part 4: Replace Value parameter to HandleValue in js shell. r=sfink

This commit is contained in:
Tooru Fujisawa 2016-09-11 19:22:03 +09:00
parent a18c43b831
commit 98f4254871

View File

@ -2211,10 +2211,8 @@ AssertEq(JSContext* cx, unsigned argc, Value* vp)
}
static JSScript*
ValueToScript(JSContext* cx, Value vArg, JSFunction** funp = nullptr)
ValueToScript(JSContext* cx, HandleValue v, JSFunction** funp = nullptr)
{
RootedValue v(cx, vArg);
if (v.isString()) {
// To convert a string to a script, compile it. Parse it as an ES6 Program.
RootedLinearString linearStr(cx, StringToLinearString(cx, v.toString()));
@ -2275,7 +2273,7 @@ GetScriptAndPCArgs(JSContext* cx, unsigned argc, Value* argv, MutableHandleScrip
RootedScript script(cx, GetTopScript(cx));
*ip = 0;
if (argc != 0) {
Value v = argv[0];
RootedValue v(cx, argv[0]);
unsigned intarg = 0;
if (v.isObject() &&
JS_GetClass(&v.toObject()) == Jsvalify(&JSFunction::class_)) {
@ -6152,7 +6150,7 @@ DefineConsole(JSContext* cx, HandleObject global)
#undef EXTERNAL_FUNCTION_COUNT
static bool
PrintHelpString(JSContext* cx, Value v)
PrintHelpString(JSContext* cx, HandleValue v)
{
JSString* str = v.toString();
MOZ_ASSERT(gOutFile->isOpen());