| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8PrivateProperty_h | 5 #ifndef V8PrivateProperty_h |
| 6 #define V8PrivateProperty_h | 6 #define V8PrivateProperty_h |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "bindings/core/v8/ScriptPromiseProperties.h" | 10 #include "bindings/core/v8/ScriptPromiseProperties.h" |
| 11 #include "bindings/core/v8/V8BindingMacros.h" | 11 #include "bindings/core/v8/V8BindingMacros.h" |
| 12 #include "bindings/core/v8/V8PerIsolateData.h" | 12 #include "bindings/core/v8/V8PerIsolateData.h" |
| 13 #include "core/CoreExport.h" | 13 #include "core/CoreExport.h" |
| 14 #include "platform/wtf/Allocator.h" | 14 #include "platform/wtf/Allocator.h" |
| 15 #include "platform/wtf/PtrUtil.h" | 15 #include "platform/wtf/PtrUtil.h" |
| 16 #include "v8/include/v8.h" | 16 #include "v8/include/v8.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 class ScriptWrappable; | 20 class ScriptWrappable; |
| 21 | 21 |
| 22 // TODO(peria): Remove properties just to keep V8 objects alive. | 22 // TODO(peria): Remove properties just to keep V8 objects alive. |
| 23 // e.g. InternalBody.Buffer, InternalBody.Stream, IDBCursor.Request, | 23 // e.g. InternalBody.Buffer, InternalBody.Stream, IDBCursor.Request, |
| 24 // FetchEvent.Request. | 24 // FetchEvent.Request. |
| 25 // Apply |X| for each pair of (InterfaceName, PrivateKeyName). | 25 // Apply |X| for each pair of (InterfaceName, PrivateKeyName). |
| 26 #define V8_PRIVATE_PROPERTY_FOR_EACH(X) \ | 26 #define V8_PRIVATE_PROPERTY_FOR_EACH(X) \ |
| 27 X(CustomElement, AdoptedCallback) \ | |
| 28 X(CustomElement, AttributeChangedCallback) \ | |
| 29 X(CustomElement, ConnectedCallback) \ | |
| 30 X(CustomElement, DisconnectedCallback) \ | |
| 31 X(CustomElement, Document) \ | 27 X(CustomElement, Document) \ |
| 32 X(CustomElement, IsInterfacePrototypeObject) \ | 28 X(CustomElement, IsInterfacePrototypeObject) \ |
| 33 X(CustomElement, NamespaceURI) \ | 29 X(CustomElement, NamespaceURI) \ |
| 34 X(CustomElement, RegistryMap) \ | |
| 35 X(CustomElement, TagName) \ | 30 X(CustomElement, TagName) \ |
| 36 X(CustomElement, Type) \ | 31 X(CustomElement, Type) \ |
| 32 X(CustomElement, ConstructorId) \ |
| 37 X(CustomElementLifecycle, AttachedCallback) \ | 33 X(CustomElementLifecycle, AttachedCallback) \ |
| 38 X(CustomElementLifecycle, AttributeChangedCallback) \ | 34 X(CustomElementLifecycle, AttributeChangedCallback) \ |
| 39 X(CustomElementLifecycle, CreatedCallback) \ | 35 X(CustomElementLifecycle, CreatedCallback) \ |
| 40 X(CustomElementLifecycle, DetachedCallback) \ | 36 X(CustomElementLifecycle, DetachedCallback) \ |
| 41 X(CustomEvent, Detail) \ | 37 X(CustomEvent, Detail) \ |
| 42 X(DOMException, Error) \ | 38 X(DOMException, Error) \ |
| 43 X(ErrorEvent, Error) \ | 39 X(ErrorEvent, Error) \ |
| 44 X(FetchEvent, Request) \ | 40 X(FetchEvent, Request) \ |
| 45 X(Global, Event) \ | 41 X(Global, Event) \ |
| 46 X(IDBCursor, Request) \ | 42 X(IDBCursor, Request) \ |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 // TODO(peria): Do not use this specialized hack for | 211 // TODO(peria): Do not use this specialized hack for |
| 216 // Window#DocumentCachedAccessor. This is required to put v8::Private key in | 212 // Window#DocumentCachedAccessor. This is required to put v8::Private key in |
| 217 // a snapshot, and it cannot be a v8::Eternal<> due to V8 serializer's | 213 // a snapshot, and it cannot be a v8::Eternal<> due to V8 serializer's |
| 218 // requirement. | 214 // requirement. |
| 219 ScopedPersistent<v8::Private> symbol_window_document_cached_accessor_; | 215 ScopedPersistent<v8::Private> symbol_window_document_cached_accessor_; |
| 220 }; | 216 }; |
| 221 | 217 |
| 222 } // namespace blink | 218 } // namespace blink |
| 223 | 219 |
| 224 #endif // V8PrivateProperty_h | 220 #endif // V8PrivateProperty_h |
| OLD | NEW |