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 |
(...skipping 13 matching lines...) Expand all Loading... |
24 */ | 24 */ |
25 | 25 |
26 #ifndef PendingScript_h | 26 #ifndef PendingScript_h |
27 #define PendingScript_h | 27 #define PendingScript_h |
28 | 28 |
29 #include "bindings/core/v8/ScriptStreamer.h" | 29 #include "bindings/core/v8/ScriptStreamer.h" |
30 #include "core/CoreExport.h" | 30 #include "core/CoreExport.h" |
31 #include "core/fetch/ResourceOwner.h" | 31 #include "core/fetch/ResourceOwner.h" |
32 #include "core/fetch/ScriptResource.h" | 32 #include "core/fetch/ScriptResource.h" |
33 #include "platform/heap/Handle.h" | 33 #include "platform/heap/Handle.h" |
34 #include "wtf/PassRefPtr.h" | |
35 #include "wtf/RefPtr.h" | |
36 #include "wtf/text/TextPosition.h" | 34 #include "wtf/text/TextPosition.h" |
37 | 35 |
38 namespace blink { | 36 namespace blink { |
39 | 37 |
40 class Element; | 38 class Element; |
41 class ScriptSourceCode; | 39 class ScriptSourceCode; |
42 | 40 |
43 // A container for an external script which may be loaded and executed. | 41 // A container for an external script which may be loaded and executed. |
44 // | 42 // |
| 43 // TODO(kochi): The comment below is from pre-oilpan age and may not be correct
now. |
45 // A RefPtr alone does not prevent the underlying Resource | 44 // A RefPtr alone does not prevent the underlying Resource |
46 // from purging its data buffer. This class holds a dummy client open for its | 45 // from purging its data buffer. This class holds a dummy client open for its |
47 // lifetime in order to guarantee that the data buffer will not be purged. | 46 // lifetime in order to guarantee that the data buffer will not be purged. |
48 class CORE_EXPORT PendingScript final : public GarbageCollectedFinalized<Pending
Script>, public ResourceOwner<ScriptResource> { | 47 class CORE_EXPORT PendingScript final : public GarbageCollectedFinalized<Pending
Script>, public ResourceOwner<ScriptResource> { |
49 USING_GARBAGE_COLLECTED_MIXIN(PendingScript); | 48 USING_GARBAGE_COLLECTED_MIXIN(PendingScript); |
50 USING_PRE_FINALIZER(PendingScript, dispose); | 49 USING_PRE_FINALIZER(PendingScript, dispose); |
51 public: | 50 public: |
52 static RawPtr<PendingScript> create(Element*, ScriptResource*); | 51 static RawPtr<PendingScript> create(Element*, ScriptResource*); |
53 ~PendingScript() override; | 52 ~PendingScript() override; |
54 | 53 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 bool m_integrityFailure; | 95 bool m_integrityFailure; |
97 double m_parserBlockingLoadStartTime; | 96 double m_parserBlockingLoadStartTime; |
98 | 97 |
99 Member<ScriptStreamer> m_streamer; | 98 Member<ScriptStreamer> m_streamer; |
100 ScriptResourceClient* m_client; | 99 ScriptResourceClient* m_client; |
101 }; | 100 }; |
102 | 101 |
103 } // namespace blink | 102 } // namespace blink |
104 | 103 |
105 #endif // PendingScript_h | 104 #endif // PendingScript_h |
OLD | NEW |