Repository navigation
Commit b049880
[JSC] Fix wrong member access due to DECLARE_VISIT_CHILDREN macro
https://bugs.webkit.org/show_bug.cgi?id=296688
Reviewed by Yusuke Suzuki.
Using the DECLARE_VISIT_CHILDREN macro in private/protected sections can leak
subsequent members, as the macro ends with a public access specifier.
This change moves all uses of the macro into the public section of their
respective classes and selectively makes members used in existing
code public.
* Source/JavaScriptCore/runtime/JSBoundFunction.h:
Move DECLARE_VISIT_CHILDREN macro to the public section.
(JSC::JSBoundFunction::isTainted): New public getter for m_isTainted.
* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::Interpreter::executeCall): Use new isTainted() getter.
* Source/JavaScriptCore/runtime/IntlDateTimeFormat.h:
Move DECLARE_VISIT_CHILDREN macro to the public section.
* Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp:
(JSC::handleDateTimeValue): Made TU-local as it is only used by host
functions within this file.
(JSC::IntlDateTimeFormat::handleDateTimeValue): Deleted.
* Source/JavaScriptCore/runtime/IntlNumberFormat.h:
Move DECLARE_VISIT_CHILDREN macro to the public section.
Add missing friend declarations.
(JSC::IntlNumberFormat::trailingZeroDisplayString): Made public for
use in IntlPluralRules::resolvedOptions.
* Source/JavaScriptCore/runtime/IntlPluralRules.h:
Move DECLARE_VISIT_CHILDREN macro to the public section.
Add missing friend declaration.
* Source/JavaScriptCore/runtime/RegExpObject.h:
Move DECLARE_VISIT_CHILDREN macro to the public section.
(JSC::RegExpObject::lastIndexIsWritable): Make public for
use in regExpProtoFuncSearch.
* Source/JavaScriptCore/tools/JSDollarVM.cpp:
(JSC::JSDollarVM::WasmStreamingCompiler): Add missing private
access specifier.
* Source/JavaScriptCore/API/JSCallbackObject.h:
* Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h:
* Source/JavaScriptCore/runtime/AbstractModuleRecord.h:
* Source/JavaScriptCore/runtime/EvalExecutable.h:
* Source/JavaScriptCore/runtime/GenericArgumentsImpl.h:
* Source/JavaScriptCore/runtime/IntlCollator.h:
* Source/JavaScriptCore/runtime/IntlLocale.h:
* Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.h:
* Source/JavaScriptCore/runtime/JSArrayBufferView.h:
* Source/JavaScriptCore/runtime/JSAsyncDisposableStack.h:
* Source/JavaScriptCore/runtime/JSAsyncFromSyncIterator.h:
* Source/JavaScriptCore/runtime/JSCallee.h:
* Source/JavaScriptCore/runtime/JSDisposableStack.h:
* Source/JavaScriptCore/runtime/JSFunction.h:
* Source/JavaScriptCore/runtime/JSGenericTypedArrayView.h:
* Source/JavaScriptCore/runtime/JSGlobalProxy.h:
* Source/JavaScriptCore/runtime/JSInternalFieldObjectImpl.h:
* Source/JavaScriptCore/runtime/JSLexicalEnvironment.h:
* Source/JavaScriptCore/runtime/JSMapIterator.h:
* Source/JavaScriptCore/runtime/JSModuleEnvironment.h:
* Source/JavaScriptCore/runtime/JSModuleNamespaceObject.h:
* Source/JavaScriptCore/runtime/JSModuleRecord.h:
* Source/JavaScriptCore/runtime/JSNativeStdFunction.h:
* Source/JavaScriptCore/runtime/JSRegExpStringIterator.h:
* Source/JavaScriptCore/runtime/JSRemoteFunction.h:
* Source/JavaScriptCore/runtime/JSSetIterator.h:
* Source/JavaScriptCore/runtime/JSSymbolTableObject.h:
* Source/JavaScriptCore/runtime/JSWrapForValidIterator.h:
* Source/JavaScriptCore/runtime/JSWrapperObject.h:
* Source/JavaScriptCore/runtime/ModuleProgramExecutable.h:
* Source/JavaScriptCore/runtime/ProgramExecutable.h:
* Source/JavaScriptCore/runtime/ProxyObject.h:
* Source/JavaScriptCore/runtime/ShadowRealmObject.h:
* Source/JavaScriptCore/runtime/SyntheticModuleRecord.h:
* Source/JavaScriptCore/tools/JSDollarVM.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyGlobal.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyMemory.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyModule.h:
* Source/JavaScriptCore/wasm/js/JSWebAssemblyTable.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyFunctionBase.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyGCObjectBase.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.h:
* Source/JavaScriptCore/wasm/js/WebAssemblyWrapperFunction.h:
* Source/WebCore/bindings/js/JSDOMBuiltinConstructorBase.h:
* Source/WebCore/bindings/js/JSShadowRealmGlobalScopeBase.h:
* Source/WebCore/bindings/js/JSWorkerGlobalScopeBase.h:
* Source/WebCore/bindings/js/JSWorkletGlobalScopeBase.h:
Move DECLARE_VISIT_CHILDREN macro to the public section.
Canonical link: https://commits.webkit.org/298066@main1 parent 9e1954b commit b049880
57 files changed
Lines changed: 135 additions & 94 deletions
File tree
- Source
- JavaScriptCore
- API
- bytecode
- interpreter
- runtime
- tools
- wasm/js
- WebCore/bindings/js
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
221 | | - | |
222 | | - | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
524 | 523 | | |
525 | 524 | | |
526 | 525 | | |
527 | 526 | | |
| 527 | + | |
| 528 | + | |
528 | 529 | | |
529 | 530 | | |
530 | 531 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
1260 | | - | |
| 1260 | + | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
166 | | - | |
167 | | - | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
66 | 68 | | |
67 | 69 | | |
68 | 70 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
87 | | - | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
84 | | - | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
87 | | - | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
93 | | - | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
| 199 | + | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
82 | 84 | | |
83 | 85 | | |
84 | 86 | | |
85 | | - | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
| |||
0 commit comments