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

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: renaming Created 6 years, 4 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
Index: Source/core/fetch/ScriptResource.cpp
diff --git a/Source/core/fetch/ScriptResource.cpp b/Source/core/fetch/ScriptResource.cpp
index 1d12949a3a943235fc14677ff994fe539dc4de81..83a0a7a1eb9a109b1b09ebb2cdef11b8df22ccc6 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,21 @@ ScriptResource::~ScriptResource()
{
}
+void ScriptResource::didAddClient(ResourceClient* c)
haraken 2014/08/17 16:05:28 Nit: c => client
marja 2014/08/20 11:45:56 Done.
+{
+ ASSERT(c->resourceClientType() == ScriptResourceClient::expectedType());
+ Resource::didAddClient(c);
+}
+
+void ScriptResource::appendData(const char* data, int length)
+{
+ Resource::appendData(data, length);
+ ResourceClientWalker<ScriptResourceClient> w(m_clients);
haraken 2014/08/17 16:05:28 Nit: w => walker
marja 2014/08/20 11:45:56 Done.
+ while (ScriptResourceClient* c = w.next()) {
haraken 2014/08/17 16:05:28 Nit: c => client
marja 2014/08/20 11:45:56 Done.
+ c->notifyAppendData(this);
+ }
+}
+
AtomicString ScriptResource::mimeType() const
{
return extractMIMETypeFromMediaType(m_response.httpHeaderField("Content-Type")).lower();

Powered by Google App Engine
This is Rietveld 408576698