소스 검색

LibWeb: Assert that cloned node is not null before returning

This makes potential issues easier to track down.
Tim Ledbetter 11 달 전
부모
커밋
f8b1e96e2b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Userland/Libraries/LibWeb/DOM/Node.cpp

+ 1 - 0
Userland/Libraries/LibWeb/DOM/Node.cpp

@@ -1040,6 +1040,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Node>> Node::clone_node(Document* document,
     }
 
     // 7. Return copy.
+    VERIFY(copy);
     return JS::NonnullGCPtr { *copy };
 }