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

Side by Side Diff: third_party/WebKit/Source/platform/bindings/V8PrivateProperty.h

Issue 2828643002: Make customElements.define faster
Patch Set: Remove some unneeded casts. Created 3 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 // 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 "platform/PlatformExport.h" 10 #include "platform/PlatformExport.h"
11 #include "platform/bindings/ScriptPromiseProperties.h" 11 #include "platform/bindings/ScriptPromiseProperties.h"
12 #include "platform/bindings/V8BindingMacros.h" 12 #include "platform/bindings/V8BindingMacros.h"
13 #include "platform/bindings/V8PerIsolateData.h" 13 #include "platform/bindings/V8PerIsolateData.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) \
37 X(CustomElementLifecycle, AttachedCallback) \ 32 X(CustomElementLifecycle, AttachedCallback) \
38 X(CustomElementLifecycle, AttributeChangedCallback) \ 33 X(CustomElementLifecycle, AttributeChangedCallback) \
39 X(CustomElementLifecycle, CreatedCallback) \ 34 X(CustomElementLifecycle, CreatedCallback) \
40 X(CustomElementLifecycle, DetachedCallback) \ 35 X(CustomElementLifecycle, DetachedCallback) \
41 X(CustomEvent, Detail) \ 36 X(CustomEvent, Detail) \
42 X(DOMException, Error) \ 37 X(DOMException, Error) \
43 X(ErrorEvent, Error) \ 38 X(ErrorEvent, Error) \
44 X(FetchEvent, Request) \ 39 X(FetchEvent, Request) \
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 // TODO(peria): Do not use this specialized hack for 209 // TODO(peria): Do not use this specialized hack for
215 // Window#DocumentCachedAccessor. This is required to put v8::Private key in 210 // Window#DocumentCachedAccessor. This is required to put v8::Private key in
216 // a snapshot, and it cannot be a v8::Eternal<> due to V8 serializer's 211 // a snapshot, and it cannot be a v8::Eternal<> due to V8 serializer's
217 // requirement. 212 // requirement.
218 ScopedPersistent<v8::Private> symbol_window_document_cached_accessor_; 213 ScopedPersistent<v8::Private> symbol_window_document_cached_accessor_;
219 }; 214 };
220 215
221 } // namespace blink 216 } // namespace blink
222 217
223 #endif // V8PrivateProperty_h 218 #endif // V8PrivateProperty_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698