we (web engine): Experimental web browser project to understand the limits of Claude
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Review fixes: remove dead code, fix misplaced doc comment

- Remove unused `val_str` variable in `handle_style_set`
- Remove `let _ = bridge;` dead code suppression in `create_class_list`,
prefix param with underscore instead
- Move `collect_roots` doc comment to correct method (was accidentally
attached to `resolve_dom_property`)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+2 -8
+1 -7
crates/js/src/dom_bridge.rs
··· 1254 1254 }; 1255 1255 1256 1256 // Set the property on the style object normally. 1257 - let val_str = val.to_js_string(gc); 1258 1257 if let Some(HeapObject::Object(data)) = gc.get_mut(gc_ref) { 1259 1258 data.properties 1260 1259 .insert(key.to_string(), Property::data(val.clone())); ··· 1267 1266 .borrow_mut() 1268 1267 .set_attribute(node_id, "style", &style_str); 1269 1268 1270 - // Also set it as a normal property (already done above), but tell caller it was handled. 1271 - let _ = val_str; 1272 1269 true 1273 1270 } 1274 1271 1275 1272 // ── classList helpers ─────────────────────────────────────────────── 1276 1273 1277 - fn create_class_list(gc: &mut Gc<HeapObject>, bridge: &DomBridge, node_id: NodeId) -> Value { 1274 + fn create_class_list(gc: &mut Gc<HeapObject>, _bridge: &DomBridge, node_id: NodeId) -> Value { 1278 1275 let mut data = ObjectData::new(); 1279 1276 // Store the node ID for method callbacks. 1280 1277 data.properties.insert( ··· 1295 1292 set_builtin_prop(gc, gc_ref, name, Value::Function(func)); 1296 1293 } 1297 1294 1298 - // Also keep a reference to the bridge node_wrappers to avoid issues. 1299 - // The classList methods use ctx.dom_bridge to access the document. 1300 - let _ = bridge; 1301 1295 Value::Object(gc_ref) 1302 1296 } 1303 1297
+1 -1
crates/js/src/vm.rs
··· 1958 1958 self.gc.alloc(HeapObject::Object(obj)) 1959 1959 } 1960 1960 1961 - /// Collect all GcRef values reachable from the mutator (roots for GC). 1962 1961 /// Resolve a dynamic DOM property for a wrapper object. 1963 1962 /// Returns `Some(value)` if the key is a recognized DOM property, `None` otherwise. 1964 1963 fn resolve_dom_property(&mut self, gc_ref: GcRef, key: &str) -> Option<Value> { ··· 1981 1980 } 1982 1981 } 1983 1982 1983 + /// Collect all GcRef values reachable from the mutator (roots for GC). 1984 1984 fn collect_roots(&self) -> Vec<GcRef> { 1985 1985 let mut roots = Vec::new(); 1986 1986 for val in &self.registers {