OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 // Provides access to the underlying handle for GC. Returned | 98 // Provides access to the underlying handle for GC. Returned |
99 // value is a weak handle and so not guaranteed to stay alive. | 99 // value is a weak handle and so not guaranteed to stay alive. |
100 v8::Persistent<v8::Object>& existingListenerObjectPersistentHandle() { | 100 v8::Persistent<v8::Object>& existingListenerObjectPersistentHandle() { |
101 return m_listener.get(); | 101 return m_listener.get(); |
102 } | 102 } |
103 | 103 |
104 bool hasExistingListenerObject() { return !m_listener.isEmpty(); } | 104 bool hasExistingListenerObject() { return !m_listener.isEmpty(); } |
105 | 105 |
106 void clearListenerObject(); | 106 void clearListenerObject(); |
107 | 107 |
108 bool belongsToTheCurrentWorld() const final; | 108 bool belongsToTheCurrentWorld(ExecutionContext*) const final; |
109 v8::Isolate* isolate() const { return m_isolate; } | 109 v8::Isolate* isolate() const { return m_isolate; } |
110 DOMWrapperWorld& world() const { return *m_world; } | 110 DOMWrapperWorld& world() const { return *m_world; } |
111 | 111 |
112 DECLARE_VIRTUAL_TRACE(); | 112 DECLARE_VIRTUAL_TRACE(); |
113 DECLARE_VIRTUAL_TRACE_WRAPPERS(); | 113 DECLARE_VIRTUAL_TRACE_WRAPPERS(); |
114 | 114 |
115 protected: | 115 protected: |
116 V8AbstractEventListener(bool isAttribute, DOMWrapperWorld&, v8::Isolate*); | 116 V8AbstractEventListener(bool isAttribute, DOMWrapperWorld&, v8::Isolate*); |
117 | 117 |
118 virtual v8::Local<v8::Object> getListenerObjectInternal( | 118 virtual v8::Local<v8::Object> getListenerObjectInternal( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // nullptr unless this listener belongs to a worker. | 152 // nullptr unless this listener belongs to a worker. |
153 Member<WorkerGlobalScope> m_workerGlobalScope; | 153 Member<WorkerGlobalScope> m_workerGlobalScope; |
154 | 154 |
155 SelfKeepAlive<V8AbstractEventListener> m_keepAlive; | 155 SelfKeepAlive<V8AbstractEventListener> m_keepAlive; |
156 }; | 156 }; |
157 | 157 |
158 } // namespace blink | 158 } // namespace blink |
159 | 159 |
160 #endif // V8AbstractEventListener_h | 160 #endif // V8AbstractEventListener_h |
OLD | NEW |