mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 989665 - Console API should clone objects propertly. Crash fixed, r=bz
This commit is contained in:
parent
aa8fe650e6
commit
e8e8e6036e
@ -74,7 +74,7 @@ ConsoleStructuredCloneCallbacksRead(JSContext* aCx,
|
||||
}
|
||||
|
||||
nsTArray<nsString>* strings = static_cast<nsTArray<nsString>*>(aClosure);
|
||||
MOZ_ASSERT(strings->Length() <= aData);
|
||||
MOZ_ASSERT(strings->Length() > aData);
|
||||
|
||||
JS::Rooted<JS::Value> value(aCx);
|
||||
if (!xpc::StringToJsval(aCx, strings->ElementAt(aData), &value)) {
|
||||
|
@ -14,6 +14,7 @@ support-files =
|
||||
[test_bug913761.html]
|
||||
[test_bug978522.html]
|
||||
[test_bug979109.html]
|
||||
[test_bug989665.html]
|
||||
[test_clearTimeoutIntervalNoArg.html]
|
||||
[test_consoleEmptyStack.html]
|
||||
[test_constructor-assignment.html]
|
||||
|
21
dom/base/test/test_bug989665.html
Normal file
21
dom/base/test/test_bug989665.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=989665
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for Bug 989665</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=989665">Mozilla Bug 989665</a>
|
||||
<script type="application/javascript">
|
||||
|
||||
w = new Worker("data:text/javascript;charset=UTF-8, console.log('%s', {toString: function() { throw 3 }}); ");
|
||||
ok(true, "This test should not crash.");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user