@@ -590,6 +590,9 @@ bool URL::createObjectURL(JSContext *cx, unsigned argc, JS::Value *vp) {
590590}
591591
592592bool URL::revokeObjectURL (JSContext *cx, unsigned argc, JS::Value *vp) {
593+ // Suppress false positive in Mozilla's HashTable implementation
594+ // about null dereference, the remove method will check if the entry exists.
595+ // NOLINTBEGIN
593596 CallArgs args = JS::CallArgsFromVp (argc, vp);
594597 if (!args.requireAtLeast (cx, " createObjectURL" , 1 )) {
595598 return false ;
@@ -602,8 +605,8 @@ bool URL::revokeObjectURL(JSContext *cx, unsigned argc, JS::Value *vp) {
602605 return false ;
603606 }
604607
605- // 2. If urlRecord’s scheme is not "blob", return.
606- // 3. Let entry be urlRecord’s blob URL entry.
608+ // 2. If urlRecord’s scheme is not "blob", return.
609+ // 3. Let entry be urlRecord’s blob URL entry.
607610 std::string url_record (chars.ptr .get ());
608611 if (!url_record.starts_with (" blob:" )) {
609612 return true ;
@@ -613,7 +616,9 @@ bool URL::revokeObjectURL(JSContext *cx, unsigned argc, JS::Value *vp) {
613616 // 5. Let isAuthorized be the result of checking for same-partition blob URL usage with entry and the current settings object.
614617 // 6. If isAuthorized is false, then return.
615618 // 7. Remove an entry from the Blob URL Store for url.
616- URL_STORE.get ().remove (chars.ptr .get ());
619+
620+ URL_STORE.get ().remove (url_record);
621+ // NOLINTEND
617622 return true ;
618623}
619624
0 commit comments