mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Bug 397319 - "Add JSAutoRequest to other users of GetArgvPtr". r+sr+a=jst.
This commit is contained in:
parent
a30983e10d
commit
1232ee381c
@ -2379,6 +2379,8 @@ nsCanvasRenderingContext2D::GetImageData()
|
||||
ncc->GetArgc(&argc);
|
||||
ncc->GetArgvPtr(&argv);
|
||||
|
||||
JSAutoRequest ar(ctx);
|
||||
|
||||
int32 x, y, w, h;
|
||||
if (!JS_ConvertArguments (ctx, argc, argv, "jjjj", &x, &y, &w, &h))
|
||||
return NS_ERROR_DOM_SYNTAX_ERR;
|
||||
@ -2495,6 +2497,8 @@ nsCanvasRenderingContext2D::PutImageData()
|
||||
ncc->GetArgc(&argc);
|
||||
ncc->GetArgvPtr(&argv);
|
||||
|
||||
JSAutoRequest ar(ctx);
|
||||
|
||||
JSObject *dataObject;
|
||||
int32 x, y;
|
||||
|
||||
|
@ -317,6 +317,8 @@ nsHTMLCanvasElement::ToDataURL(nsAString& aDataURL)
|
||||
return ToDataURLImpl(NS_LITERAL_STRING("image/png"), EmptyString(), aDataURL);
|
||||
}
|
||||
|
||||
JSAutoRequest ar(ctx);
|
||||
|
||||
// 1-arg case; convert to given mime type
|
||||
if (argc == 1) {
|
||||
if (!JSVAL_IS_STRING(argv[0]))
|
||||
|
@ -1950,6 +1950,7 @@ nsCrypto::GenerateCRMFRequest(nsIDOMCRMFObject** aReturn)
|
||||
JSObject* script_obj = nsnull;
|
||||
nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
|
||||
|
||||
JSAutoRequest ar(cx);
|
||||
|
||||
/*
|
||||
* Get all of the parameters.
|
||||
@ -2663,6 +2664,8 @@ nsCrypto::SignText(const nsAString& aStringToSign, const nsAString& aCaOption,
|
||||
jsval *argv = nsnull;
|
||||
ncc->GetArgvPtr(&argv);
|
||||
|
||||
JSAutoRequest ar(cx);
|
||||
|
||||
PRUint32 i;
|
||||
for (i = 2; i < argc; ++i) {
|
||||
JSString *caName = JS_ValueToString(cx, argv[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user