Bug 1562667 - P4a - Enable SAB by default on nightly; r=bzbarsky,luke

This patch mainly enables the pref for SharedArrayBuffer on Nightly.

This change causes some tests to fail. This patch handles the failures for
mochitests and web-platform-tests. The jsreftest will be handled in the next
patch.

For mochitests:
- dom/serviceworkers/test/test_serviceworker_interfaces.js
- dom/tests/mochitest/general/test_interfaces.js
- dom/workers/test/test_worker_interfaces.js

These tests check which interfaces are exposed on the web. Since we are now
exposing SharedArrayBuffer in some configurations, the tests need to be adjusted
accordingly.

For the rest of tests in this patch:
- testing/web-platform/meta/encoding/encodeInto.any.js.ini
This test partially fails because the integration of encoding and SAB is not
completely supported yet.

- testing/web-platform/meta/encoding/streams/decode-utf8.any.js.ini
This test partially fails because the integration of decoding and SAB is not
completely supported yet.

- testing/web-platform/meta/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.js.ini
- testing/web-platform/meta/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.js.ini
- testing/web-platform/meta/wasm/jsapi/memory/constructor.any.js.ini
- testing/web-platform/meta/wasm/jsapi/memory/grow.any.js.ini
The subtests related to SAB in these tests now pass when SAB is enabled, so we
need to annotate them as failing only in configurations where SAB is disabled.

- testing/web-platform/meta/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html.ini
This test partially fails because there are some issues between SAB and Audio.

Differential Revision: https://phabricator.services.mozilla.com/D48838

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tom Tung 2019-11-25 16:28:06 +00:00
Родитель d7a47446c2
Коммит 64a20094ea
11 изменённых файлов: 299 добавлений и 63 удалений

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

@ -25,7 +25,7 @@ var ecmaGlobals = [
{ name: "AggregateError", nightly: true },
"Array",
"ArrayBuffer",
{ name: "Atomics", disabled: true },
{ name: "Atomics", nightly: true },
"Boolean",
"BigInt",
"BigInt64Array",
@ -59,7 +59,7 @@ var ecmaGlobals = [
"Reflect",
"RegExp",
"Set",
{ name: "SharedArrayBuffer", disabled: true },
{ name: "SharedArrayBuffer", nightly: true },
"String",
"Symbol",
"SyntaxError",

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

@ -52,7 +52,7 @@ var ecmaGlobals = [
{ name: "AggregateError", insecureContext: true, nightly: true },
{ name: "Array", insecureContext: true },
{ name: "ArrayBuffer", insecureContext: true },
{ name: "Atomics", insecureContext: true, disabled: true },
{ name: "Atomics", insecureContext: true, nightly: true },
{ name: "BigInt", insecureContext: true },
{ name: "BigInt64Array", insecureContext: true },
{ name: "BigUint64Array", insecureContext: true },
@ -86,7 +86,11 @@ var ecmaGlobals = [
{ name: "Reflect", insecureContext: true },
{ name: "RegExp", insecureContext: true },
{ name: "Set", insecureContext: true },
{ name: "SharedArrayBuffer", insecureContext: true, disabled: true },
{
name: "SharedArrayBuffer",
insecureContext: true,
nightly: true,
},
{ name: "String", insecureContext: true },
{ name: "Symbol", insecureContext: true },
{ name: "SyntaxError", insecureContext: true },

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

@ -31,7 +31,7 @@ var ecmaGlobals = [
{ name: "AggregateError", insecureContext: true, nightly: true },
{ name: "Array", insecureContext: true },
{ name: "ArrayBuffer", insecureContext: true },
{ name: "Atomics", insecureContext: true, disabled: true },
{ name: "Atomics", insecureContext: true, nightly: true },
{ name: "BigInt", insecureContext: true },
{ name: "BigInt64Array", insecureContext: true },
{ name: "BigUint64Array", insecureContext: true },
@ -67,7 +67,11 @@ var ecmaGlobals = [
{ name: "Reflect", insecureContext: true },
{ name: "RegExp", insecureContext: true },
{ name: "Set", insecureContext: true },
{ name: "SharedArrayBuffer", insecureContext: true, disabled: true },
{
name: "SharedArrayBuffer",
insecureContext: true,
nightly: true,
},
{ name: "String", insecureContext: true },
{ name: "Symbol", insecureContext: true },
{ name: "SyntaxError", insecureContext: true },

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

@ -1162,7 +1162,11 @@ pref("javascript.options.mem.gc_max_empty_chunk_count", 30);
pref("javascript.options.showInConsole", false);
#if defined(NIGHTLY_BUILD)
pref("javascript.options.shared_memory", true);
#else
pref("javascript.options.shared_memory", false);
#endif
pref("javascript.options.throw_on_debuggee_would_run", false);
pref("javascript.options.dump_stack_on_debuggee_would_run", false);

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

@ -1,18 +1,22 @@
[encodeInto.any.html]
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler random]
expected: FAIL
@ -42,16 +46,19 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler 128]
expected: FAIL
@ -72,13 +79,15 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with A and destination length 10, offset 4, filler 0]
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler 128]
expected: FAIL
@ -90,10 +99,12 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with A and destination length 10, offset 0, filler 128]
expected: FAIL
@ -117,7 +128,8 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler 0]
expected: FAIL
@ -128,19 +140,23 @@
[encodeInto.any.worker.html]
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler random]
expected: FAIL
@ -170,16 +186,19 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with AU+df06 and destination length 4, offset 4, filler 0]
expected: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 4, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with ¥¥ and destination length 4, offset 4, filler 128]
expected: FAIL
@ -200,13 +219,15 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with A and destination length 10, offset 4, filler 0]
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 0, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆 and destination length 4, offset 0, filler 128]
expected: FAIL
@ -218,10 +239,12 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler random]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with Hi and destination length 0, offset 0, filler 0]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with A and destination length 10, offset 0, filler 128]
expected: FAIL
@ -245,7 +268,8 @@
expected: FAIL
[encodeInto() into SharedArrayBuffer with 𝌆A and destination length 3, offset 4, filler 128]
expected: FAIL
expected:
if not nightly_build: FAIL
[encodeInto() into SharedArrayBuffer with U+d834AU+df06A¥Hi and destination length 10, offset 4, filler 0]
expected: FAIL

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

@ -2,39 +2,200 @@
expected: TIMEOUT
[decode-utf8.any.sharedworker.html]
expected: TIMEOUT
[decode-utf8.any.html]
expected: ERROR
[a trailing empty chunk should be ignored- ArrayBuffer]
expected: FAIL
expected:
if not nightly_build: TIMEOUT
[decoding one UTF-8 chunk should give one output string - ArrayBuffer]
expected: FAIL
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding an empty chunk should give no output chunks - ArrayBuffer]
expected: FAIL
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[an initial empty chunk should be ignored - ArrayBuffer]
expected: FAIL
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decode-utf8.any.worker.html]
expected: ERROR
[a trailing empty chunk should be ignored- ArrayBuffer]
expected: FAIL
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding one UTF-8 chunk should give one output string - ArrayBuffer]
expected: FAIL
[decoding one UTF-8 chunk should give one output string - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding an empty chunk should give no output chunks - ArrayBuffer]
expected: FAIL
[decoding an empty chunk should give no output chunks - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[an initial empty chunk should be ignored - ArrayBuffer]
expected: FAIL
[an initial empty chunk should be ignored - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[a trailing empty chunk should be ignored- SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred Uint8Array chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred ArrayBuffer chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decode-utf8.any.serviceworker.html]
[decode-utf8]
expected:
if not nightly_build: FAIL
[decoding one UTF-8 chunk should give one output string - ArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding an empty chunk should give no output chunks - ArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[an initial empty chunk should be ignored - ArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[a trailing empty chunk should be ignored- ArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding one UTF-8 chunk should give one output string - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding an empty chunk should give no output chunks - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[an initial empty chunk should be ignored - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[a trailing empty chunk should be ignored- SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred Uint8Array chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred ArrayBuffer chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decode-utf8.any.html]
expected:
if not nightly_build: ERROR
[a trailing empty chunk should be ignored- ArrayBuffer]
expected: FAIL
[decoding one UTF-8 chunk should give one output string - ArrayBuffer]
expected: FAIL
[decoding an empty chunk should give no output chunks - ArrayBuffer]
expected: FAIL
[an initial empty chunk should be ignored - ArrayBuffer]
expected: FAIL
[decoding one UTF-8 chunk should give one output string - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding an empty chunk should give no output chunks - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[an initial empty chunk should be ignored - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[a trailing empty chunk should be ignored- SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred Uint8Array chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred ArrayBuffer chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decode-utf8.any.worker.html]
expected:
if not nightly_build: ERROR
[a trailing empty chunk should be ignored- ArrayBuffer]
expected: FAIL
[decoding one UTF-8 chunk should give one output string - ArrayBuffer]
expected: FAIL
[decoding an empty chunk should give no output chunks - ArrayBuffer]
expected: FAIL
[an initial empty chunk should be ignored - ArrayBuffer]
expected: FAIL
[decoding one UTF-8 chunk should give one output string - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding an empty chunk should give no output chunks - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[an initial empty chunk should be ignored - SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[a trailing empty chunk should be ignored- SharedArrayBuffer]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred Uint8Array chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594
[decoding a transferred ArrayBuffer chunk should give no output]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1561594

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

@ -1,9 +1,10 @@
[requires-failure.https.any.html]
[[[CanBlock\]\] in a Window]
expected: FAIL
expected:
if not nightly_build: FAIL
[requires-failure.https.any.serviceworker.html]
[[[CanBlock\]\] in a ServiceWorkerGlobalScope]
expected: FAIL
expected:
if not nightly_build: FAIL

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

@ -1,7 +1,7 @@
[requires-success.any.worker.html]
[[[CanBlock\]\] in a DedicatedWorkerGlobalScope]
expected: FAIL
expected:
if not nightly_build: FAIL
[requires-success.any.sharedworker.html]
[[[CanBlock\]\] in a SharedWorkerGlobalScope]

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

@ -1,6 +1,7 @@
[constructor.any.worker.html]
[Order of evaluation for descriptor (with shared)]
expected: FAIL
expected:
if not nightly_build: FAIL
[Shared memory]
expected: FAIL
@ -8,7 +9,8 @@
[constructor.any.html]
[Order of evaluation for descriptor (with shared)]
expected: FAIL
expected:
if not nightly_build: FAIL
[Shared memory]
expected: FAIL

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

@ -1,9 +1,11 @@
[grow.any.worker.html]
[Growing shared memory does not detach old buffer]
expected: FAIL
expected:
if not nightly_build: FAIL
[grow.any.html]
[Growing shared memory does not detach old buffer]
expected: FAIL
expected:
if not nightly_build: FAIL

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

@ -8,14 +8,48 @@
[X 5: buffer.copyFromChannel(x, 0, -1) incorrectly threw IndexSizeError: "Index or size is negative or greater than the allowed amount".]
expected: FAIL
[X 8: buffer.copyFromChannel(SharedArrayBuffer view, 0) did not throw an exception.]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525330
[X 9: buffer.copyFromChannel(SharedArrayBuffer view, 0, 0) did not throw an exception.]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525330
[< [copyFrom-exceptions\] 3 out of 11 assertions were failed.]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525330
[< [copyFrom-exceptions\] 1 out of 9 assertions were failed.]
expected: FAIL
expected:
if not nightly_build: FAIL
[< [copyTo-exceptions\] 3 out of 10 assertions were failed.]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525330
[< [copyTo-exceptions\] 1 out of 8 assertions were failed.]
expected: FAIL
expected:
if not nightly_build: FAIL
[X 7: buffer.copyToChannel(SharedArrayBuffer view, 0) did not throw an exception.]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525330
[X 8: buffer.copyToChannel(SharedArrayBuffer view, 0, 0) did not throw an exception.]
expected:
if nightly_build: FAIL
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1525330
[Executing "copyFrom-exceptions"]
expected: FAIL
expected:
if not nightly_build: FAIL
[Executing "copyTo-exceptions"]
expected: FAIL
expected:
if not nightly_build: FAIL