зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 2a3a7c533bc0 (bug 1501502) for spidermonkey bustages on non262/ReadableStream/bug-1501502.js CLOSED TREE
This commit is contained in:
Родитель
92221647b4
Коммит
890cf8bcf7
|
@ -1487,14 +1487,7 @@ ReadableStreamErrorInternal(JSContext* cx, Handle<ReadableStream*> stream, Handl
|
|||
stream->setErrored();
|
||||
|
||||
// Step 4: Set stream.[[storedError]] to e.
|
||||
{
|
||||
AutoRealm ar(cx, stream);
|
||||
RootedValue wrappedError(cx, e);
|
||||
if (!cx->compartment()->wrap(cx, &wrappedError)) {
|
||||
return false;
|
||||
}
|
||||
stream->setStoredError(wrappedError);
|
||||
}
|
||||
stream->setStoredError(e);
|
||||
|
||||
// Step 6: If reader is undefined, return (reordered).
|
||||
if (!stream->hasReader()) {
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
// A stream can become errored with an exception from another realm.
|
||||
|
||||
let g = newGlobal();
|
||||
let g_enqueue;
|
||||
new g.ReadableStream({
|
||||
start(controller) {
|
||||
g_enqueue = controller.enqueue;
|
||||
},
|
||||
});
|
||||
|
||||
let controller;
|
||||
let stream = new ReadableStream({
|
||||
start(c) {
|
||||
controller = c;
|
||||
}
|
||||
}, {
|
||||
size(chunk) {}
|
||||
});
|
||||
|
||||
assertThrowsInstanceOf(() => g_enqueue.call(controller, {}), g.RangeError);
|
Загрузка…
Ссылка в новой задаче