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 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 , m_resource(script->resource()) | 580 , m_resource(script->resource()) |
581 , m_detached(false) | 581 , m_detached(false) |
582 , m_stream(0) | 582 , m_stream(0) |
583 , m_loadingFinished(false) | 583 , m_loadingFinished(false) |
584 , m_parsingFinished(false) | 584 , m_parsingFinished(false) |
585 , m_haveEnoughDataForStreaming(false) | 585 , m_haveEnoughDataForStreaming(false) |
586 , m_streamingSuppressed(false) | 586 , m_streamingSuppressed(false) |
587 , m_compileOptions(compileOptions) | 587 , m_compileOptions(compileOptions) |
588 , m_scriptState(scriptState) | 588 , m_scriptState(scriptState) |
589 , m_scriptType(scriptType) | 589 , m_scriptType(scriptType) |
| 590 , m_scriptURLString(m_resource->url().copy().getString()) |
| 591 , m_scriptResourceIdentifier(m_resource->identifier()) |
590 , 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. |
591 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) | 593 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) |
592 { | 594 { |
593 } | 595 } |
594 | 596 |
595 ScriptStreamer::~ScriptStreamer() | 597 ScriptStreamer::~ScriptStreamer() |
596 { | 598 { |
597 } | 599 } |
598 | 600 |
599 DEFINE_TRACE(ScriptStreamer) | 601 DEFINE_TRACE(ScriptStreamer) |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 | 678 |
677 // 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 |
678 // needed. This makes PendingScript notify the ScriptStreamer when it is | 680 // needed. This makes PendingScript notify the ScriptStreamer when it is |
679 // destroyed. | 681 // destroyed. |
680 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
compileOption, loadingTaskRunner)); | 682 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
compileOption, loadingTaskRunner)); |
681 | 683 |
682 return true; | 684 return true; |
683 } | 685 } |
684 | 686 |
685 } // namespace blink | 687 } // namespace blink |
OLD | NEW |