Source/WebCore/ChangeLog

112012-01-10 Kentaro Hara <haraken@chromium.org>
22
 3 REGRESSION(r101445): [V8] Generated code for custom getters and setters
 4 with the [Supplemental] IDL is wrong
 5 https://bugs.webkit.org/show_bug.cgi?id=76034
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 This patch fixes the class name of the implementation of custom getters
 10 and setters, as follows.
 11
 12 Previous V8TestInterface.cpp:
 13 // Attribute 'supplementalStr3'
 14 {"supplementalStr3", V8TestSupplemental::supplementalStr3AccessorGetter, V8TestSupplemental::supplementalStr3AccessorSetter, ...},
 15
 16 New V8TestInterface.cpp:
 17 // Attribute 'supplementalStr3'
 18 {"supplementalStr3", V8TestInterface::supplementalStr3AccessorGetter, V8TestInterface::supplementalStr3AccessorSetter, ...},
 19
 20 Test: bindings/scripts/test/TestInterface.idl
 21 bindings/scripts/test/TestSupplemental.idl
 22
 23 * bindings/scripts/CodeGeneratorV8.pm:
 24 (GenerateSingleBatchedAttribute):
 25 * bindings/scripts/test/V8/V8TestInterface.cpp:
 26
 272012-01-10 Kentaro Hara <haraken@chromium.org>
 28
329 Use the [Supplemental] IDL in SQLDatabase
430 https://bugs.webkit.org/show_bug.cgi?id=76004
531

Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

@@sub GenerateSingleBatchedAttribute
19311931 "";
19321932 if ($customAccessor eq 1) {
19331933 # use the naming convension, interface + (capitalize) attr name
1934  if ($attribute->signature->extendedAttributes->{"ImplementedBy"}) {
1935  $customAccessor = $attribute->signature->extendedAttributes->{"ImplementedBy"} . "::" . $attrName;
1936  AddToImplIncludes("V8" . $attribute->signature->extendedAttributes->{"ImplementedBy"} . ".h");
1937  } else {
1938  $customAccessor = $interfaceName . "::" . $attrName;
1939  }
 1934 $customAccessor = $interfaceName . "::" . $attrName;
19401935 }
19411936
19421937 my $getter;

Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp

3333#include "V8IsolatedContext.h"
3434#include "V8Proxy.h"
3535#include "V8TestObj.h"
36 #include "V8TestSupplemental.h"
3736#include <wtf/GetPtr.h>
3837#include <wtf/RefCounted.h>
3938#include <wtf/RefPtr.h>

@@static const BatchedAttribute TestInterfaceAttrs[] = {
134133#endif // ENABLE(Condition11) || ENABLE(Condition12)
135134#if ENABLE(Condition11) || ENABLE(Condition12)
136135 // Attribute 'supplementalStr3' (Type: 'attribute' ExtAttr: 'CustomSetter CustomGetter Conditional ImplementedBy')
137  {"supplementalStr3", V8TestSupplemental::supplementalStr3AccessorGetter, V8TestSupplemental::supplementalStr3AccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 136 {"supplementalStr3", V8TestInterface::supplementalStr3AccessorGetter, V8TestInterface::supplementalStr3AccessorSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
138137#endif // ENABLE(Condition11) || ENABLE(Condition12)
139138};
140139