OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
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 | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
701 size_t length) { | 701 size_t length) { |
702 DCHECK(data); | 702 DCHECK(data); |
703 DCHECK(length); | 703 DCHECK(length); |
704 DCHECK_EQ(resource, main_resource_); | 704 DCHECK_EQ(resource, main_resource_); |
705 DCHECK(!response_.IsNull()); | 705 DCHECK(!response_.IsNull()); |
706 DCHECK(!frame_->GetPage()->Suspended()); | 706 DCHECK(!frame_->GetPage()->Suspended()); |
707 | 707 |
708 if (in_data_received_) { | 708 if (in_data_received_) { |
709 // If this function is reentered, defer processing of the additional data to | 709 // If this function is reentered, defer processing of the additional data to |
710 // the top-level invocation. Reentrant calls can occur because of web | 710 // the top-level invocation. Reentrant calls can occur because of web |
711 // platform (mis-)features that require running a nested message loop: | 711 // platform (mis-)features that require running a nested run loop: |
712 // - alert(), confirm(), prompt() | 712 // - alert(), confirm(), prompt() |
713 // - Detach of plugin elements. | 713 // - Detach of plugin elements. |
714 // - Synchronous XMLHTTPRequest | 714 // - Synchronous XMLHTTPRequest |
715 data_buffer_->Append(data, length); | 715 data_buffer_->Append(data, length); |
716 return; | 716 return; |
717 } | 717 } |
718 | 718 |
719 AutoReset<bool> reentrancy_protector(&in_data_received_, true); | 719 AutoReset<bool> reentrancy_protector(&in_data_received_, true); |
720 ProcessData(data, length); | 720 ProcessData(data, length); |
721 | 721 |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 InstallNewDocumentReason::kJavascriptURL, | 1103 InstallNewDocumentReason::kJavascriptURL, |
1104 kForceSynchronousParsing, KURL()); | 1104 kForceSynchronousParsing, KURL()); |
1105 if (!source.IsNull()) | 1105 if (!source.IsNull()) |
1106 writer_->AppendReplacingData(source); | 1106 writer_->AppendReplacingData(source); |
1107 EndWriting(); | 1107 EndWriting(); |
1108 } | 1108 } |
1109 | 1109 |
1110 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); | 1110 DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader); |
1111 | 1111 |
1112 } // namespace blink | 1112 } // namespace blink |
OLD | NEW |