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

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

Issue 2443543002: createElement should not transmit exceptions but report them. (Closed)
Patch Set: Rebaseline tests. Created 4 years, 1 month 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 28 matching lines...) Expand all
39 const v8::Local<v8::Function>& adoptedCallback, 39 const v8::Local<v8::Function>& adoptedCallback,
40 const v8::Local<v8::Function>& attributeChangedCallback, 40 const v8::Local<v8::Function>& attributeChangedCallback,
41 const HashSet<AtomicString>& observedAttributes); 41 const HashSet<AtomicString>& observedAttributes);
42 42
43 virtual ~ScriptCustomElementDefinition() = default; 43 virtual ~ScriptCustomElementDefinition() = default;
44 44
45 v8::Local<v8::Object> constructor() const; 45 v8::Local<v8::Object> constructor() const;
46 v8::Local<v8::Object> prototype() const; 46 v8::Local<v8::Object> prototype() const;
47 47
48 HTMLElement* createElementSync(Document&, const QualifiedName&) override; 48 HTMLElement* createElementSync(Document&, const QualifiedName&) override;
49 HTMLElement* createElementSync(Document&,
50 const QualifiedName&,
51 ExceptionState&) override;
52 49
53 bool hasConnectedCallback() const override; 50 bool hasConnectedCallback() const override;
54 bool hasDisconnectedCallback() const override; 51 bool hasDisconnectedCallback() const override;
55 bool hasAdoptedCallback() const override; 52 bool hasAdoptedCallback() const override;
56 53
57 void runConnectedCallback(Element*) override; 54 void runConnectedCallback(Element*) override;
58 void runDisconnectedCallback(Element*) override; 55 void runDisconnectedCallback(Element*) override;
59 void runAdoptedCallback(Element*, 56 void runAdoptedCallback(Element*,
60 Document* oldOwner, 57 Document* oldOwner,
61 Document* newOwner) override; 58 Document* newOwner) override;
(...skipping 17 matching lines...) Expand all
79 // Implementations of |CustomElementDefinition| 76 // Implementations of |CustomElementDefinition|
80 ScriptValue getConstructorForScript() final; 77 ScriptValue getConstructorForScript() final;
81 bool runConstructor(Element*) override; 78 bool runConstructor(Element*) override;
82 Element* runConstructor(); 79 Element* runConstructor();
83 80
84 void runCallback(v8::Local<v8::Function>, 81 void runCallback(v8::Local<v8::Function>,
85 Element*, 82 Element*,
86 int argc = 0, 83 int argc = 0,
87 v8::Local<v8::Value> argv[] = nullptr); 84 v8::Local<v8::Value> argv[] = nullptr);
88 85
86 HTMLElement* handleCreateElementSyncException(Document&,
87 const QualifiedName& tagName,
88 v8::Isolate*,
89 ExceptionState&);
90
89 RefPtr<ScriptState> m_scriptState; 91 RefPtr<ScriptState> m_scriptState;
90 ScopedPersistent<v8::Object> m_constructor; 92 ScopedPersistent<v8::Object> m_constructor;
91 ScopedPersistent<v8::Object> m_prototype; 93 ScopedPersistent<v8::Object> m_prototype;
92 ScopedPersistent<v8::Function> m_connectedCallback; 94 ScopedPersistent<v8::Function> m_connectedCallback;
93 ScopedPersistent<v8::Function> m_disconnectedCallback; 95 ScopedPersistent<v8::Function> m_disconnectedCallback;
94 ScopedPersistent<v8::Function> m_adoptedCallback; 96 ScopedPersistent<v8::Function> m_adoptedCallback;
95 ScopedPersistent<v8::Function> m_attributeChangedCallback; 97 ScopedPersistent<v8::Function> m_attributeChangedCallback;
96 }; 98 };
97 99
98 } // namespace blink 100 } // namespace blink
99 101
100 #endif // ScriptCustomElementDefinition_h 102 #endif // ScriptCustomElementDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698