#52116 - Show URL for XBL element & method/attribute when a JS warning or exception happens

r=dveditz,mccabe, sr=hyatt
This commit is contained in:
alecf%netscape.com 2000-10-27 00:51:23 +00:00
Родитель 19a4c10857
Коммит 23edf9fc31
2 изменённых файлов: 32 добавлений и 6 удалений

Просмотреть файл

@ -805,12 +805,17 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
if (!body.IsEmpty()) {
void* myFunc;
nsCAutoString cname; cname.AssignWithConversion(name.GetUnicode());
nsCAutoString functionUri = classStr;
functionUri += ".";
functionUri += cname;
functionUri += "()";
rv = context->CompileFunction(classObject,
cname,
argCount,
(const char**)args,
body,
nsnull,
functionUri.GetBuffer(),
0,
PR_FALSE,
&myFunc);
@ -861,12 +866,16 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
}
if (!getter.IsEmpty() && classObject) {
nsCAutoString functionUri = classStr;
functionUri += ".";
functionUri.AppendWithConversion(name.GetUnicode());
functionUri += " (getter)";
rv = context->CompileFunction(classObject,
nsCAutoString("onget"),
0,
nsnull,
getter,
nsnull,
functionUri.GetBuffer(),
0,
PR_FALSE,
&getFunc);
@ -895,12 +904,16 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
}
if (!setter.IsEmpty() && classObject) {
nsCAutoString functionUri = classStr;
functionUri += ".";
functionUri.AppendWithConversion(name.GetUnicode());
functionUri += " (setter)";
rv = context->CompileFunction(classObject,
nsCAutoString("onset"),
1,
gPropertyArg,
setter,
nsnull,
functionUri.GetBuffer(),
0,
PR_FALSE,
&setFunc);

Просмотреть файл

@ -805,12 +805,17 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
if (!body.IsEmpty()) {
void* myFunc;
nsCAutoString cname; cname.AssignWithConversion(name.GetUnicode());
nsCAutoString functionUri = classStr;
functionUri += ".";
functionUri += cname;
functionUri += "()";
rv = context->CompileFunction(classObject,
cname,
argCount,
(const char**)args,
body,
nsnull,
functionUri.GetBuffer(),
0,
PR_FALSE,
&myFunc);
@ -861,12 +866,16 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
}
if (!getter.IsEmpty() && classObject) {
nsCAutoString functionUri = classStr;
functionUri += ".";
functionUri.AppendWithConversion(name.GetUnicode());
functionUri += " (getter)";
rv = context->CompileFunction(classObject,
nsCAutoString("onget"),
0,
nsnull,
getter,
nsnull,
functionUri.GetBuffer(),
0,
PR_FALSE,
&getFunc);
@ -895,12 +904,16 @@ nsXBLBinding::InstallProperties(nsIContent* aBoundElement)
}
if (!setter.IsEmpty() && classObject) {
nsCAutoString functionUri = classStr;
functionUri += ".";
functionUri.AppendWithConversion(name.GetUnicode());
functionUri += " (setter)";
rv = context->CompileFunction(classObject,
nsCAutoString("onset"),
1,
gPropertyArg,
setter,
nsnull,
functionUri.GetBuffer(),
0,
PR_FALSE,
&setFunc);