OLD | NEW |
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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 , m_compileOptions(compileOptions) | 406 , m_compileOptions(compileOptions) |
407 , m_scriptState(scriptState) | 407 , m_scriptState(scriptState) |
408 , m_encoding(v8::ScriptCompiler::StreamedSource::TWO_BYTE) // Unfortunately
there's no dummy encoding value in the enum; let's use one we don't stream. | 408 , m_encoding(v8::ScriptCompiler::StreamedSource::TWO_BYTE) // Unfortunately
there's no dummy encoding value in the enum; let's use one we don't stream. |
409 { | 409 { |
410 } | 410 } |
411 | 411 |
412 ScriptStreamer::~ScriptStreamer() | 412 ScriptStreamer::~ScriptStreamer() |
413 { | 413 { |
414 } | 414 } |
415 | 415 |
416 void ScriptStreamer::trace(Visitor* visitor) | 416 DEFINE_TRACE(ScriptStreamer) |
417 { | 417 { |
418 visitor->trace(m_resource); | 418 visitor->trace(m_resource); |
419 } | 419 } |
420 | 420 |
421 void ScriptStreamer::streamingComplete() | 421 void ScriptStreamer::streamingComplete() |
422 { | 422 { |
423 // The background task is completed; do the necessary ramp-down in the main | 423 // The background task is completed; do the necessary ramp-down in the main |
424 // thread. | 424 // thread. |
425 ASSERT(isMainThread()); | 425 ASSERT(isMainThread()); |
426 | 426 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 493 |
494 // The Resource might go out of scope if the script is no longer | 494 // The Resource might go out of scope if the script is no longer |
495 // needed. This makes PendingScript notify the ScriptStreamer when it is | 495 // needed. This makes PendingScript notify the ScriptStreamer when it is |
496 // destroyed. | 496 // destroyed. |
497 script.setStreamer(ScriptStreamer::create(resource, scriptState, compileOpti
on)); | 497 script.setStreamer(ScriptStreamer::create(resource, scriptState, compileOpti
on)); |
498 | 498 |
499 return true; | 499 return true; |
500 } | 500 } |
501 | 501 |
502 } // namespace blink | 502 } // namespace blink |
OLD | NEW |