Changeset 107394 in webkit
- Timestamp:
- Feb 10, 2012 3:46:28 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r107389 r107394 1 2012-02-10 Pablo Flouret <pablof@motorola.com> 2 3 CodeGeneratorJS doesn't always generate visitChildren() implementation when required 4 https://bugs.webkit.org/show_bug.cgi?id=78336 5 6 Reviewed by Kentaro Hara. 7 8 In an IDL for an interface that declares no functions, but has 9 attributes with [CachedAttribute], the implementation of visitChildren() 10 is not generated by the JSC code generator. 11 12 * bindings/scripts/CodeGeneratorJS.pm: 13 (GenerateImplementation): 14 * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 15 (WebCore::JSTestSerializedScriptValueInterface::visitChildren): 16 (WebCore): 17 1 18 2012-02-10 Noel Gordon <noel.gordon@gmail.com> 2 19 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r107371 r107394 2136 2136 push(@implContent, "#endif\n\n") if $conditional; 2137 2137 } 2138 2138 } 2139 2140 if ($numFunctions > 0 || $numCachedAttributes > 0) { 2139 2141 if ($needsMarkChildren && !$dataNode->extendedAttributes->{"JSCustomMarkFunction"}) { 2140 2142 push(@implContent, "void ${className}::visitChildren(JSCell* cell, SlotVisitor& visitor)\n"); … … 2159 2161 push(@implContent, "}\n\n"); 2160 2162 } 2161 # Cached attributes are indeed allowed when there is a custom mark/visitChildren function. 2162 # The custom function must make sure to account for the cached attribute. 2163 # Uncomment the below line to temporarily enforce generated mark functions when cached attributes are present. 2164 # die "Can't generate binding for class with cached attribute and custom mark." if (($numCachedAttributes > 0) and ($dataNode->extendedAttributes->{"JSCustomMarkFunction"})); 2165 } 2163 } 2164 2165 # Cached attributes are indeed allowed when there is a custom mark/visitChildren function. 2166 # The custom function must make sure to account for the cached attribute. 2167 # Uncomment the below line to temporarily enforce generated mark functions when cached attributes are present. 2168 # die "Can't generate binding for class with cached attribute and custom mark." if (($numCachedAttributes > 0) and ($dataNode->extendedAttributes->{"JSCustomMarkFunction"})); 2166 2169 2167 2170 if ($numConstants > 0) { -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
r107304 r107394 241 241 } 242 242 243 void JSTestSerializedScriptValueInterface::visitChildren(JSCell* cell, SlotVisitor& visitor) 244 { 245 JSTestSerializedScriptValueInterface* thisObject = jsCast<JSTestSerializedScriptValueInterface*>(cell); 246 ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info); 247 COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag); 248 ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren()); 249 Base::visitChildren(thisObject, visitor); 250 if (thisObject->m_cachedValue) 251 visitor.append(&thisObject->m_cachedValue); 252 if (thisObject->m_cachedReadonlyValue) 253 visitor.append(&thisObject->m_cachedReadonlyValue); 254 } 255 243 256 static inline bool isObservable(JSTestSerializedScriptValueInterface* jsTestSerializedScriptValueInterface) 244 257 {
Note: See TracChangeset
for help on using the changeset viewer.