Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2260303002: Sending an async GET request for doc.written blocked scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows compile error for GetResourcePriority return type fixed. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 #include "public/platform/WebViewScheduler.h" 76 #include "public/platform/WebViewScheduler.h"
77 #include <algorithm> 77 #include <algorithm>
78 #include <memory> 78 #include <memory>
79 79
80 namespace blink { 80 namespace blink {
81 81
82 namespace { 82 namespace {
83 83
84 void emitWarningForDocWriteScripts(const String& url, Document& document) 84 void emitWarningForDocWriteScripts(const String& url, Document& document)
85 { 85 {
86 String message = "A Parser-blocking, cross-origin script, " + url + ", is in voked via document.write. This may be blocked by the browser if the device has p oor network connectivity."; 86 String message = "A Parser-blocking, cross-origin script, " + url + ", is in voked via document.write. This may be blocked by the browser if the device has p oor network connectivity. See https://www.chromestatus.com/feature/5718547946799 104 for more details.";
87 document.addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMe ssageLevel, message)); 87 document.addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMe ssageLevel, message));
88 WTFLogAlways("%s", message.utf8().data()); 88 WTFLogAlways("%s", message.utf8().data());
89 } 89 }
90 90
91 bool shouldDisallowFetchForMainFrameScript(const ResourceRequest& request, Fetch Request::DeferOption defer, Document& document) 91 bool shouldDisallowFetchForMainFrameScript(const ResourceRequest& request, Fetch Request::DeferOption defer, Document& document)
92 { 92 {
93 // Only scripts inserted via document.write are candidates for having their 93 // Only scripts inserted via document.write are candidates for having their
94 // fetch disallowed. 94 // fetch disallowed.
95 if (!document.isInDocumentWrite()) 95 if (!document.isInDocumentWrite())
96 return false; 96 return false;
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 } 799 }
800 800
801 DEFINE_TRACE(FrameFetchContext) 801 DEFINE_TRACE(FrameFetchContext)
802 { 802 {
803 visitor->trace(m_document); 803 visitor->trace(m_document);
804 visitor->trace(m_documentLoader); 804 visitor->trace(m_documentLoader);
805 FetchContext::trace(visitor); 805 FetchContext::trace(visitor);
806 } 806 }
807 807
808 } // namespace blink 808 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698