| 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 24 matching lines...) Expand all Loading... |
| 35 #include "wtf/Noncopyable.h" | 35 #include "wtf/Noncopyable.h" |
| 36 #include "wtf/text/TextPosition.h" | 36 #include "wtf/text/TextPosition.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 class Element; | 40 class Element; |
| 41 class ScriptSourceCode; | 41 class ScriptSourceCode; |
| 42 | 42 |
| 43 // A container for an external script which may be loaded and executed. | 43 // A container for an external script which may be loaded and executed. |
| 44 // | 44 // |
| 45 // TODO(kochi): The comment below is from pre-oilpan age and may not be correct
now. | 45 // TODO(kochi): The comment below is from pre-oilpan age and may not be correct |
| 46 // A RefPtr alone does not prevent the underlying Resource | 46 // now. |
| 47 // from purging its data buffer. This class holds a dummy client open for its | 47 // A RefPtr alone does not prevent the underlying Resource from purging its data |
| 48 // lifetime in order to guarantee that the data buffer will not be purged. | 48 // buffer. This class holds a dummy client open for its lifetime in order to |
| 49 // guarantee that the data buffer will not be purged. |
| 49 class CORE_EXPORT PendingScript final | 50 class CORE_EXPORT PendingScript final |
| 50 : public GarbageCollectedFinalized<PendingScript>, | 51 : public GarbageCollectedFinalized<PendingScript>, |
| 51 public ResourceOwner<ScriptResource>, | 52 public ResourceOwner<ScriptResource>, |
| 52 public MemoryCoordinatorClient { | 53 public MemoryCoordinatorClient { |
| 53 USING_GARBAGE_COLLECTED_MIXIN(PendingScript); | 54 USING_GARBAGE_COLLECTED_MIXIN(PendingScript); |
| 54 USING_PRE_FINALIZER(PendingScript, dispose); | 55 USING_PRE_FINALIZER(PendingScript, dispose); |
| 55 WTF_MAKE_NONCOPYABLE(PendingScript); | 56 WTF_MAKE_NONCOPYABLE(PendingScript); |
| 56 | 57 |
| 57 public: | 58 public: |
| 58 static PendingScript* create(Element*, ScriptResource*); | 59 static PendingScript* create(Element*, ScriptResource*); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 bool m_integrityFailure; | 109 bool m_integrityFailure; |
| 109 double m_parserBlockingLoadStartTime; | 110 double m_parserBlockingLoadStartTime; |
| 110 | 111 |
| 111 Member<ScriptStreamer> m_streamer; | 112 Member<ScriptStreamer> m_streamer; |
| 112 Member<ScriptResourceClient> m_client; | 113 Member<ScriptResourceClient> m_client; |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace blink | 116 } // namespace blink |
| 116 | 117 |
| 117 #endif // PendingScript_h | 118 #endif // PendingScript_h |
| OLD | NEW |