@@ -146,8 +146,9 @@ bool pipeThrough(JSContext *cx, unsigned argc, JS::Value *vp) {
146
146
147
147
bool initialize_additions (JSContext *cx, JS::HandleObject global) {
148
148
JS::RootedValue val (cx);
149
- if (!JS_GetProperty (cx, global, " ReadableStream" , &val))
149
+ if (!JS_GetProperty (cx, global, " ReadableStream" , &val)) {
150
150
return false ;
151
+ }
151
152
JS::RootedObject readableStream_builtin (cx, &val.toObject ());
152
153
153
154
if (!JS_GetProperty (cx, readableStream_builtin, " prototype" , &val)) {
@@ -158,8 +159,9 @@ bool initialize_additions(JSContext *cx, JS::HandleObject global) {
158
159
159
160
original_pipeTo.init (cx);
160
161
overridden_pipeTo.init (cx);
161
- if (!JS_GetProperty (cx, proto_obj, " pipeTo" , &original_pipeTo))
162
+ if (!JS_GetProperty (cx, proto_obj, " pipeTo" , &original_pipeTo)) {
162
163
return false ;
164
+ }
163
165
MOZ_ASSERT (JS::IsCallable (&original_pipeTo.toObject ()));
164
166
165
167
JSFunction *pipeTo_fun = JS_DefineFunction (cx, proto_obj, " pipeTo" , pipeTo, 1 , JSPROP_ENUMERATE);
@@ -222,7 +224,7 @@ bool ExtractStrategy(JSContext *cx, JS::HandleValue strategy, double default_hwm
222
224
if (!JS::ToNumber (cx, val, hwm)) {
223
225
return false ;
224
226
}
225
- if (mozilla::IsNaN (*hwm) || *hwm < 0 ) {
227
+ if (std::isnan (*hwm) || *hwm < 0 ) {
226
228
JS_ReportErrorLatin1 (cx, " Invalid value for highWaterMark: %f" , *hwm);
227
229
return false ;
228
230
}
0 commit comments