| 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 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 handleResponse(identifier, response, nullptr); | 961 handleResponse(identifier, response, nullptr); |
| 962 | 962 |
| 963 // handleResponse() may detect an error. In such a case (check |m_client| | 963 // handleResponse() may detect an error. In such a case (check |m_client| |
| 964 // as it gets reset by clear() call), skip the rest. | 964 // as it gets reset by clear() call), skip the rest. |
| 965 // | 965 // |
| 966 // |this| is alive here since loadResourceSynchronously() keeps it alive | 966 // |this| is alive here since loadResourceSynchronously() keeps it alive |
| 967 // until the end of the function. | 967 // until the end of the function. |
| 968 if (!m_client) | 968 if (!m_client) |
| 969 return; | 969 return; |
| 970 | 970 |
| 971 SharedBuffer* data = resource->resourceBuffer(); | 971 RefPtr<SharedBuffer> data = resource->resourceBuffer(); |
| 972 if (data) | 972 if (data) |
| 973 handleReceivedData(data->data(), data->size()); | 973 handleReceivedData(data->data(), data->size()); |
| 974 | 974 |
| 975 // The client may cancel this loader in handleReceivedData(). In such a | 975 // The client may cancel this loader in handleReceivedData(). In such a |
| 976 // case, skip the rest. | 976 // case, skip the rest. |
| 977 if (!m_client) | 977 if (!m_client) |
| 978 return; | 978 return; |
| 979 | 979 |
| 980 handleSuccessfulFinish(identifier, 0.0); | 980 handleSuccessfulFinish(identifier, 0.0); |
| 981 } | 981 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1000 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); | 1000 return m_securityOrigin ? m_securityOrigin.get() : document().getSecurityOri
gin(); |
| 1001 } | 1001 } |
| 1002 | 1002 |
| 1003 Document& DocumentThreadableLoader::document() const | 1003 Document& DocumentThreadableLoader::document() const |
| 1004 { | 1004 { |
| 1005 ASSERT(m_document); | 1005 ASSERT(m_document); |
| 1006 return *m_document; | 1006 return *m_document; |
| 1007 } | 1007 } |
| 1008 | 1008 |
| 1009 } // namespace blink | 1009 } // namespace blink |
| OLD | NEW |