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

Unified Diff: Source/core/fetch/ScriptResource.cpp

Issue 368283002: Stream scripts to V8 as they load - Blink side. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed untrue assert Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ScriptResource.h ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ScriptResource.cpp
diff --git a/Source/core/fetch/ScriptResource.cpp b/Source/core/fetch/ScriptResource.cpp
index 1d12949a3a943235fc14677ff994fe539dc4de81..0bc66149d483b8c8dfca1fd318906eca835ff3b7 100644
--- a/Source/core/fetch/ScriptResource.cpp
+++ b/Source/core/fetch/ScriptResource.cpp
@@ -27,6 +27,7 @@
#include "config.h"
#include "core/fetch/ScriptResource.h"
+#include "core/fetch/ResourceClientWalker.h"
#include "platform/MIMETypeRegistry.h"
#include "platform/SharedBuffer.h"
#include "platform/network/HTTPParsers.h"
@@ -48,6 +49,20 @@ ScriptResource::~ScriptResource()
{
}
+void ScriptResource::didAddClient(ResourceClient* client)
+{
+ ASSERT(client->resourceClientType() == ScriptResourceClient::expectedType());
+ Resource::didAddClient(client);
+}
+
+void ScriptResource::appendData(const char* data, int length)
+{
+ Resource::appendData(data, length);
+ ResourceClientWalker<ScriptResourceClient> walker(m_clients);
+ while (ScriptResourceClient* client = walker.next())
+ client->notifyAppendData(this);
+}
+
AtomicString ScriptResource::mimeType() const
{
return extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type")).lower();
« no previous file with comments | « Source/core/fetch/ScriptResource.h ('k') | Source/core/frame/Settings.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698