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

Side by Side Diff: Source/bindings/core/v8/ScriptStreamer.cpp

Issue 638813002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/bindings/core/v8/ScriptState.h ('k') | Source/bindings/core/v8/ScriptStreamerTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ScriptStreamer.h" 6 #include "bindings/core/v8/ScriptStreamer.h"
7 7
8 #include "bindings/core/v8/ScriptStreamerThread.h" 8 #include "bindings/core/v8/ScriptStreamerThread.h"
9 #include "bindings/core/v8/V8ScriptRunner.h" 9 #include "bindings/core/v8/V8ScriptRunner.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 SourceStream(ScriptStreamer* streamer) 90 SourceStream(ScriptStreamer* streamer)
91 : v8::ScriptCompiler::ExternalSourceStream() 91 : v8::ScriptCompiler::ExternalSourceStream()
92 , m_streamer(streamer) 92 , m_streamer(streamer)
93 , m_cancelled(false) 93 , m_cancelled(false)
94 , m_dataPosition(0) { } 94 , m_dataPosition(0) { }
95 95
96 virtual ~SourceStream() { } 96 virtual ~SourceStream() { }
97 97
98 // Called by V8 on a background thread. Should block until we can return 98 // Called by V8 on a background thread. Should block until we can return
99 // some data. 99 // some data.
100 virtual size_t GetMoreData(const uint8_t** src) OVERRIDE 100 virtual size_t GetMoreData(const uint8_t** src) override
101 { 101 {
102 ASSERT(!isMainThread()); 102 ASSERT(!isMainThread());
103 { 103 {
104 MutexLocker locker(m_mutex); 104 MutexLocker locker(m_mutex);
105 if (m_cancelled) 105 if (m_cancelled)
106 return 0; 106 return 0;
107 } 107 }
108 size_t length = 0; 108 size_t length = 0;
109 // This will wait until there is data. 109 // This will wait until there is data.
110 m_dataQueue.consume(src, &length); 110 m_dataQueue.consume(src, &length);
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 if (scriptStreamingTask) { 427 if (scriptStreamingTask) {
428 streamer->m_task = adoptPtr(scriptStreamingTask); 428 streamer->m_task = adoptPtr(scriptStreamingTask);
429 script.setStreamer(streamer.release()); 429 script.setStreamer(streamer.release());
430 return true; 430 return true;
431 } 431 }
432 // Otherwise, V8 cannot stream the script. 432 // Otherwise, V8 cannot stream the script.
433 return false; 433 return false;
434 } 434 }
435 435
436 } // namespace blink 436 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptState.h ('k') | Source/bindings/core/v8/ScriptStreamerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698