Adding new flag to the security check calls out of the DOM generated JS files.

git-svn-id: svn://10.0.0.236/trunk@45348 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joki%netscape.com
1999-08-31 14:23:55 +00:00
parent 82e5df59d7
commit 9db6478cb3
120 changed files with 1554 additions and 1617 deletions

View File

@@ -465,7 +465,7 @@ static const char kPropCaseBeginStr[] =
" case %s_%s:\n"
" {\n"
" PRBool ok = PR_FALSE;\n"
" secMan->CheckScriptAccess(scriptCX, obj, \"%s.%s\", &ok);\n"
" secMan->CheckScriptAccess(scriptCX, obj, \"%s.%s\", %s, &ok);\n"
" if (!ok) {\n"
" //Need to throw error here\n"
" return JS_FALSE;\n"
@@ -549,7 +549,12 @@ JSStubGen::GeneratePropertyFunc(IdlSpecification &aSpec, PRBool aIsGetter)
strcpy(lwr_iface_name, iface_name);
StrLwr(lwr_iface_name);
sprintf(buf, kPropCaseBeginStr, iface_name, attr_name, lwr_iface_name, lwr_attr_name);
if (aIsGetter) {
sprintf(buf, kPropCaseBeginStr, iface_name, attr_name, lwr_iface_name, lwr_attr_name, "PR_FALSE");
}
else {
sprintf(buf, kPropCaseBeginStr, iface_name, attr_name, lwr_iface_name, lwr_attr_name, "PR_TRUE");
}
*file << buf;
if (aIsGetter) {
@@ -991,7 +996,7 @@ static const char kMethodBodyBeginStr[] = "\n"
" }\n"
" {\n"
" PRBool ok;\n"
" secMan->CheckScriptAccess(scriptCX, obj, \"%s.%s\", &ok);\n"
" secMan->CheckScriptAccess(scriptCX, obj, \"%s.%s\",PR_FALSE , &ok);\n"
" if (!ok) {\n"
" //Need to throw error here\n"
" return JS_FALSE;\n"