зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 3bdf9fae7d34 (bug 830716) for causing xpcshell failures on test_ext_runtime_sendMessage_errors.js. CLOSED TREE
This commit is contained in:
Родитель
7e71871b8e
Коммит
a945840cf5
|
@ -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>
|
Загрузка…
Ссылка в новой задаче