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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 , m_navigationType(NavigationTypeOther) | 93 , m_navigationType(NavigationTypeOther) |
94 , m_loadingMainResource(false) | 94 , m_loadingMainResource(false) |
95 , m_timeOfLastDataReceived(0.0) | 95 , m_timeOfLastDataReceived(0.0) |
96 , m_applicationCacheHost(ApplicationCacheHost::create(this)) | 96 , m_applicationCacheHost(ApplicationCacheHost::create(this)) |
97 { | 97 { |
98 } | 98 } |
99 | 99 |
100 FrameLoader* DocumentLoader::frameLoader() const | 100 FrameLoader* DocumentLoader::frameLoader() const |
101 { | 101 { |
102 if (!m_frame) | 102 if (!m_frame) |
103 return 0; | 103 return nullptr; |
104 return &m_frame->loader(); | 104 return &m_frame->loader(); |
105 } | 105 } |
106 | 106 |
107 ResourceLoader* DocumentLoader::mainResourceLoader() const | 107 ResourceLoader* DocumentLoader::mainResourceLoader() const |
108 { | 108 { |
109 return m_mainResource ? m_mainResource->loader() : 0; | 109 return m_mainResource ? m_mainResource->loader() : nullptr; |
110 } | 110 } |
111 | 111 |
112 DocumentLoader::~DocumentLoader() | 112 DocumentLoader::~DocumentLoader() |
113 { | 113 { |
114 ASSERT(!m_frame || !isLoading()); | 114 ASSERT(!m_frame || !isLoading()); |
115 clearMainResourceHandle(); | 115 ASSERT(!m_mainResource); |
116 m_applicationCacheHost->dispose(); | 116 ASSERT(!m_applicationCacheHost); |
| 117 } |
| 118 |
| 119 DEFINE_TRACE(DocumentLoader) |
| 120 { |
| 121 visitor->trace(m_frame); |
| 122 visitor->trace(m_fetcher); |
| 123 // TODO(sof): start tracing ResourcePtr<>s (and m_mainResource.) |
| 124 visitor->trace(m_writer); |
| 125 visitor->trace(m_archive); |
| 126 visitor->trace(m_applicationCacheHost); |
117 } | 127 } |
118 | 128 |
119 unsigned long DocumentLoader::mainResourceIdentifier() const | 129 unsigned long DocumentLoader::mainResourceIdentifier() const |
120 { | 130 { |
121 return m_mainResource ? m_mainResource->identifier() : 0; | 131 return m_mainResource ? m_mainResource->identifier() : 0; |
122 } | 132 } |
123 | 133 |
124 Document* DocumentLoader::document() const | 134 Document* DocumentLoader::document() const |
125 { | 135 { |
126 if (m_frame && m_frame->loader().documentLoader() == this) | 136 if (m_frame && m_frame->loader().documentLoader() == this) |
127 return m_frame->document(); | 137 return m_frame->document(); |
128 return 0; | 138 return nullptr; |
129 } | 139 } |
130 | 140 |
131 const ResourceRequest& DocumentLoader::originalRequest() const | 141 const ResourceRequest& DocumentLoader::originalRequest() const |
132 { | 142 { |
133 return m_originalRequest; | 143 return m_originalRequest; |
134 } | 144 } |
135 | 145 |
136 const ResourceRequest& DocumentLoader::request() const | 146 const ResourceRequest& DocumentLoader::request() const |
137 { | 147 { |
138 return m_request; | 148 return m_request; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 | 193 |
184 const KURL& DocumentLoader::urlForHistory() const | 194 const KURL& DocumentLoader::urlForHistory() const |
185 { | 195 { |
186 return unreachableURL().isEmpty() ? url() : unreachableURL(); | 196 return unreachableURL().isEmpty() ? url() : unreachableURL(); |
187 } | 197 } |
188 | 198 |
189 void DocumentLoader::mainReceivedError(const ResourceError& error) | 199 void DocumentLoader::mainReceivedError(const ResourceError& error) |
190 { | 200 { |
191 ASSERT(!error.isNull()); | 201 ASSERT(!error.isNull()); |
192 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In
spectorInstrumentation::isDebuggerPaused(m_frame)); | 202 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In
spectorInstrumentation::isDebuggerPaused(m_frame)); |
193 m_applicationCacheHost->failedLoadingMainResource(); | 203 if (m_applicationCacheHost) |
| 204 m_applicationCacheHost->failedLoadingMainResource(); |
194 if (!frameLoader()) | 205 if (!frameLoader()) |
195 return; | 206 return; |
196 m_mainDocumentError = error; | 207 m_mainDocumentError = error; |
197 clearMainResourceLoader(); | 208 clearMainResourceLoader(); |
198 frameLoader()->receivedMainResourceError(this, error); | 209 frameLoader()->receivedMainResourceError(this, error); |
199 clearMainResourceHandle(); | 210 clearMainResourceHandle(); |
200 } | 211 } |
201 | 212 |
202 // Cancels the data source's pending loads. Conceptually, a data source only lo
ads | 213 // Cancels the data source's pending loads. Conceptually, a data source only lo
ads |
203 // one document at a time, but one document may have many related resources. | 214 // one document at a time, but one document may have many related resources. |
204 // stopLoading will stop all loads initiated by the data source, | 215 // stopLoading will stop all loads initiated by the data source, |
205 // but not loads initiated by child frames' data sources -- that's the WebFrame'
s job. | 216 // but not loads initiated by child frames' data sources -- that's the WebFrame'
s job. |
206 void DocumentLoader::stopLoading() | 217 void DocumentLoader::stopLoading() |
207 { | 218 { |
208 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame); | 219 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); |
209 RefPtr<DocumentLoader> protectLoader(this); | 220 RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); |
210 | 221 |
211 m_fetcher->stopFetching(); | 222 m_fetcher->stopFetching(); |
212 if (isLoading()) | 223 if (isLoading()) |
213 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); | 224 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); |
214 } | 225 } |
215 | 226 |
216 void DocumentLoader::commitIfReady() | 227 void DocumentLoader::commitIfReady() |
217 { | 228 { |
218 if (!m_committed) { | 229 if (!m_committed) { |
219 m_committed = true; | 230 m_committed = true; |
220 frameLoader()->commitProvisionalLoad(); | 231 frameLoader()->commitProvisionalLoad(); |
221 } | 232 } |
222 } | 233 } |
223 | 234 |
224 bool DocumentLoader::isLoading() const | 235 bool DocumentLoader::isLoading() const |
225 { | 236 { |
226 if (document() && document()->hasActiveParser()) | 237 if (document() && document()->hasActiveParser()) |
227 return true; | 238 return true; |
228 | 239 |
229 return m_loadingMainResource || m_fetcher->isFetching(); | 240 return m_loadingMainResource || m_fetcher->isFetching(); |
230 } | 241 } |
231 | 242 |
232 void DocumentLoader::notifyFinished(Resource* resource) | 243 void DocumentLoader::notifyFinished(Resource* resource) |
233 { | 244 { |
234 ASSERT_UNUSED(resource, m_mainResource == resource); | 245 ASSERT_UNUSED(resource, m_mainResource == resource); |
235 ASSERT(m_mainResource); | 246 ASSERT(m_mainResource); |
236 | 247 |
237 RefPtr<DocumentLoader> protect(this); | 248 RefPtrWillBeRawPtr<DocumentLoader> protect(this); |
238 | 249 |
239 if (!m_mainResource->errorOccurred() && !m_mainResource->wasCanceled()) { | 250 if (!m_mainResource->errorOccurred() && !m_mainResource->wasCanceled()) { |
240 finishedLoading(m_mainResource->loadFinishTime()); | 251 finishedLoading(m_mainResource->loadFinishTime()); |
241 return; | 252 return; |
242 } | 253 } |
243 | 254 |
244 mainReceivedError(m_mainResource->resourceError()); | 255 mainReceivedError(m_mainResource->resourceError()); |
245 } | 256 } |
246 | 257 |
247 void DocumentLoader::finishedLoading(double finishTime) | 258 void DocumentLoader::finishedLoading(double finishTime) |
248 { | 259 { |
249 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In
spectorInstrumentation::isDebuggerPaused(m_frame)); | 260 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading() || In
spectorInstrumentation::isDebuggerPaused(m_frame)); |
250 | 261 |
251 RefPtr<DocumentLoader> protect(this); | 262 RefPtrWillBeRawPtr<DocumentLoader> protect(this); |
252 | 263 |
253 double responseEndTime = finishTime; | 264 double responseEndTime = finishTime; |
254 if (!responseEndTime) | 265 if (!responseEndTime) |
255 responseEndTime = m_timeOfLastDataReceived; | 266 responseEndTime = m_timeOfLastDataReceived; |
256 if (!responseEndTime) | 267 if (!responseEndTime) |
257 responseEndTime = monotonicallyIncreasingTime(); | 268 responseEndTime = monotonicallyIncreasingTime(); |
258 timing().setResponseEnd(responseEndTime); | 269 timing().setResponseEnd(responseEndTime); |
259 | 270 |
260 commitIfReady(); | 271 commitIfReady(); |
261 if (!frameLoader()) | 272 if (!frameLoader()) |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 // The load event might have detached this frame. In that case, the load wil
l already have been cancelled during detach. | 440 // The load event might have detached this frame. In that case, the load wil
l already have been cancelled during detach. |
430 if (frameLoader()) | 441 if (frameLoader()) |
431 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); | 442 cancelMainResourceLoad(ResourceError::cancelledError(m_request.url())); |
432 return; | 443 return; |
433 } | 444 } |
434 | 445 |
435 void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
& response, PassOwnPtr<WebDataConsumerHandle> handle) | 446 void DocumentLoader::responseReceived(Resource* resource, const ResourceResponse
& response, PassOwnPtr<WebDataConsumerHandle> handle) |
436 { | 447 { |
437 ASSERT_UNUSED(resource, m_mainResource == resource); | 448 ASSERT_UNUSED(resource, m_mainResource == resource); |
438 ASSERT_UNUSED(handle, !handle); | 449 ASSERT_UNUSED(handle, !handle); |
439 RefPtr<DocumentLoader> protect(this); | 450 RefPtrWillBeRawPtr<DocumentLoader> protect(this); |
440 ASSERT(frame()); | 451 ASSERT(frame()); |
441 | 452 |
442 m_applicationCacheHost->didReceiveResponseForMainResource(response); | 453 m_applicationCacheHost->didReceiveResponseForMainResource(response); |
443 | 454 |
444 // The memory cache doesn't understand the application cache or its caching
rules. So if a main resource is served | 455 // The memory cache doesn't understand the application cache or its caching
rules. So if a main resource is served |
445 // from the application cache, ensure we don't save the result for future us
e. All responses loaded | 456 // from the application cache, ensure we don't save the result for future us
e. All responses loaded |
446 // from appcache will have a non-zero appCacheID(). | 457 // from appcache will have a non-zero appCacheID(). |
447 if (response.appCacheID()) | 458 if (response.appCacheID()) |
448 memoryCache()->remove(m_mainResource.get()); | 459 memoryCache()->remove(m_mainResource.get()); |
449 | 460 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 void DocumentLoader::dataReceived(Resource* resource, const char* data, unsigned
length) | 545 void DocumentLoader::dataReceived(Resource* resource, const char* data, unsigned
length) |
535 { | 546 { |
536 ASSERT(data); | 547 ASSERT(data); |
537 ASSERT(length); | 548 ASSERT(length); |
538 ASSERT_UNUSED(resource, resource == m_mainResource); | 549 ASSERT_UNUSED(resource, resource == m_mainResource); |
539 ASSERT(!m_response.isNull()); | 550 ASSERT(!m_response.isNull()); |
540 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); | 551 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); |
541 | 552 |
542 // Both unloading the old page and parsing the new page may execute JavaScri
pt which destroys the datasource | 553 // Both unloading the old page and parsing the new page may execute JavaScri
pt which destroys the datasource |
543 // by starting a new load, so retain temporarily. | 554 // by starting a new load, so retain temporarily. |
544 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame); | 555 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); |
545 RefPtr<DocumentLoader> protectLoader(this); | 556 RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); |
546 | 557 |
547 m_applicationCacheHost->mainResourceDataReceived(data, length); | 558 m_applicationCacheHost->mainResourceDataReceived(data, length); |
548 m_timeOfLastDataReceived = monotonicallyIncreasingTime(); | 559 m_timeOfLastDataReceived = monotonicallyIncreasingTime(); |
549 | 560 |
550 if (isArchiveMIMEType(response().mimeType())) | 561 if (isArchiveMIMEType(response().mimeType())) |
551 return; | 562 return; |
552 commitIfReady(); | 563 commitIfReady(); |
553 if (!frameLoader()) | 564 if (!frameLoader()) |
554 return; | 565 return; |
555 commitData(data, length); | 566 commitData(data, length); |
(...skipping 15 matching lines...) Expand all Loading... |
571 } | 582 } |
572 | 583 |
573 bool DocumentLoader::loadingMultipartContent() const | 584 bool DocumentLoader::loadingMultipartContent() const |
574 { | 585 { |
575 return mainResourceLoader() ? mainResourceLoader()->loadingMultipartContent(
) : false; | 586 return mainResourceLoader() ? mainResourceLoader()->loadingMultipartContent(
) : false; |
576 } | 587 } |
577 | 588 |
578 void DocumentLoader::detachFromFrame() | 589 void DocumentLoader::detachFromFrame() |
579 { | 590 { |
580 ASSERT(m_frame); | 591 ASSERT(m_frame); |
581 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame); | 592 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame.get()); |
582 RefPtr<DocumentLoader> protectLoader(this); | 593 RefPtrWillBeRawPtr<DocumentLoader> protectLoader(this); |
583 | 594 |
584 // It never makes sense to have a document loader that is detached from its | 595 // It never makes sense to have a document loader that is detached from its |
585 // frame have any loads active, so go ahead and kill all the loads. | 596 // frame have any loads active, so go ahead and kill all the loads. |
586 stopLoading(); | 597 stopLoading(); |
587 | 598 |
| 599 // If that load cancellation triggered another detach, leave. |
| 600 // (fast/frames/detach-frame-nested-no-crash.html is an example of this.) |
| 601 if (!m_frame) |
| 602 return; |
| 603 |
588 m_fetcher->clearContext(); | 604 m_fetcher->clearContext(); |
589 m_applicationCacheHost->setApplicationCache(0); | 605 m_applicationCacheHost->detachFromDocumentLoader(); |
| 606 m_applicationCacheHost.clear(); |
590 WeakIdentifierMap<DocumentLoader>::notifyObjectDestroyed(this); | 607 WeakIdentifierMap<DocumentLoader>::notifyObjectDestroyed(this); |
591 m_frame = 0; | 608 clearMainResourceHandle(); |
| 609 m_frame = nullptr; |
592 } | 610 } |
593 | 611 |
594 void DocumentLoader::clearMainResourceLoader() | 612 void DocumentLoader::clearMainResourceLoader() |
595 { | 613 { |
596 m_loadingMainResource = false; | 614 m_loadingMainResource = false; |
597 } | 615 } |
598 | 616 |
599 void DocumentLoader::clearMainResourceHandle() | 617 void DocumentLoader::clearMainResourceHandle() |
600 { | 618 { |
601 if (!m_mainResource) | 619 if (!m_mainResource) |
602 return; | 620 return; |
603 m_mainResource->removeClient(this); | 621 m_mainResource->removeClient(this); |
604 m_mainResource = 0; | 622 m_mainResource = nullptr; |
605 } | 623 } |
606 | 624 |
607 bool DocumentLoader::maybeCreateArchive() | 625 bool DocumentLoader::maybeCreateArchive() |
608 { | 626 { |
609 // Only the top-frame can load MHTML. | 627 // Only the top-frame can load MHTML. |
610 if (m_frame->tree().parent()) | 628 if (m_frame->tree().parent()) |
611 return false; | 629 return false; |
612 | 630 |
613 // Give the archive machinery a crack at this document. If the MIME type is
not an archive type, it will return 0. | 631 // Give the archive machinery a crack at this document. If the MIME type is
not an archive type, it will return 0. |
614 if (!isArchiveMIMEType(m_response.mimeType())) | 632 if (!isArchiveMIMEType(m_response.mimeType())) |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 | 702 |
685 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni
tialEmptyDocument()) | 703 if (m_request.url().isEmpty() && !frameLoader()->stateMachine()->creatingIni
tialEmptyDocument()) |
686 m_request.setURL(blankURL()); | 704 m_request.setURL(blankURL()); |
687 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str
ing()); | 705 m_response = ResourceResponse(m_request.url(), "text/html", 0, nullAtom, Str
ing()); |
688 finishedLoading(monotonicallyIncreasingTime()); | 706 finishedLoading(monotonicallyIncreasingTime()); |
689 return true; | 707 return true; |
690 } | 708 } |
691 | 709 |
692 void DocumentLoader::startLoadingMainResource() | 710 void DocumentLoader::startLoadingMainResource() |
693 { | 711 { |
694 RefPtr<DocumentLoader> protect(this); | 712 RefPtrWillBeRawPtr<DocumentLoader> protect(this); |
695 m_mainDocumentError = ResourceError(); | 713 m_mainDocumentError = ResourceError(); |
696 timing().markNavigationStart(); | 714 timing().markNavigationStart(); |
697 ASSERT(!m_mainResource); | 715 ASSERT(!m_mainResource); |
698 ASSERT(!m_loadingMainResource); | 716 ASSERT(!m_loadingMainResource); |
699 m_loadingMainResource = true; | 717 m_loadingMainResource = true; |
700 | 718 |
701 if (maybeLoadEmpty()) | 719 if (maybeLoadEmpty()) |
702 return; | 720 return; |
703 | 721 |
704 ASSERT(timing().navigationStart()); | 722 ASSERT(timing().navigationStart()); |
(...skipping 11 matching lines...) Expand all Loading... |
716 ResourceRequest request(m_request); | 734 ResourceRequest request(m_request); |
717 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, | 735 DEFINE_STATIC_LOCAL(ResourceLoaderOptions, mainResourceLoadOptions, |
718 (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, Ch
eckContentSecurityPolicy, DocumentContext)); | 736 (DoNotBufferData, AllowStoredCredentials, ClientRequestedCredentials, Ch
eckContentSecurityPolicy, DocumentContext)); |
719 FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::documen
t, mainResourceLoadOptions); | 737 FetchRequest cachedResourceRequest(request, FetchInitiatorTypeNames::documen
t, mainResourceLoadOptions); |
720 m_mainResource = RawResource::fetchMainResource(cachedResourceRequest, fetch
er(), m_substituteData); | 738 m_mainResource = RawResource::fetchMainResource(cachedResourceRequest, fetch
er(), m_substituteData); |
721 if (!m_mainResource) { | 739 if (!m_mainResource) { |
722 m_request = ResourceRequest(); | 740 m_request = ResourceRequest(); |
723 // If the load was aborted by clearing m_request, it's possible the Appl
icationCacheHost | 741 // If the load was aborted by clearing m_request, it's possible the Appl
icationCacheHost |
724 // is now in a state where starting an empty load will be inconsistent.
Replace it with | 742 // is now in a state where starting an empty load will be inconsistent.
Replace it with |
725 // a new ApplicationCacheHost. | 743 // a new ApplicationCacheHost. |
| 744 if (m_applicationCacheHost) |
| 745 m_applicationCacheHost->detachFromDocumentLoader(); |
726 m_applicationCacheHost = ApplicationCacheHost::create(this); | 746 m_applicationCacheHost = ApplicationCacheHost::create(this); |
727 maybeLoadEmpty(); | 747 maybeLoadEmpty(); |
728 return; | 748 return; |
729 } | 749 } |
730 m_mainResource->addClient(this); | 750 m_mainResource->addClient(this); |
731 | 751 |
732 // A bunch of headers are set when the underlying ResourceLoader is created,
and m_request needs to include those. | 752 // A bunch of headers are set when the underlying ResourceLoader is created,
and m_request needs to include those. |
733 if (mainResourceLoader()) | 753 if (mainResourceLoader()) |
734 request = mainResourceLoader()->originalRequest(); | 754 request = mainResourceLoader()->originalRequest(); |
735 // If there was a fragment identifier on m_request, the cache will have stri
pped it. m_request should include | 755 // If there was a fragment identifier on m_request, the cache will have stri
pped it. m_request should include |
736 // the fragment identifier, so add that back in. | 756 // the fragment identifier, so add that back in. |
737 if (equalIgnoringFragmentIdentifier(m_request.url(), request.url())) | 757 if (equalIgnoringFragmentIdentifier(m_request.url(), request.url())) |
738 request.setURL(m_request.url()); | 758 request.setURL(m_request.url()); |
739 m_request = request; | 759 m_request = request; |
740 } | 760 } |
741 | 761 |
742 void DocumentLoader::cancelMainResourceLoad(const ResourceError& resourceError) | 762 void DocumentLoader::cancelMainResourceLoad(const ResourceError& resourceError) |
743 { | 763 { |
744 RefPtr<DocumentLoader> protect(this); | 764 RefPtrWillBeRawPtr<DocumentLoader> protect(this); |
745 ResourceError error = resourceError.isNull() ? ResourceError::cancelledError
(m_request.url()) : resourceError; | 765 ResourceError error = resourceError.isNull() ? ResourceError::cancelledError
(m_request.url()) : resourceError; |
746 | 766 |
747 if (mainResourceLoader()) | 767 if (mainResourceLoader()) |
748 mainResourceLoader()->cancel(error); | 768 mainResourceLoader()->cancel(error); |
749 | 769 |
750 mainReceivedError(error); | 770 mainReceivedError(error); |
751 } | 771 } |
752 | 772 |
753 void DocumentLoader::attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedD
ataReceiver> threadedDataReceiver) | 773 void DocumentLoader::attachThreadedDataReceiver(PassRefPtrWillBeRawPtr<ThreadedD
ataReceiver> threadedDataReceiver) |
754 { | 774 { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
799 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() | 819 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR
L() |
800 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) | 820 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn
it& init, const String& source, Document* ownerDocument) |
801 { | 821 { |
802 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); | 822 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri
ter->encoding() : emptyAtom, true, ForceSynchronousParsing); |
803 if (!source.isNull()) | 823 if (!source.isNull()) |
804 m_writer->appendReplacingData(source); | 824 m_writer->appendReplacingData(source); |
805 endWriting(m_writer.get()); | 825 endWriting(m_writer.get()); |
806 } | 826 } |
807 | 827 |
808 } // namespace blink | 828 } // namespace blink |
OLD | NEW |