OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 handleResponse(identifier, response, nullptr); | 940 handleResponse(identifier, response, nullptr); |
941 | 941 |
942 // handleResponse() may detect an error. In such a case (check |m_client| | 942 // handleResponse() may detect an error. In such a case (check |m_client| |
943 // as it gets reset by clear() call), skip the rest. | 943 // as it gets reset by clear() call), skip the rest. |
944 // | 944 // |
945 // |this| is alive here since loadResourceSynchronously() keeps it alive | 945 // |this| is alive here since loadResourceSynchronously() keeps it alive |
946 // until the end of the function. | 946 // until the end of the function. |
947 if (!m_client) | 947 if (!m_client) |
948 return; | 948 return; |
949 | 949 |
950 RefPtr<SharedBuffer> data = resource->resourceBuffer(); | 950 RefPtr<const SharedBuffer> data = resource->resourceBuffer(); |
951 if (data) | 951 if (data) |
952 handleReceivedData(data->data(), data->size()); | 952 handleReceivedData(data->data(), data->size()); |
953 | 953 |
954 // The client may cancel this loader in handleReceivedData(). In such a | 954 // The client may cancel this loader in handleReceivedData(). In such a |
955 // case, skip the rest. | 955 // case, skip the rest. |
956 if (!m_client) | 956 if (!m_client) |
957 return; | 957 return; |
958 | 958 |
959 handleSuccessfulFinish(identifier, 0.0); | 959 handleSuccessfulFinish(identifier, 0.0); |
960 } | 960 } |
(...skipping 26 matching lines...) Expand all Loading... |
987 | 987 |
988 DEFINE_TRACE(DocumentThreadableLoader) | 988 DEFINE_TRACE(DocumentThreadableLoader) |
989 { | 989 { |
990 visitor->trace(m_resource); | 990 visitor->trace(m_resource); |
991 visitor->trace(m_document); | 991 visitor->trace(m_document); |
992 ThreadableLoader::trace(visitor); | 992 ThreadableLoader::trace(visitor); |
993 RawResourceClient::trace(visitor); | 993 RawResourceClient::trace(visitor); |
994 } | 994 } |
995 | 995 |
996 } // namespace blink | 996 } // namespace blink |
OLD | NEW |