зеркало из https://github.com/mozilla/gecko-dev.git
[DEBUG only] Warn when 'key' cannot be found. b=370453 r=neil@httl.net sr=bzbarsky
This commit is contained in:
Родитель
8b5375ca14
Коммит
207ae3e22d
|
@ -1506,8 +1506,19 @@ nsMenuFrame::BuildAcceleratorText()
|
|||
|
||||
nsCOMPtr<nsIDOMElement> keyDOMElement;
|
||||
domDocument->GetElementById(keyValue, getter_AddRefs(keyDOMElement));
|
||||
if (!keyDOMElement)
|
||||
if (!keyDOMElement) {
|
||||
#ifdef DEBUG
|
||||
nsAutoString label;
|
||||
mContent->GetAttr(kNameSpaceID_None, nsGkAtoms::label, label);
|
||||
nsAutoString msg = NS_LITERAL_STRING("Key '") +
|
||||
keyValue +
|
||||
NS_LITERAL_STRING("' of menu item '") +
|
||||
label +
|
||||
NS_LITERAL_STRING("' could not be found");
|
||||
NS_WARNING(NS_ConvertUTF16toUTF8(msg).get());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIContent> keyElement(do_QueryInterface(keyDOMElement));
|
||||
if (!keyElement)
|
||||
|
|
Загрузка…
Ссылка в новой задаче