Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(317)

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptRunner.h

Issue 1923993002: Revert of Remove unnecessary uses of GarbageCollectedFinalized<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 21 matching lines...) Expand all
32 #include "wtf/HashMap.h" 32 #include "wtf/HashMap.h"
33 #include "wtf/Noncopyable.h" 33 #include "wtf/Noncopyable.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class CancellableTaskFactory; 37 class CancellableTaskFactory;
38 class Document; 38 class Document;
39 class ScriptLoader; 39 class ScriptLoader;
40 class WebTaskRunner; 40 class WebTaskRunner;
41 41
42 class CORE_EXPORT ScriptRunner final : public GarbageCollected<ScriptRunner> { 42 class CORE_EXPORT ScriptRunner final : public GarbageCollectedFinalized<ScriptRu nner> {
43 WTF_MAKE_NONCOPYABLE(ScriptRunner); 43 WTF_MAKE_NONCOPYABLE(ScriptRunner);
44 public: 44 public:
45 static ScriptRunner* create(Document* document) 45 static ScriptRunner* create(Document* document)
46 { 46 {
47 return new ScriptRunner(document); 47 return new ScriptRunner(document);
48 } 48 }
49 ~ScriptRunner();
49 50
50 enum ExecutionType { ASYNC_EXECUTION, IN_ORDER_EXECUTION }; 51 enum ExecutionType { ASYNC_EXECUTION, IN_ORDER_EXECUTION };
51 void queueScriptForExecution(ScriptLoader*, ExecutionType); 52 void queueScriptForExecution(ScriptLoader*, ExecutionType);
52 bool hasPendingScripts() const { return !m_pendingInOrderScripts.isEmpty() | | !m_pendingAsyncScripts.isEmpty(); } 53 bool hasPendingScripts() const { return !m_pendingInOrderScripts.isEmpty() | | !m_pendingAsyncScripts.isEmpty(); }
53 void suspend(); 54 void suspend();
54 void resume(); 55 void resume();
55 void notifyScriptReady(ScriptLoader*, ExecutionType); 56 void notifyScriptReady(ScriptLoader*, ExecutionType);
56 void notifyScriptLoadError(ScriptLoader*, ExecutionType); 57 void notifyScriptLoadError(ScriptLoader*, ExecutionType);
57 58
58 static void movePendingScript(Document&, Document&, ScriptLoader*); 59 static void movePendingScript(Document&, Document&, ScriptLoader*);
(...skipping 30 matching lines...) Expand all
89 90
90 bool m_isSuspended; 91 bool m_isSuspended;
91 #ifndef NDEBUG 92 #ifndef NDEBUG
92 bool m_hasEverBeenSuspended; 93 bool m_hasEverBeenSuspended;
93 #endif 94 #endif
94 }; 95 };
95 96
96 } // namespace blink 97 } // namespace blink
97 98
98 #endif // ScriptRunner_h 99 #endif // ScriptRunner_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698