Try to create the resource of the parent if all the child requests has been resolved. We continue up the parent chain until we find a parent where all children are not resolved and we break Returns true if at least one parent in the chain is created
| 680 | // children are not resolved and we break |
| 681 | // Returns true if at least one parent in the chain is created |
| 682 | static bool PreloaderTryPruneParent(HPreloader preloader, PreloadRequest* req) |
| 683 | { |
| 684 | TRequestIndex parent = req->m_Parent; |
| 685 | if (parent == -1) |
| 686 | { |
| 687 | return false; |
| 688 | } |
| 689 | PreloadRequest* parent_req = &preloader->m_Request[parent]; |
| 690 | if (parent_req->m_PendingChildCount > 0) |
| 691 | { |
| 692 | return false; |
| 693 | } |
| 694 | CreateResource(preloader, parent_req, 0, 0, 0); |
| 695 | UnmarkPathInProgress(preloader, &parent_req->m_PathDescriptor); |
| 696 | PreloaderTryPruneParent(preloader, parent_req); |
| 697 | return true; |
| 698 | } |
| 699 | |
| 700 | // Ends the Load part of the resource and handles the result of the load |
| 701 | // It will create the resource if it has no children, otherwise it will |
no test coverage detected