Skip to content

Commit

Permalink
Foxhound: use full arguments for all DOM related Taint Operations
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbrbr committed Jan 18, 2024
1 parent ca477c0 commit 1362422
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions dom/tainting/nsTaintingUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static TaintOperation GetTaintOperation(JSContext *cx, const char* name, const n
if (cx && JS::CurrentGlobalOrNull(cx)) {
JS::RootedValue argval(cx);
if (mozilla::dom::ToJSValue(cx, arg, &argval)) {
return JS_GetTaintOperation(cx, name, argval);
return JS_GetTaintOperationFullArgs(cx, name, argval);
}
}

Expand All @@ -76,19 +76,6 @@ static TaintOperation GetTaintOperation(JSContext *cx, const char* name, const n
if (cx && JS::CurrentGlobalOrNull(cx)) {
JS::RootedValue argval(cx);

if (mozilla::dom::ToJSValue(cx, args, &argval)) {
return JS_GetTaintOperation(cx, name, argval);
}
}

return TaintOperation(name);
}

static TaintOperation GetTaintOperationFullArgs(JSContext *cx, const char* name, const nsTArray<nsString> &args)
{
if (cx && JS::CurrentGlobalOrNull(cx)) {
JS::RootedValue argval(cx);

if (mozilla::dom::ToJSValue(cx, args, &argval)) {
return JS_GetTaintOperationFullArgs(cx, name, argval);
}
Expand Down Expand Up @@ -117,7 +104,7 @@ static TaintOperation GetTaintOperation(JSContext *cx, const char* name, const m
DescribeElement(element, elementDesc);
args.AppendElement(elementDesc);

return GetTaintOperationFullArgs(cx, name, args);
return GetTaintOperation(cx, name, args);
}

return TaintOperation(name);
Expand Down

0 comments on commit 1362422

Please sign in to comment.