OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 2012 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 21 matching lines...) Expand all Loading... | |
32 #define ActiveDOMCallback_h | 32 #define ActiveDOMCallback_h |
33 | 33 |
34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
35 #include "platform/heap/Handle.h" | 35 #include "platform/heap/Handle.h" |
36 | 36 |
37 namespace blink { | 37 namespace blink { |
38 | 38 |
39 class ExecutionContext; | 39 class ExecutionContext; |
40 | 40 |
41 // A base class that prevents binding callbacks from executing when | 41 // A base class that prevents binding callbacks from executing when |
42 // active dom objects are stopped or suspended, and is used by the | 42 // ContextLifecycleObservers are stopped or suspended, and is used by the |
43 // generated callback v8 bindings code to avoid erroneously CRASH()'ing | 43 // generated callback v8 bindings code to avoid erroneously CRASH()'ing |
44 // after script execution on a worker has been scheduled to terminate. | 44 // after script execution on a worker has been scheduled to terminate. |
45 // | 45 // |
46 // Should only be created, used, and destroyed on the script execution | 46 // Should only be created, used, and destroyed on the script execution |
47 // context thread. | 47 // context thread. |
48 class CORE_EXPORT ActiveDOMCallback : public GarbageCollectedMixin { | 48 class CORE_EXPORT ActiveDOMCallback : public GarbageCollectedMixin { |
haraken
2016/12/19 08:24:47
This class should be replaced with ContextObserver
| |
49 public: | 49 public: |
50 explicit ActiveDOMCallback(ExecutionContext*); | 50 explicit ActiveDOMCallback(ExecutionContext*); |
51 virtual ~ActiveDOMCallback(); | 51 virtual ~ActiveDOMCallback(); |
52 | 52 |
53 bool canInvokeCallback() const; | 53 bool canInvokeCallback() const; |
54 | 54 |
55 DECLARE_TRACE(); | 55 DECLARE_TRACE(); |
56 | 56 |
57 private: | 57 private: |
58 Member<ExecutionContext> m_context; | 58 Member<ExecutionContext> m_context; |
59 }; | 59 }; |
60 | 60 |
61 } // namespace blink | 61 } // namespace blink |
62 | 62 |
63 #endif // ActiveDOMCallback_h | 63 #endif // ActiveDOMCallback_h |
OLD | NEW |