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

Side by Side Diff: Source/bindings/core/v8/V8ScriptRunnerTest.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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "bindings/core/v8/V8ScriptRunner.h" 6 #include "bindings/core/v8/V8ScriptRunner.h"
7 7
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "core/fetch/ScriptResource.h" 9 #include "core/fetch/ScriptResource.h"
10 #include "platform/heap/Handle.h" 10 #include "platform/heap/Handle.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 unsigned tagForCodeCache() const 59 unsigned tagForCodeCache() const
60 { 60 {
61 return tagForParserCache() + 1; 61 return tagForParserCache() + 1;
62 } 62 }
63 63
64 bool compileScript(V8CacheOptions cacheOptions) 64 bool compileScript(V8CacheOptions cacheOptions)
65 { 65 {
66 return !V8ScriptRunner::compileScript( 66 return !V8ScriptRunner::compileScript(
67 v8String(isolate(), code()), filename(), WTF::TextPosition(), 67 v8String(isolate(), code()), filename(), WTF::TextPosition(),
68 m_resource.get(), isolate(), NotSharableCrossOrigin, cacheOptions) 68 m_resource.get(), 0, isolate(), NotSharableCrossOrigin, cacheOptions )
69 .IsEmpty(); 69 .IsEmpty();
70 } 70 }
71 71
72 void setEmptyResource() 72 void setEmptyResource()
73 { 73 {
74 m_resourceRequest = WTF::adoptPtr(new ResourceRequest); 74 m_resourceRequest = WTF::adoptPtr(new ResourceRequest);
75 m_resource = adoptPtrWillBeNoop(new ScriptResource(*m_resourceRequest.ge t(), "text/utf-8")); 75 m_resource = adoptPtrWillBeNoop(new ScriptResource(*m_resourceRequest.ge t(), "text/utf-8"));
76 } 76 }
77 77
78 void setResource() 78 void setResource()
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 EXPECT_FALSE(m_resource->cachedMetadata(tagForParserCache())); 137 EXPECT_FALSE(m_resource->cachedMetadata(tagForParserCache()));
138 138
139 // FIXME: Code caching is presently still disabled. 139 // FIXME: Code caching is presently still disabled.
140 // Enable EXPECT when code caching lands. 140 // Enable EXPECT when code caching lands.
141 // EXPECT_TRUE(m_resource->cachedMetadata(tagForCodeCache())); 141 // EXPECT_TRUE(m_resource->cachedMetadata(tagForCodeCache()));
142 } 142 }
143 143
144 } // namespace 144 } // namespace
145 145
146 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8ScriptRunner.cpp ('k') | Source/bindings/core/v8/WorkerScriptController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698