| 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 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 handleResponse(identifier, response, nullptr); | 952 handleResponse(identifier, response, nullptr); |
| 953 | 953 |
| 954 // handleResponse() may detect an error. In such a case (check |m_client| | 954 // handleResponse() may detect an error. In such a case (check |m_client| |
| 955 // as it gets reset by clear() call), skip the rest. | 955 // as it gets reset by clear() call), skip the rest. |
| 956 // | 956 // |
| 957 // |this| is alive here since loadResourceSynchronously() keeps it alive | 957 // |this| is alive here since loadResourceSynchronously() keeps it alive |
| 958 // until the end of the function. | 958 // until the end of the function. |
| 959 if (!m_client) | 959 if (!m_client) |
| 960 return; | 960 return; |
| 961 | 961 |
| 962 SharedBuffer* data = resource->resourceBuffer(); | 962 RefPtr<SharedBuffer> data = resource->resourceBuffer(); |
| 963 if (data) | 963 if (data) |
| 964 handleReceivedData(data->data(), data->size()); | 964 handleReceivedData(data->data(), data->size()); |
| 965 | 965 |
| 966 // The client may cancel this loader in handleReceivedData(). In such a | 966 // The client may cancel this loader in handleReceivedData(). In such a |
| 967 // case, skip the rest. | 967 // case, skip the rest. |
| 968 if (!m_client) | 968 if (!m_client) |
| 969 return; | 969 return; |
| 970 | 970 |
| 971 handleSuccessfulFinish(identifier, 0.0); | 971 handleSuccessfulFinish(identifier, 0.0); |
| 972 } | 972 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 991 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 991 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 992 } | 992 } |
| 993 | 993 |
| 994 Document& DocumentThreadableLoader::document() const | 994 Document& DocumentThreadableLoader::document() const |
| 995 { | 995 { |
| 996 ASSERT(m_document); | 996 ASSERT(m_document); |
| 997 return *m_document; | 997 return *m_document; |
| 998 } | 998 } |
| 999 | 999 |
| 1000 } // namespace blink | 1000 } // namespace blink |
| OLD | NEW |