Skip to content

Commit f846fde

Browse files
committed
Backed out 5 changesets (bug 1507950, bug 1503012, bug 1507943, bug 1512050, bug 1512008) for spidermonkey and jit failures
Backed out changeset 71253f35ac3c (bug 1512008) Backed out changeset f5c4eb412990 (bug 1512050) Backed out changeset bc83a2fe5c17 (bug 1507950) Backed out changeset 345ad3e746e8 (bug 1507943) Backed out changeset b2a0ae5e5115 (bug 1503012)
1 parent 48e7ee7 commit f846fde

40 files changed

+461
-1686
lines changed

build/gen_test_packages_manifest.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,9 @@ def generate_package_data(args):
7676
# specific zips.
7777
tests_common = args.tests_common
7878
jsshell = args.jsshell
79-
web_platform = getattr(args, 'web-platform')
8079

8180
harness_requirements = dict([(k, [tests_common]) for k in ALL_HARNESSES])
8281
harness_requirements['jittest'].append(jsshell)
83-
harness_requirements['jittest'].append(web_platform)
84-
8582
for harness in PACKAGE_SPECIFIED_HARNESSES + OPTIONAL_PACKAGES:
8683
pkg_name = getattr(args, harness, None)
8784
if pkg_name is None:

js/src/builtin/Promise.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3344,16 +3344,8 @@ MOZ_MUST_USE bool js::OriginalPromiseThen(
33443344
JSContext* cx, HandleObject promiseObj, HandleValue onFulfilled,
33453345
HandleValue onRejected, MutableHandleObject dependent,
33463346
CreateDependentPromise createDependent) {
3347-
RootedValue promiseVal(cx, ObjectValue(*promiseObj));
33483347
Rooted<PromiseObject*> promise(
3349-
cx, UnwrapAndTypeCheckValue<PromiseObject>(cx, promiseVal, [=] {
3350-
JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr,
3351-
JSMSG_INCOMPATIBLE_PROTO, "Promise", "then",
3352-
promiseObj->getClass()->name);
3353-
}));
3354-
if (!promise) {
3355-
return false;
3356-
}
3348+
cx, &CheckedUnwrap(promiseObj)->as<PromiseObject>());
33573349

33583350
// Steps 3-4.
33593351
Rooted<PromiseCapability> resultCapability(cx);

js/src/builtin/Stream.cpp

Lines changed: 188 additions & 395 deletions
Large diffs are not rendered by default.

js/src/builtin/Stream.h

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -242,34 +242,19 @@ class ReadableStreamController : public StreamController {
242242
* Memory layout for ReadableStream controllers, starting after the slots
243243
* reserved for queue container usage.
244244
*
245-
* Storage of the internal slots listed in the standard is fairly
246-
* straightforward except for [[pullAlgorithm]] and [[cancelAlgorithm]].
247-
* These algorithms are not stored as JSFunction objects. Rather, there are
248-
* three cases:
245+
* UnderlyingSource is usually treated as an opaque value. It might be a
246+
* wrapped object from another compartment, but that case is handled
247+
* correctly by all operations the controller might invoke on it.
249248
*
250-
* - Streams created with `new ReadableStream`: The methods are stored
251-
* in Slot_PullMethod and Slot_CancelMethod. The underlying source
252-
* object (`this` for these methods) is in Slot_UnderlyingSource.
253-
*
254-
* - External source streams. Slot_UnderlyingSource is a PrivateValue
255-
* pointing to the JS::ReadableStreamUnderlyingSource object. The
256-
* algorithms are implemented using the .pull() and .cancel() methods
257-
* of that object. Slot_Pull/CancelMethod are undefined.
258-
*
259-
* - Tee streams. Slot_UnderlyingSource is a TeeState object. The
260-
* pull/cancel algorithms are implemented as separate functions in
261-
* Stream.cpp. Slot_Pull/CancelMethod are undefined.
262-
*
263-
* UnderlyingSource, PullMethod, and CancelMethod can be wrappers to objects
264-
* in other compartments.
249+
* The only case where we don't treat underlyingSource as an opaque value is
250+
* if it's a TeeState. All functions operating on TeeState properly handle
251+
* TeeState instances from other compartments.
265252
*
266253
* StrategyHWM and Flags are both primitive (numeric) values.
267254
*/
268255
enum Slots {
269256
Slot_Stream = StreamController::SlotCount,
270257
Slot_UnderlyingSource,
271-
Slot_PullMethod,
272-
Slot_CancelMethod,
273258
Slot_StrategyHWM,
274259
Slot_Flags,
275260
SlotCount
@@ -296,14 +281,6 @@ class ReadableStreamController : public StreamController {
296281
void setUnderlyingSource(const Value& underlyingSource) {
297282
setFixedSlot(Slot_UnderlyingSource, underlyingSource);
298283
}
299-
Value pullMethod() const { return getFixedSlot(Slot_PullMethod); }
300-
void setPullMethod(const Value& pullMethod) {
301-
setFixedSlot(Slot_PullMethod, pullMethod);
302-
}
303-
Value cancelMethod() const { return getFixedSlot(Slot_CancelMethod); }
304-
void setCancelMethod(const Value& cancelMethod) {
305-
setFixedSlot(Slot_CancelMethod, cancelMethod);
306-
}
307284
JS::ReadableStreamUnderlyingSource* externalSource() const {
308285
static_assert(alignof(JS::ReadableStreamUnderlyingSource) >= 2,
309286
"External underling sources are stored as PrivateValues, "

0 commit comments

Comments
 (0)