Bug 1316661 part 3. Eliminate IsCallerChrome callers in nsGenericHTMLElement. r=smaug
The only nsGenericHTMLElement::GetEditor callers are HTMLInputElement::GetEditor/HTMLTextareaElement::GetEditor (the XPCOM-y versions), which are only called from C++ and only from two places: a11y code, which forces itself to look like system, and typeaheadfind, which would break badly if it could not get an editor. So that security check simply shouldn't exist. The script API doesn't call down into here _and_ is [ChromeOnly] in the webidl already.
This commit is contained in:
@@ -463,11 +463,6 @@ HTMLTextFieldAccessible::GetEditor() const
|
||||
if (!editableElt)
|
||||
return nullptr;
|
||||
|
||||
// nsGenericHTMLElement::GetEditor has a security check.
|
||||
// Make sure we're not restricted by the permissions of
|
||||
// whatever script is currently running.
|
||||
mozilla::dom::AutoNoJSAPI nojsapi;
|
||||
|
||||
nsCOMPtr<nsIEditor> editor;
|
||||
editableElt->GetEditor(getter_AddRefs(editor));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user