OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. | 2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
12 * | 12 * |
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY | 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR | 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #include "core/html/parser/HTMLParserScriptRunner.h" | 26 #include "core/html/parser/HTMLParserScriptRunner.h" |
27 | 27 |
| 28 #include <inttypes.h> |
| 29 #include <memory> |
28 #include "bindings/core/v8/Microtask.h" | 30 #include "bindings/core/v8/Microtask.h" |
29 #include "bindings/core/v8/ScriptSourceCode.h" | 31 #include "bindings/core/v8/ScriptSourceCode.h" |
30 #include "bindings/core/v8/V8PerIsolateData.h" | 32 #include "bindings/core/v8/V8PerIsolateData.h" |
31 #include "core/dom/DocumentParserTiming.h" | 33 #include "core/dom/DocumentParserTiming.h" |
32 #include "core/dom/Element.h" | 34 #include "core/dom/Element.h" |
33 #include "core/dom/IgnoreDestructiveWriteCountIncrementer.h" | 35 #include "core/dom/IgnoreDestructiveWriteCountIncrementer.h" |
34 #include "core/dom/ScriptLoader.h" | 36 #include "core/dom/ScriptLoader.h" |
35 #include "core/dom/TaskRunnerHelper.h" | 37 #include "core/dom/TaskRunnerHelper.h" |
36 #include "core/events/Event.h" | 38 #include "core/events/Event.h" |
37 #include "core/frame/LocalFrame.h" | 39 #include "core/frame/LocalFrame.h" |
38 #include "core/html/parser/HTMLInputStream.h" | 40 #include "core/html/parser/HTMLInputStream.h" |
39 #include "core/html/parser/HTMLParserScriptRunnerHost.h" | 41 #include "core/html/parser/HTMLParserScriptRunnerHost.h" |
40 #include "core/html/parser/NestingLevelIncrementer.h" | 42 #include "core/html/parser/NestingLevelIncrementer.h" |
41 #include "core/inspector/ConsoleMessage.h" | 43 #include "core/inspector/ConsoleMessage.h" |
42 #include "core/loader/resource/ScriptResource.h" | 44 #include "core/loader/resource/ScriptResource.h" |
43 #include "platform/Histogram.h" | 45 #include "platform/Histogram.h" |
44 #include "platform/WebFrameScheduler.h" | 46 #include "platform/WebFrameScheduler.h" |
45 #include "platform/instrumentation/tracing/TraceEvent.h" | 47 #include "platform/instrumentation/tracing/TraceEvent.h" |
46 #include "platform/instrumentation/tracing/TracedValue.h" | 48 #include "platform/instrumentation/tracing/TracedValue.h" |
47 #include "platform/loader/fetch/MemoryCache.h" | 49 #include "platform/loader/fetch/MemoryCache.h" |
48 #include "public/platform/Platform.h" | 50 #include "public/platform/Platform.h" |
49 #include <inttypes.h> | |
50 #include <memory> | |
51 | 51 |
52 namespace blink { | 52 namespace blink { |
53 | 53 |
54 namespace { | 54 namespace { |
55 | 55 |
56 // TODO(bmcquade): move this to a shared location if we find ourselves wanting | 56 // TODO(bmcquade): move this to a shared location if we find ourselves wanting |
57 // to trace similar data elsewhere in the codebase. | 57 // to trace similar data elsewhere in the codebase. |
58 std::unique_ptr<TracedValue> getTraceArgsForScriptElement( | 58 std::unique_ptr<TracedValue> getTraceArgsForScriptElement( |
59 Element* element, | 59 Element* element, |
60 const TextPosition& textPosition) { | 60 const TextPosition& textPosition) { |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 572 |
573 DEFINE_TRACE(HTMLParserScriptRunner) { | 573 DEFINE_TRACE(HTMLParserScriptRunner) { |
574 visitor->trace(m_document); | 574 visitor->trace(m_document); |
575 visitor->trace(m_host); | 575 visitor->trace(m_host); |
576 visitor->trace(m_parserBlockingScript); | 576 visitor->trace(m_parserBlockingScript); |
577 visitor->trace(m_scriptsToExecuteAfterParsing); | 577 visitor->trace(m_scriptsToExecuteAfterParsing); |
578 PendingScriptClient::trace(visitor); | 578 PendingScriptClient::trace(visitor); |
579 } | 579 } |
580 | 580 |
581 } // namespace blink | 581 } // namespace blink |
OLD | NEW |