@@ -148,33 +148,32 @@ bool PyBytesProxyHandler::getOwnPropertyDescriptor(
148
148
));
149
149
return true ;
150
150
}
151
- }
152
151
153
- // "constructor" property
154
- bool isConstructorProperty;
155
- if (id.isString () && JS_StringEqualsLiteral (cx, id.toString (), " constructor" , &isConstructorProperty) && isConstructorProperty) {
156
- JS::RootedObject global (cx, JS::GetNonCCWObjectGlobal (proxy));
152
+ // "constructor" property
153
+ if (JS_StringEqualsLiteral (cx, id.toString (), " constructor" , &isProperty) && isProperty) {
154
+ JS::RootedObject global (cx, JS::GetNonCCWObjectGlobal (proxy));
157
155
158
- JS::RootedObject uint8ArrayPrototype (cx);
159
- if (!JS_GetClassPrototype (cx, JSProto_Uint8Array, &uint8ArrayPrototype)) {
160
- return false ;
161
- }
156
+ JS::RootedObject uint8ArrayPrototype (cx);
157
+ if (!JS_GetClassPrototype (cx, JSProto_Uint8Array, &uint8ArrayPrototype)) {
158
+ return false ;
159
+ }
162
160
163
- JS::RootedValue Uint8Array_Prototype_Constructor (cx);
164
- if (!JS_GetProperty (cx, uint8ArrayPrototype, " constructor" , &Uint8Array_Prototype_Constructor)) {
165
- return false ;
166
- }
161
+ JS::RootedValue Uint8Array_Prototype_Constructor (cx);
162
+ if (!JS_GetProperty (cx, uint8ArrayPrototype, " constructor" , &Uint8Array_Prototype_Constructor)) {
163
+ return false ;
164
+ }
167
165
168
- JS::RootedObject rootedUint8ArrayPrototypeConstructor (cx, Uint8Array_Prototype_Constructor.toObjectOrNull ());
166
+ JS::RootedObject rootedUint8ArrayPrototypeConstructor (cx, Uint8Array_Prototype_Constructor.toObjectOrNull ());
169
167
170
- desc.set (mozilla::Some (
171
- JS::PropertyDescriptor::Data (
172
- JS::ObjectValue (*rootedUint8ArrayPrototypeConstructor),
173
- {JS::PropertyAttribute::Enumerable}
174
- )
175
- ));
168
+ desc.set (mozilla::Some (
169
+ JS::PropertyDescriptor::Data (
170
+ JS::ObjectValue (*rootedUint8ArrayPrototypeConstructor),
171
+ {JS::PropertyAttribute::Enumerable}
172
+ )
173
+ ));
176
174
177
- return true ;
175
+ return true ;
176
+ }
178
177
}
179
178
180
179
if (id.isSymbol ()) {
0 commit comments