1 | /* |
2 | This file is part of the WebKit open source project. |
3 | This file has been generated by generate-bindings.pl. DO NOT MODIFY! |
4 | |
5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. |
9 | |
10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. |
14 | |
15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 | Boston, MA 02110-1301, USA. |
19 | */ |
20 | |
21 | #include "config.h" |
22 | #include "JSCSSUnknownRule.h" |
23 | |
24 | #include "JSDOMBinding.h" |
25 | #include "JSDOMExceptionHandling.h" |
26 | #include "JSDOMWrapperCache.h" |
27 | #include "ScriptExecutionContext.h" |
28 | #include <JavaScriptCore/HeapSnapshotBuilder.h> |
29 | #include <JavaScriptCore/JSCInlines.h> |
30 | #include <wtf/GetPtr.h> |
31 | #include <wtf/PointerPreparations.h> |
32 | #include <wtf/URL.h> |
33 | |
34 | |
35 | namespace WebCore { |
36 | using namespace JSC; |
37 | |
38 | class JSCSSUnknownRulePrototype : public JSC::JSNonFinalObject { |
39 | public: |
40 | using Base = JSC::JSNonFinalObject; |
41 | static JSCSSUnknownRulePrototype* create(JSC::VM& vm, JSDOMGlobalObject* globalObject, JSC::Structure* structure) |
42 | { |
43 | JSCSSUnknownRulePrototype* ptr = new (NotNull, JSC::allocateCell<JSCSSUnknownRulePrototype>(vm.heap)) JSCSSUnknownRulePrototype(vm, globalObject, structure); |
44 | ptr->finishCreation(vm); |
45 | return ptr; |
46 | } |
47 | |
48 | DECLARE_INFO; |
49 | static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype) |
50 | { |
51 | return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info()); |
52 | } |
53 | |
54 | private: |
55 | JSCSSUnknownRulePrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure) |
56 | : JSC::JSNonFinalObject(vm, structure) |
57 | { |
58 | } |
59 | }; |
60 | |
61 | /* Hash table for prototype */ |
62 | const ClassInfo JSCSSUnknownRulePrototype::s_info = { "CSSUnknownRulePrototype" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCSSUnknownRulePrototype) }; |
63 | |
64 | const ClassInfo JSCSSUnknownRule::s_info = { "CSSUnknownRule" , &Base::s_info, nullptr, nullptr, CREATE_METHOD_TABLE(JSCSSUnknownRule) }; |
65 | |
66 | JSCSSUnknownRule::JSCSSUnknownRule(Structure* structure, JSDOMGlobalObject& globalObject, Ref<CSSUnknownRule>&& impl) |
67 | : JSCSSRule(structure, globalObject, WTFMove(impl)) |
68 | { |
69 | } |
70 | |
71 | void JSCSSUnknownRule::finishCreation(VM& vm) |
72 | { |
73 | Base::finishCreation(vm); |
74 | ASSERT(inherits(vm, info())); |
75 | |
76 | } |
77 | |
78 | JSObject* JSCSSUnknownRule::createPrototype(VM& vm, JSDOMGlobalObject& globalObject) |
79 | { |
80 | return JSCSSUnknownRulePrototype::create(vm, &globalObject, JSCSSUnknownRulePrototype::createStructure(vm, &globalObject, JSCSSRule::prototype(vm, globalObject))); |
81 | } |
82 | |
83 | JSObject* JSCSSUnknownRule::prototype(VM& vm, JSDOMGlobalObject& globalObject) |
84 | { |
85 | return getDOMPrototype<JSCSSUnknownRule>(vm, globalObject); |
86 | } |
87 | |
88 | void JSCSSUnknownRule::heapSnapshot(JSCell* cell, HeapSnapshotBuilder& builder) |
89 | { |
90 | auto* thisObject = jsCast<JSCSSUnknownRule*>(cell); |
91 | builder.setWrappedObjectForCell(cell, &thisObject->wrapped()); |
92 | if (thisObject->scriptExecutionContext()) |
93 | builder.setLabelForCell(cell, "url " + thisObject->scriptExecutionContext()->url().string()); |
94 | Base::heapSnapshot(cell, builder); |
95 | } |
96 | |
97 | |
98 | } |
99 | |