Backed out changeset 3bdf9fae7d34 (bug 830716) for causing xpcshell failures on test_ext_runtime_sendMessage_errors.js. CLOSED TREE

This commit is contained in:
criss 2022-07-23 02:44:47 +03:00
Родитель 7e71871b8e
Коммит a945840cf5
3 изменённых файлов: 1 добавлений и 29 удалений

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

@ -500,11 +500,7 @@ bool StructuredCloneHolder::WriteFullySerializableObjects(
}
// Don't know what this is
ErrorResult rv;
const char* className = JS::GetClass(obj)->name;
rv.ThrowDataCloneError(nsDependentCString(className) +
" object could not be cloned."_ns);
MOZ_ALWAYS_TRUE(rv.MaybeSetPendingException(aCx));
xpc::Throw(aCx, NS_ERROR_DOM_DATA_CLONE_ERR);
return false;
}

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

@ -897,7 +897,6 @@ skip-if = debug == false
[test_shared_compartment1.html]
[test_shared_compartment2.html]
[test_structuredclone_backref.html]
[test_structuredclone_error.html]
[test_style_cssText.html]
[test_suppressed_events_and_scrolling.html]
support-files =

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

@ -1,23 +0,0 @@
<!DOCTYPE HTML>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" href="/tests/SimpleTest/test.css">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=XXX">Mozilla Bug XXX</a>
<script>
const tests = [
{obj: (() => {}), msg: "Function object could not be cloned."},
{obj: document.body, msg: "HTMLBodyElement object could not be cloned."},
{obj: {foo: new Audio()}, msg: "HTMLAudioElement object could not be cloned."},
]
for (const test of tests) {
let message = undefined;
try {
structuredClone(test.obj);
} catch (e) {
message = e.message;
}
is(message, test.msg, 'Threw correct DataCloneError');
}
</script>