| 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 "bindings/core/v8/ScriptStreamer.h" | 5 #include "bindings/core/v8/ScriptStreamer.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptStreamerThread.h" | 7 #include "bindings/core/v8/ScriptStreamerThread.h" |
| 8 #include "bindings/core/v8/V8ScriptRunner.h" | 8 #include "bindings/core/v8/V8ScriptRunner.h" |
| 9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
| 10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 , m_resource(script->resource()) | 581 , m_resource(script->resource()) |
| 582 , m_detached(false) | 582 , m_detached(false) |
| 583 , m_stream(0) | 583 , m_stream(0) |
| 584 , m_loadingFinished(false) | 584 , m_loadingFinished(false) |
| 585 , m_parsingFinished(false) | 585 , m_parsingFinished(false) |
| 586 , m_haveEnoughDataForStreaming(false) | 586 , m_haveEnoughDataForStreaming(false) |
| 587 , m_streamingSuppressed(false) | 587 , m_streamingSuppressed(false) |
| 588 , m_compileOptions(compileOptions) | 588 , m_compileOptions(compileOptions) |
| 589 , m_scriptState(scriptState) | 589 , m_scriptState(scriptState) |
| 590 , m_scriptType(scriptType) | 590 , m_scriptType(scriptType) |
| 591 , m_scriptURL(m_resource->url().copy()) |
| 591 , 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. | 592 , 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. |
| 592 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) | 593 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) |
| 593 { | 594 { |
| 594 } | 595 } |
| 595 | 596 |
| 596 ScriptStreamer::~ScriptStreamer() | 597 ScriptStreamer::~ScriptStreamer() |
| 597 { | 598 { |
| 598 } | 599 } |
| 599 | 600 |
| 600 DEFINE_TRACE(ScriptStreamer) | 601 DEFINE_TRACE(ScriptStreamer) |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 678 |
| 678 // The Resource might go out of scope if the script is no longer | 679 // The Resource might go out of scope if the script is no longer |
| 679 // needed. This makes PendingScript notify the ScriptStreamer when it is | 680 // needed. This makes PendingScript notify the ScriptStreamer when it is |
| 680 // destroyed. | 681 // destroyed. |
| 681 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
compileOption, loadingTaskRunner)); | 682 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
compileOption, loadingTaskRunner)); |
| 682 | 683 |
| 683 return true; | 684 return true; |
| 684 } | 685 } |
| 685 | 686 |
| 686 } // namespace blink | 687 } // namespace blink |
| OLD | NEW |