зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1220728 Clear pending exceptions if string conversion fails in SW intercept error handling. r=bz
This commit is contained in:
Родитель
08b94a69ed
Коммит
9a99bbe66c
|
@ -396,8 +396,8 @@ ExtractErrorValues(JSContext* aCx, JS::Handle<JS::Value> aValue,
|
|||
else if(NS_SUCCEEDED(UNWRAP_OBJECT(DOMException, obj, domException))) {
|
||||
|
||||
nsAutoString filename;
|
||||
if (NS_SUCCEEDED(domException->GetFilename(filename)) &&
|
||||
!filename.IsEmpty()) {
|
||||
domException->GetFilename(filename);
|
||||
if (!filename.IsEmpty()) {
|
||||
CopyUTF16toUTF8(filename, aSourceSpecOut);
|
||||
*aLineOut = domException->LineNumber();
|
||||
*aColumnOut = domException->ColumnNumber();
|
||||
|
@ -419,6 +419,8 @@ ExtractErrorValues(JSContext* aCx, JS::Handle<JS::Value> aValue,
|
|||
nsAutoJSString jsString;
|
||||
if (jsString.init(aCx, aValue)) {
|
||||
aMessageOut = jsString;
|
||||
} else {
|
||||
JS_ClearPendingException(aCx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче