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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptCustomElementDefinition.h

Issue 2589383002: Do not push the custom element construction stack in some cases. (Closed)
Patch Set: Remove redundant scope and rebase. Created 3 years, 12 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 ScriptCustomElementDefinition_h 5 #ifndef ScriptCustomElementDefinition_h
6 #define ScriptCustomElementDefinition_h 6 #define ScriptCustomElementDefinition_h
7 7
8 #include "bindings/core/v8/ScopedPersistent.h" 8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "bindings/core/v8/ScriptState.h" 9 #include "bindings/core/v8/ScriptState.h"
10 #include "core/CoreExport.h" 10 #include "core/CoreExport.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 const v8::Local<v8::Object>& constructor, 66 const v8::Local<v8::Object>& constructor,
67 const v8::Local<v8::Function>& connectedCallback, 67 const v8::Local<v8::Function>& connectedCallback,
68 const v8::Local<v8::Function>& disconnectedCallback, 68 const v8::Local<v8::Function>& disconnectedCallback,
69 const v8::Local<v8::Function>& adoptedCallback, 69 const v8::Local<v8::Function>& adoptedCallback,
70 const v8::Local<v8::Function>& attributeChangedCallback, 70 const v8::Local<v8::Function>& attributeChangedCallback,
71 const HashSet<AtomicString>& observedAttributes); 71 const HashSet<AtomicString>& observedAttributes);
72 72
73 // Implementations of |CustomElementDefinition| 73 // Implementations of |CustomElementDefinition|
74 ScriptValue getConstructorForScript() final; 74 ScriptValue getConstructorForScript() final;
75 bool runConstructor(Element*) override; 75 bool runConstructor(Element*) override;
76 Element* runConstructor(); 76
77 // Calls the constructor. The script scope, etc. must already be set up.
78 Element* callConstructor();
77 79
78 void runCallback(v8::Local<v8::Function>, 80 void runCallback(v8::Local<v8::Function>,
79 Element*, 81 Element*,
80 int argc = 0, 82 int argc = 0,
81 v8::Local<v8::Value> argv[] = nullptr); 83 v8::Local<v8::Value> argv[] = nullptr);
82 84
83 HTMLElement* handleCreateElementSyncException(Document&, 85 HTMLElement* handleCreateElementSyncException(Document&,
84 const QualifiedName& tagName, 86 const QualifiedName& tagName,
85 v8::Isolate*, 87 v8::Isolate*,
86 ExceptionState&); 88 ExceptionState&);
87 89
88 RefPtr<ScriptState> m_scriptState; 90 RefPtr<ScriptState> m_scriptState;
89 ScopedPersistent<v8::Object> m_constructor; 91 ScopedPersistent<v8::Object> m_constructor;
90 ScopedPersistent<v8::Function> m_connectedCallback; 92 ScopedPersistent<v8::Function> m_connectedCallback;
91 ScopedPersistent<v8::Function> m_disconnectedCallback; 93 ScopedPersistent<v8::Function> m_disconnectedCallback;
92 ScopedPersistent<v8::Function> m_adoptedCallback; 94 ScopedPersistent<v8::Function> m_adoptedCallback;
93 ScopedPersistent<v8::Function> m_attributeChangedCallback; 95 ScopedPersistent<v8::Function> m_attributeChangedCallback;
94 }; 96 };
95 97
96 } // namespace blink 98 } // namespace blink
97 99
98 #endif // ScriptCustomElementDefinition_h 100 #endif // ScriptCustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698