Source/WebCore/ChangeLog

 12013-03-14 Marja Hölttä <marja@chromium.org>
 2
 3 [V8] Add machinery for generating specialized bindings for the main world
 4 https://bugs.webkit.org/show_bug.cgi?id=111417
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 The new specialized bindings will be faster, because they don't need to
 9 do the "main world, isolated world or a worker" check, but can right
 10 away assume that we're in the main world.
 11
 12 This patch generates main world bindings for getters and setters.
 13
 14 No new tests (updated existing bindings tests).
 15
 16 * bindings/scripts/CodeGeneratorV8.pm:
 17 (GenerateHeader):
 18 (GenerateNormalAttrGetterCallback):
 19 (GenerateNormalAttrGetter):
 20 (GenerateNormalAttrSetterCallback):
 21 (GenerateNormalAttrSetter):
 22 (GenerateNamedConstructor):
 23 (GenerateBatchedAttributeData):
 24 (GenerateSingleBatchedAttribute):
 25 (GenerateImplementation):
 26 (GenerateCallbackImplementation):
 27 (GenerateFunctionCallString):
 28 (CreateCustomSignature):
 29 (NativeToJSValue):
 30 * bindings/scripts/test/V8/V8Float64Array.cpp:
 31 (WebCore::ConfigureV8Float64ArrayTemplate):
 32 (WebCore::V8Float64Array::GetTemplate):
 33 (WebCore::V8Float64Array::HasInstance):
 34 * bindings/scripts/test/V8/V8Float64Array.h:
 35 (WebCore::toV8FastForMainWorld):
 36 (WebCore):
 37 * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
 38 (WebCore::TestActiveDOMObjectV8Internal::excitingAttrAttrGetterForMainWorld):
 39 (TestActiveDOMObjectV8Internal):
 40 (WebCore::TestActiveDOMObjectV8Internal::excitingAttrAttrGetterCallbackForMainWorld):
 41 (WebCore):
 42 (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
 43 (WebCore::V8TestActiveDOMObject::GetTemplate):
 44 (WebCore::V8TestActiveDOMObject::HasInstance):
 45 * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
 46 (WebCore::toV8FastForMainWorld):
 47 (WebCore):
 48 * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
 49 (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
 50 (WebCore::V8TestCustomNamedGetter::GetTemplate):
 51 (WebCore::V8TestCustomNamedGetter::HasInstance):
 52 * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
 53 (WebCore::toV8FastForMainWorld):
 54 (WebCore):
 55 * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
 56 (WebCore::TestEventConstructorV8Internal::attr1AttrGetterForMainWorld):
 57 (TestEventConstructorV8Internal):
 58 (WebCore::TestEventConstructorV8Internal::attr1AttrGetterCallbackForMainWorld):
 59 (WebCore::TestEventConstructorV8Internal::attr2AttrGetterForMainWorld):
 60 (WebCore::TestEventConstructorV8Internal::attr2AttrGetterCallbackForMainWorld):
 61 (WebCore):
 62 (WebCore::ConfigureV8TestEventConstructorTemplate):
 63 (WebCore::V8TestEventConstructor::GetTemplate):
 64 (WebCore::V8TestEventConstructor::HasInstance):
 65 * bindings/scripts/test/V8/V8TestEventConstructor.h:
 66 (WebCore::toV8FastForMainWorld):
 67 (WebCore):
 68 * bindings/scripts/test/V8/V8TestEventTarget.cpp:
 69 (WebCore::ConfigureV8TestEventTargetTemplate):
 70 (WebCore::V8TestEventTarget::GetTemplate):
 71 (WebCore::V8TestEventTarget::HasInstance):
 72 * bindings/scripts/test/V8/V8TestEventTarget.h:
 73 (WebCore::toV8FastForMainWorld):
 74 (WebCore):
 75 * bindings/scripts/test/V8/V8TestException.cpp:
 76 (WebCore::TestExceptionV8Internal::nameAttrGetterForMainWorld):
 77 (TestExceptionV8Internal):
 78 (WebCore::TestExceptionV8Internal::nameAttrGetterCallbackForMainWorld):
 79 (WebCore):
 80 (WebCore::ConfigureV8TestExceptionTemplate):
 81 (WebCore::V8TestException::GetTemplate):
 82 (WebCore::V8TestException::HasInstance):
 83 * bindings/scripts/test/V8/V8TestException.h:
 84 (WebCore::toV8FastForMainWorld):
 85 (WebCore):
 86 * bindings/scripts/test/V8/V8TestInterface.cpp:
 87 (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterForMainWorld):
 88 (TestInterfaceV8Internal):
 89 (WebCore::TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterCallbackForMainWorld):
 90 (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetterForMainWorld):
 91 (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrGetterCallbackForMainWorld):
 92 (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetterForMainWorld):
 93 (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetterCallbackForMainWorld):
 94 (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetterForMainWorld):
 95 (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetterCallbackForMainWorld):
 96 (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetterForMainWorld):
 97 (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetterCallbackForMainWorld):
 98 (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetterForMainWorld):
 99 (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetterCallbackForMainWorld):
 100 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetterCallbackForMainWorld):
 101 (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetterCallbackForMainWorld):
 102 (WebCore::TestInterfaceV8Internal::supplementalNodeAttrGetterForMainWorld):
 103 (WebCore::TestInterfaceV8Internal::supplementalNodeAttrGetterCallbackForMainWorld):
 104 (WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetterForMainWorld):
 105 (WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetterCallbackForMainWorld):
 106 (WebCore):
 107 (WebCore::ConfigureV8TestInterfaceTemplate):
 108 (WebCore::V8TestInterface::GetTemplate):
 109 (WebCore::V8TestInterface::HasInstance):
 110 * bindings/scripts/test/V8/V8TestInterface.h:
 111 (WebCore::toV8FastForMainWorld):
 112 (WebCore):
 113 * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
 114 (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
 115 (WebCore::V8TestMediaQueryListListener::GetTemplate):
 116 (WebCore::V8TestMediaQueryListListener::HasInstance):
 117 * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
 118 (WebCore::toV8FastForMainWorld):
 119 (WebCore):
 120 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
 121 (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
 122 (WebCore::ConfigureV8TestNamedConstructorTemplate):
 123 (WebCore::V8TestNamedConstructor::GetTemplate):
 124 (WebCore::V8TestNamedConstructor::HasInstance):
 125 * bindings/scripts/test/V8/V8TestNamedConstructor.h:
 126 (WebCore::toV8FastForMainWorld):
 127 (WebCore):
 128 * bindings/scripts/test/V8/V8TestNode.cpp:
 129 (WebCore::ConfigureV8TestNodeTemplate):
 130 (WebCore::V8TestNode::GetTemplate):
 131 (WebCore::V8TestNode::HasInstance):
 132 * bindings/scripts/test/V8/V8TestNode.h:
 133 (WebCore::toV8FastForMainWorld):
 134 (WebCore):
 135 * bindings/scripts/test/V8/V8TestObj.cpp:
 136 (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetterForMainWorld):
 137 (TestObjV8Internal):
 138 (WebCore::TestObjV8Internal::readOnlyLongAttrAttrGetterCallbackForMainWorld):
 139 (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetterForMainWorld):
 140 (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetterCallbackForMainWorld):
 141 (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetterForMainWorld):
 142 (WebCore::TestObjV8Internal::readOnlyTestObjAttrAttrGetterCallbackForMainWorld):
 143 (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetterForMainWorld):
 144 (WebCore::TestObjV8Internal::staticReadOnlyLongAttrAttrGetterCallbackForMainWorld):
 145 (WebCore::TestObjV8Internal::staticStringAttrAttrGetterForMainWorld):
 146 (WebCore::TestObjV8Internal::staticStringAttrAttrGetterCallbackForMainWorld):
 147 (WebCore::TestObjV8Internal::staticStringAttrAttrSetterForMainWorld):
 148 (WebCore::TestObjV8Internal::staticStringAttrAttrSetterCallbackForMainWorld):
 149 (WebCore::TestObjV8Internal::enumAttrAttrGetterForMainWorld):
 150 (WebCore::TestObjV8Internal::enumAttrAttrGetterCallbackForMainWorld):
 151 (WebCore::TestObjV8Internal::enumAttrAttrSetterForMainWorld):
 152 (WebCore::TestObjV8Internal::enumAttrAttrSetterCallbackForMainWorld):
 153 (WebCore::TestObjV8Internal::shortAttrAttrGetterForMainWorld):
 154 (WebCore::TestObjV8Internal::shortAttrAttrGetterCallbackForMainWorld):
 155 (WebCore::TestObjV8Internal::shortAttrAttrSetterForMainWorld):
 156 (WebCore::TestObjV8Internal::shortAttrAttrSetterCallbackForMainWorld):
 157 (WebCore::TestObjV8Internal::unsignedShortAttrAttrGetterForMainWorld):
 158 (WebCore::TestObjV8Internal::unsignedShortAttrAttrGetterCallbackForMainWorld):
 159 (WebCore::TestObjV8Internal::unsignedShortAttrAttrSetterForMainWorld):
 160 (WebCore::TestObjV8Internal::unsignedShortAttrAttrSetterCallbackForMainWorld):
 161 (WebCore::TestObjV8Internal::longAttrAttrGetterForMainWorld):
 162 (WebCore::TestObjV8Internal::longAttrAttrGetterCallbackForMainWorld):
 163 (WebCore::TestObjV8Internal::longAttrAttrSetterForMainWorld):
 164 (WebCore::TestObjV8Internal::longAttrAttrSetterCallbackForMainWorld):
 165 (WebCore::TestObjV8Internal::longLongAttrAttrGetterForMainWorld):
 166 (WebCore::TestObjV8Internal::longLongAttrAttrGetterCallbackForMainWorld):
 167 (WebCore::TestObjV8Internal::longLongAttrAttrSetterForMainWorld):
 168 (WebCore::TestObjV8Internal::longLongAttrAttrSetterCallbackForMainWorld):
 169 (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrGetterForMainWorld):
 170 (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrGetterCallbackForMainWorld):
 171 (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetterForMainWorld):
 172 (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetterCallbackForMainWorld):
 173 (WebCore::TestObjV8Internal::stringAttrAttrGetterForMainWorld):
 174 (WebCore::TestObjV8Internal::stringAttrAttrGetterCallbackForMainWorld):
 175 (WebCore::TestObjV8Internal::stringAttrAttrSetterForMainWorld):
 176 (WebCore::TestObjV8Internal::stringAttrAttrSetterCallbackForMainWorld):
 177 (WebCore::TestObjV8Internal::testObjAttrAttrGetterForMainWorld):
 178 (WebCore::TestObjV8Internal::testObjAttrAttrGetterCallbackForMainWorld):
 179 (WebCore::TestObjV8Internal::testObjAttrAttrSetterForMainWorld):
 180 (WebCore::TestObjV8Internal::testObjAttrAttrSetterCallbackForMainWorld):
 181 (WebCore::TestObjV8Internal::XMLObjAttrAttrGetterForMainWorld):
 182 (WebCore::TestObjV8Internal::XMLObjAttrAttrGetterCallbackForMainWorld):
 183 (WebCore::TestObjV8Internal::XMLObjAttrAttrSetterForMainWorld):
 184 (WebCore::TestObjV8Internal::XMLObjAttrAttrSetterCallbackForMainWorld):
 185 (WebCore::TestObjV8Internal::createAttrGetterForMainWorld):
 186 (WebCore::TestObjV8Internal::createAttrGetterCallbackForMainWorld):
 187 (WebCore::TestObjV8Internal::createAttrSetterForMainWorld):
 188 (WebCore::TestObjV8Internal::createAttrSetterCallbackForMainWorld):
 189 (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetterForMainWorld):
 190 (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetterCallbackForMainWorld):
 191 (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetterForMainWorld):
 192 (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetterCallbackForMainWorld):
 193 (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrGetterForMainWorld):
 194 (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrGetterCallbackForMainWorld):
 195 (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrSetter):
 196 (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrSetterForMainWorld):
 197 (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrSetterCallbackForMainWorld):
 198 (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetterForMainWorld):
 199 (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetterCallbackForMainWorld):
 200 (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetterForMainWorld):
 201 (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetterCallbackForMainWorld):
 202 (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrGetterForMainWorld):
 203 (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrGetterCallbackForMainWorld):
 204 (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrSetterForMainWorld):
 205 (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrSetterCallbackForMainWorld):
 206 (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetterForMainWorld):
 207 (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetterCallbackForMainWorld):
 208 (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetterForMainWorld):
 209 (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetterCallbackForMainWorld):
 210 (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrGetterForMainWorld):
 211 (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrGetterCallbackForMainWorld):
 212 (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrSetterForMainWorld):
 213 (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrSetterCallbackForMainWorld):
 214 (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrGetterForMainWorld):
 215 (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrGetterCallbackForMainWorld):
 216 (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrSetterForMainWorld):
 217 (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrSetterCallbackForMainWorld):
 218 (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetterForMainWorld):
 219 (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetterCallbackForMainWorld):
 220 (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetterForMainWorld):
 221 (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetterCallbackForMainWorld):
 222 (WebCore::TestObjV8Internal::typedArrayAttrAttrGetterForMainWorld):
 223 (WebCore::TestObjV8Internal::typedArrayAttrAttrGetterCallbackForMainWorld):
 224 (WebCore::TestObjV8Internal::typedArrayAttrAttrSetterForMainWorld):
 225 (WebCore::TestObjV8Internal::typedArrayAttrAttrSetterCallbackForMainWorld):
 226 (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetterForMainWorld):
 227 (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrGetterCallbackForMainWorld):
 228 (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrSetterForMainWorld):
 229 (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrSetterCallbackForMainWorld):
 230 (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrGetterForMainWorld):
 231 (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrGetterCallbackForMainWorld):
 232 (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrSetterForMainWorld):
 233 (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrSetterCallbackForMainWorld):
 234 (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetterForMainWorld):
 235 (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetterCallbackForMainWorld):
 236 (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetterForMainWorld):
 237 (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetterCallbackForMainWorld):
 238 (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetterForMainWorld):
 239 (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetterCallbackForMainWorld):
 240 (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetterForMainWorld):
 241 (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetterCallbackForMainWorld):
 242 (WebCore::TestObjV8Internal::customAttrAttrGetterCallbackForMainWorld):
 243 (WebCore::TestObjV8Internal::customAttrAttrSetterCallbackForMainWorld):
 244 (WebCore::TestObjV8Internal::withScriptStateAttributeAttrGetterForMainWorld):
 245 (WebCore::TestObjV8Internal::withScriptStateAttributeAttrGetterCallbackForMainWorld):
 246 (WebCore::TestObjV8Internal::withScriptStateAttributeAttrSetterForMainWorld):
 247 (WebCore::TestObjV8Internal::withScriptStateAttributeAttrSetterCallbackForMainWorld):
 248 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetterForMainWorld):
 249 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetterCallbackForMainWorld):
 250 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetterForMainWorld):
 251 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetterCallbackForMainWorld):
 252 (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetterForMainWorld):
 253 (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetterCallbackForMainWorld):
 254 (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetterForMainWorld):
 255 (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetterCallbackForMainWorld):
 256 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetterForMainWorld):
 257 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetterCallbackForMainWorld):
 258 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetterForMainWorld):
 259 (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetterCallbackForMainWorld):
 260 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetterForMainWorld):
 261 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetterCallbackForMainWorld):
 262 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetterForMainWorld):
 263 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetterCallbackForMainWorld):
 264 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterForMainWorld):
 265 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCallbackForMainWorld):
 266 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterForMainWorld):
 267 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCallbackForMainWorld):
 268 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterForMainWorld):
 269 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterCallbackForMainWorld):
 270 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterForMainWorld):
 271 (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterCallbackForMainWorld):
 272 (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetterForMainWorld):
 273 (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetterCallbackForMainWorld):
 274 (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetterForMainWorld):
 275 (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetterCallbackForMainWorld):
 276 (WebCore::TestObjV8Internal::conditionalAttr1AttrGetterForMainWorld):
 277 (WebCore::TestObjV8Internal::conditionalAttr1AttrGetterCallbackForMainWorld):
 278 (WebCore::TestObjV8Internal::conditionalAttr1AttrSetterForMainWorld):
 279 (WebCore::TestObjV8Internal::conditionalAttr1AttrSetterCallbackForMainWorld):
 280 (WebCore::TestObjV8Internal::conditionalAttr2AttrGetterForMainWorld):
 281 (WebCore::TestObjV8Internal::conditionalAttr2AttrGetterCallbackForMainWorld):
 282 (WebCore::TestObjV8Internal::conditionalAttr2AttrSetterForMainWorld):
 283 (WebCore::TestObjV8Internal::conditionalAttr2AttrSetterCallbackForMainWorld):
 284 (WebCore::TestObjV8Internal::conditionalAttr3AttrGetterForMainWorld):
 285 (WebCore::TestObjV8Internal::conditionalAttr3AttrGetterCallbackForMainWorld):
 286 (WebCore::TestObjV8Internal::conditionalAttr3AttrSetterForMainWorld):
 287 (WebCore::TestObjV8Internal::conditionalAttr3AttrSetterCallbackForMainWorld):
 288 (WebCore::TestObjV8Internal::cachedAttribute1AttrGetterForMainWorld):
 289 (WebCore::TestObjV8Internal::cachedAttribute1AttrGetterCallbackForMainWorld):
 290 (WebCore::TestObjV8Internal::cachedAttribute2AttrGetterForMainWorld):
 291 (WebCore::TestObjV8Internal::cachedAttribute2AttrGetterCallbackForMainWorld):
 292 (WebCore::TestObjV8Internal::anyAttributeAttrGetterForMainWorld):
 293 (WebCore::TestObjV8Internal::anyAttributeAttrGetterCallbackForMainWorld):
 294 (WebCore::TestObjV8Internal::anyAttributeAttrSetterForMainWorld):
 295 (WebCore::TestObjV8Internal::anyAttributeAttrSetterCallbackForMainWorld):
 296 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrGetterForMainWorld):
 297 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrGetterCallbackForMainWorld):
 298 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterForMainWorld):
 299 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterCallbackForMainWorld):
 300 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterForMainWorld):
 301 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterCallbackForMainWorld):
 302 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterForMainWorld):
 303 (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallbackForMainWorld):
 304 (WebCore::TestObjV8Internal::floatArrayAttrGetterForMainWorld):
 305 (WebCore::TestObjV8Internal::floatArrayAttrGetterCallbackForMainWorld):
 306 (WebCore::TestObjV8Internal::floatArrayAttrSetterForMainWorld):
 307 (WebCore::TestObjV8Internal::floatArrayAttrSetterCallbackForMainWorld):
 308 (WebCore::TestObjV8Internal::doubleArrayAttrGetterForMainWorld):
 309 (WebCore::TestObjV8Internal::doubleArrayAttrGetterCallbackForMainWorld):
 310 (WebCore::TestObjV8Internal::doubleArrayAttrSetterForMainWorld):
 311 (WebCore::TestObjV8Internal::doubleArrayAttrSetterCallbackForMainWorld):
 312 (WebCore::TestObjV8Internal::contentDocumentAttrGetterForMainWorld):
 313 (WebCore::TestObjV8Internal::contentDocumentAttrGetterCallbackForMainWorld):
 314 (WebCore::TestObjV8Internal::mutablePointAttrGetterForMainWorld):
 315 (WebCore::TestObjV8Internal::mutablePointAttrGetterCallbackForMainWorld):
 316 (WebCore::TestObjV8Internal::mutablePointAttrSetterForMainWorld):
 317 (WebCore::TestObjV8Internal::mutablePointAttrSetterCallbackForMainWorld):
 318 (WebCore::TestObjV8Internal::immutablePointAttrGetterForMainWorld):
 319 (WebCore::TestObjV8Internal::immutablePointAttrGetterCallbackForMainWorld):
 320 (WebCore::TestObjV8Internal::immutablePointAttrSetterForMainWorld):
 321 (WebCore::TestObjV8Internal::immutablePointAttrSetterCallbackForMainWorld):
 322 (WebCore::TestObjV8Internal::strawberryAttrGetterForMainWorld):
 323 (WebCore::TestObjV8Internal::strawberryAttrGetterCallbackForMainWorld):
 324 (WebCore::TestObjV8Internal::strawberryAttrSetterForMainWorld):
 325 (WebCore::TestObjV8Internal::strawberryAttrSetterCallbackForMainWorld):
 326 (WebCore::TestObjV8Internal::strictFloatAttrGetterForMainWorld):
 327 (WebCore::TestObjV8Internal::strictFloatAttrGetterCallbackForMainWorld):
 328 (WebCore::TestObjV8Internal::strictFloatAttrSetterForMainWorld):
 329 (WebCore::TestObjV8Internal::strictFloatAttrSetterCallbackForMainWorld):
 330 (WebCore::TestObjV8Internal::descriptionAttrGetterForMainWorld):
 331 (WebCore::TestObjV8Internal::descriptionAttrGetterCallbackForMainWorld):
 332 (WebCore::TestObjV8Internal::idAttrGetterForMainWorld):
 333 (WebCore::TestObjV8Internal::idAttrGetterCallbackForMainWorld):
 334 (WebCore::TestObjV8Internal::idAttrSetterForMainWorld):
 335 (WebCore::TestObjV8Internal::idAttrSetterCallbackForMainWorld):
 336 (WebCore::TestObjV8Internal::hashAttrGetterForMainWorld):
 337 (WebCore::TestObjV8Internal::hashAttrGetterCallbackForMainWorld):
 338 (WebCore::TestObjV8Internal::replaceableAttributeAttrGetterForMainWorld):
 339 (WebCore::TestObjV8Internal::replaceableAttributeAttrGetterCallbackForMainWorld):
 340 (WebCore):
 341 (WebCore::ConfigureV8TestObjTemplate):
 342 (WebCore::V8TestObj::GetTemplate):
 343 (WebCore::V8TestObj::HasInstance):
 344 * bindings/scripts/test/V8/V8TestObj.h:
 345 (WebCore::toV8FastForMainWorld):
 346 (WebCore):
 347 * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
 348 (WebCore::ConfigureV8TestOverloadedConstructorsTemplate):
 349 (WebCore::V8TestOverloadedConstructors::GetTemplate):
 350 (WebCore::V8TestOverloadedConstructors::HasInstance):
 351 * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
 352 (WebCore::toV8FastForMainWorld):
 353 (WebCore):
 354 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
 355 (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetterForMainWorld):
 356 (TestSerializedScriptValueInterfaceV8Internal):
 357 (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrGetterCallbackForMainWorld):
 358 (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrSetterForMainWorld):
 359 (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrSetterCallbackForMainWorld):
 360 (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetterForMainWorld):
 361 (WebCore::TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetterCallbackForMainWorld):
 362 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetterForMainWorld):
 363 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetterCallbackForMainWorld):
 364 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetterForMainWorld):
 365 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetterCallbackForMainWorld):
 366 (WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetterForMainWorld):
 367 (WebCore::TestSerializedScriptValueInterfaceV8Internal::portsAttrGetterCallbackForMainWorld):
 368 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetterForMainWorld):
 369 (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetterCallbackForMainWorld):
 370 (WebCore):
 371 (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
 372 (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
 373 (WebCore::V8TestSerializedScriptValueInterface::HasInstance):
 374 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
 375 (WebCore::toV8FastForMainWorld):
 376 (WebCore):
 377 * bindings/scripts/test/V8/V8TestTypedefs.cpp:
 378 (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetterForMainWorld):
 379 (TestTypedefsV8Internal):
 380 (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetterCallbackForMainWorld):
 381 (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetterForMainWorld):
 382 (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetterCallbackForMainWorld):
 383 (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetterForMainWorld):
 384 (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetterCallbackForMainWorld):
 385 (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetterForMainWorld):
 386 (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetterCallbackForMainWorld):
 387 (WebCore::TestTypedefsV8Internal::attrWithGetterExceptionAttrGetterForMainWorld):
 388 (WebCore::TestTypedefsV8Internal::attrWithGetterExceptionAttrGetterCallbackForMainWorld):
 389 (WebCore::TestTypedefsV8Internal::attrWithGetterExceptionAttrSetterForMainWorld):
 390 (WebCore::TestTypedefsV8Internal::attrWithGetterExceptionAttrSetterCallbackForMainWorld):
 391 (WebCore::TestTypedefsV8Internal::attrWithSetterExceptionAttrGetterForMainWorld):
 392 (WebCore::TestTypedefsV8Internal::attrWithSetterExceptionAttrGetterCallbackForMainWorld):
 393 (WebCore::TestTypedefsV8Internal::attrWithSetterExceptionAttrSetterForMainWorld):
 394 (WebCore::TestTypedefsV8Internal::attrWithSetterExceptionAttrSetterCallbackForMainWorld):
 395 (WebCore::TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrGetterForMainWorld):
 396 (WebCore::TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrGetterCallbackForMainWorld):
 397 (WebCore::TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetterForMainWorld):
 398 (WebCore::TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetterCallbackForMainWorld):
 399 (WebCore::TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetterForMainWorld):
 400 (WebCore::TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetterCallbackForMainWorld):
 401 (WebCore::TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetterForMainWorld):
 402 (WebCore::TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetterCallbackForMainWorld):
 403 (WebCore):
 404 (WebCore::ConfigureV8TestTypedefsTemplate):
 405 (WebCore::V8TestTypedefs::GetTemplate):
 406 (WebCore::V8TestTypedefs::HasInstance):
 407 * bindings/scripts/test/V8/V8TestTypedefs.h:
 408 (WebCore::toV8FastForMainWorld):
 409 (WebCore):
 410 * bindings/v8/DOMDataStore.h:
 411 (WebCore::DOMDataStore::getWrapperForMainWorld):
 412 (DOMDataStore):
 413 * bindings/v8/V8DOMConfiguration.cpp:
 414 (WebCore::V8DOMConfiguration::addToTemplate):
 415 (WebCore):
 416 * bindings/v8/V8DOMConfiguration.h:
 417 (V8DOMConfiguration):
 418
14192013-03-14 Allan Sandfeld Jensen <allan.jensen@digia.com>
2420
3421 [TexMap] Painting into area of composited tile not cleared

Source/WebCore/bindings/scripts/CodeGeneratorV8.pm

@@inline v8::Handle<v8::Value> toV8Fast(${nativeType}* impl, const HolderContainer
530530{
531531 return toV8(impl, container.Holder(), container.GetIsolate());
532532}
 533
 534template<class HolderContainer, class Wrappable>
 535inline v8::Handle<v8::Value> toV8FastForMainWorld(${nativeType}* impl, const HolderContainer& container, Wrappable*)
 536{
 537 return toV8(impl, container.Holder(), container.GetIsolate());
 538}
533539END
534540 } else {
535541

@@inline v8::Handle<v8::Value> toV8Fast(${nativeType}* impl, const HolderContainer
577583 return $returningWrapper;
578584 return wrap(impl, container.Holder(), container.GetIsolate());
579585}
 586
 587template<class HolderContainer, class Wrappable>
 588inline v8::Handle<v8::Value> toV8FastForMainWorld(${nativeType}* impl, const HolderContainer& container, Wrappable* wrappable)
 589{
 590 if (UNLIKELY(!impl))
 591 return v8Null(container.GetIsolate());
 592 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 593 if (!wrapper.IsEmpty())
 594 return $returningWrapper;
 595 return wrap(impl, container.Holder(), container.GetIsolate());
 596}
 597
 598template<class HolderContainer, class Wrappable>
 599inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< ${nativeType} > impl, const HolderContainer& container, Wrappable* wrappable)
 600{
 601 return toV8FastForMainWorld(impl.get(), container, wrappable);
 602}
 603
580604END
581605 }
582606

@@sub GenerateNormalAttrGetterCallback
880904{
881905 my $attribute = shift;
882906 my $interface = shift;
 907 my $forMainWorldSuffix = shift;
883908
884909 my $interfaceName = $interface->name;
885910 my $v8InterfaceName = "V8$interfaceName";

@@sub GenerateNormalAttrGetterCallback
889914 my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
890915 push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
891916
892  push(@implContentInternals, "static v8::Handle<v8::Value> ${attrName}AttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info)\n");
 917 push(@implContentInternals, "static v8::Handle<v8::Value> ${attrName}AttrGetterCallback${forMainWorldSuffix}(v8::Local<v8::String> name, const v8::AccessorInfo& info)\n");
893918 push(@implContentInternals, "{\n");
894919 push(@implContentInternals, GenerateFeatureObservation($attrExt->{"V8MeasureAs"}));
895920 if (HasCustomGetter($attrExt)) {
896921 push(@implContentInternals, " return ${v8InterfaceName}::${attrName}AttrGetterCustom(name, info);\n");
897922 } else {
898  push(@implContentInternals, " return ${interfaceName}V8Internal::${attrName}AttrGetter(name, info);\n");
 923 push(@implContentInternals, " return ${interfaceName}V8Internal::${attrName}AttrGetter${forMainWorldSuffix}(name, info);\n");
899924 }
900925 push(@implContentInternals, "}\n\n");
901926 push(@implContentInternals, "#endif // ${conditionalString}\n\n") if $conditionalString;

@@sub GenerateNormalAttrGetter
905930{
906931 my $attribute = shift;
907932 my $interface = shift;
 933 my $forMainWorldSuffix = shift;
908934
909935 my $interfaceName = $interface->name;
910936 my $v8InterfaceName = "V8$interfaceName";

@@sub GenerateNormalAttrGetter
924950 my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
925951 push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
926952 push(@implContentInternals, <<END);
927 static v8::Handle<v8::Value> ${attrName}AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 953static v8::Handle<v8::Value> ${attrName}AttrGetter${forMainWorldSuffix}(v8::Local<v8::String> name, const v8::AccessorInfo& info)
928954{
929955END
930956 if ($svgNativeType) {

@@END
10901116 AddToImplIncludes("V8$attrType.h");
10911117 my $svgNativeType = $codeGenerator->GetSVGTypeNeedingTearOff($attrType);
10921118 # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
1093  push(@implContentInternals, " return toV8Fast(static_cast<$svgNativeType*>($result), info, imp);\n");
 1119 push(@implContentInternals, " return toV8Fast$forMainWorldSuffix(static_cast<$svgNativeType*>($result), info, imp);\n");
10941120 } elsif ($codeGenerator->IsSVGTypeNeedingTearOff($attrType) and not $interfaceName =~ /List$/) {
10951121 AddToImplIncludes("V8$attrType.h");
10961122 AddToImplIncludes("SVGPropertyTearOff.h");

@@END
11281154 } else {
11291155 $wrappedValue = "WTF::getPtr(${tearOffType}::create($result))";
11301156 }
1131  push(@implContentInternals, " return toV8Fast($wrappedValue, info, imp);\n");
 1157 push(@implContentInternals, " return toV8Fast$forMainWorldSuffix($wrappedValue, info, imp);\n");
11321158 } elsif ($attribute->signature->type eq "MessagePortArray") {
11331159 AddToImplIncludes("MessagePort.h");
11341160 AddToImplIncludes("V8MessagePort.h");

@@END
11401166 MessagePortArray portsCopy(*ports);
11411167 v8::Local<v8::Array> portArray = v8::Array::New(portsCopy.size());
11421168 for (size_t i = 0; i < portsCopy.size(); ++i)
1143  portArray->Set(v8Integer(i, info.GetIsolate()), toV8Fast(portsCopy[i].get(), info, imp));
 1169 portArray->Set(v8Integer(i, info.GetIsolate()), toV8Fast$forMainWorldSuffix(portsCopy[i].get(), info, imp));
11441170 return portArray;
11451171END
11461172 } elsif ($attribute->signature->type eq "SerializedScriptValue" && $attrExt->{"CachedAttribute"}) {

@@END
11521178 return value;
11531179END
11541180 } else {
1155  push(@implContentInternals, " return " . NativeToJSValue($attribute->signature, $result, "info.Holder()", "info.GetIsolate()", "info", "imp", "ReturnUnsafeHandle").";\n");
 1181 push(@implContentInternals, " return " . NativeToJSValue($attribute->signature, $result, "info.Holder()", "info.GetIsolate()", "info", "imp", "ReturnUnsafeHandle", $forMainWorldSuffix).";\n");
11561182 }
11571183
11581184 push(@implContentInternals, "}\n\n"); # end of getter

@@sub GenerateNormalAttrSetterCallback
12001226{
12011227 my $attribute = shift;
12021228 my $interface = shift;
 1229 my $forMainWorldSuffix = shift;
12031230
12041231 my $interfaceName = $interface->name;
12051232 my $v8InterfaceName = "V8$interfaceName";

@@sub GenerateNormalAttrSetterCallback
12091236 my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
12101237 push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
12111238
1212  push(@implContentInternals, "static void ${attrName}AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n");
 1239 push(@implContentInternals, "static void ${attrName}AttrSetterCallback${forMainWorldSuffix}(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n");
12131240 push(@implContentInternals, "{\n");
12141241 push(@implContentInternals, GenerateFeatureObservation($attrExt->{"V8MeasureAs"}));
12151242 if (HasCustomSetter($attrExt)) {
12161243 push(@implContentInternals, " ${v8InterfaceName}::${attrName}AttrSetterCustom(name, value, info);\n");
12171244 } else {
1218  push(@implContentInternals, " ${interfaceName}V8Internal::${attrName}AttrSetter(name, value, info);\n");
 1245 push(@implContentInternals, " ${interfaceName}V8Internal::${attrName}AttrSetter${forMainWorldSuffix}(name, value, info);\n");
12191246 }
12201247 push(@implContentInternals, "}\n\n");
12211248 push(@implContentInternals, "#endif // ${conditionalString}\n\n") if $conditionalString;

@@sub GenerateNormalAttrSetter
12251252{
12261253 my $attribute = shift;
12271254 my $interface = shift;
 1255 my $forMainWorldSuffix = shift;
12281256
12291257 my $interfaceName = $interface->name;
12301258 my $v8InterfaceName = "V8$interfaceName";

@@sub GenerateNormalAttrSetter
12381266
12391267 my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
12401268 push(@implContentInternals, "#if ${conditionalString}\n\n") if $conditionalString;
1241  push(@implContentInternals, "static void ${attrName}AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n");
 1269 push(@implContentInternals, "static void ${attrName}AttrSetter${forMainWorldSuffix}(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n");
12421270 push(@implContentInternals, "{\n");
12431271
12441272 # If the "StrictTypeChecking" extended attribute is present, and the attribute's type is an

@@END
22482276
22492277 push(@implContent, <<END);
22502278
2251 v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}Constructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 2279v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}Constructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
22522280{
22532281 static v8::Persistent<v8::FunctionTemplate> cachedTemplate;
22542282 if (!cachedTemplate.IsEmpty())

@@v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}Constructor::GetTemplate(
22602288 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
22612289 instance->SetInternalFieldCount(${v8InterfaceName}::internalFieldCount);
22622290 result->SetClassName(v8::String::NewSymbol("${interfaceName}"));
2263  result->Inherit(${v8InterfaceName}::GetTemplate(isolate, worldType));
 2291 result->Inherit(${v8InterfaceName}::GetTemplate(isolate, currentWorldType));
22642292
22652293 cachedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, result);
22662294 return cachedTemplate;

@@sub GenerateBatchedAttributeData
22862314{
22872315 my $interface = shift;
22882316 my $attributes = shift;
 2317 my $forMainWorldSuffix = shift;
22892318 my $interfaceName = $interface->name;
22902319
22912320 foreach my $attribute (@$attributes) {
22922321 my $conditionalString = $codeGenerator->GenerateConditionalString($attribute->signature);
22932322 push(@implContent, "#if ${conditionalString}\n") if $conditionalString;
2294  GenerateSingleBatchedAttribute($interfaceName, $attribute, ",", "");
 2323 GenerateSingleBatchedAttribute($interfaceName, $attribute, ",", "", $forMainWorldSuffix);
22952324 push(@implContent, "#endif // ${conditionalString}\n") if $conditionalString;
22962325 }
22972326}

@@sub GenerateSingleBatchedAttribute
23022331 my $attribute = shift;
23032332 my $delimiter = shift;
23042333 my $indent = shift;
 2334 my $forMainWorldSuffix = shift;
23052335 my $attrName = $attribute->signature->name;
23062336 my $attrExt = $attribute->signature->extendedAttributes;
23072337

@@sub GenerateSingleBatchedAttribute
23572387 $setter = "${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetterCallback";
23582388 } else {
23592389 # Default Getter and Setter
2360  $getter = "${interfaceName}V8Internal::${attrName}AttrGetterCallback";
2361  $setter = "${interfaceName}V8Internal::${attrName}AttrSetterCallback";
 2390 $getter = "${interfaceName}V8Internal::${attrName}AttrGetterCallback${forMainWorldSuffix}";
 2391 $setter = "${interfaceName}V8Internal::${attrName}AttrSetterCallback${forMainWorldSuffix}";
23622392
23632393 if (!HasCustomSetter($attrExt) && $attrExt->{"Replaceable"}) {
23642394 $setter = "${interfaceName}V8Internal::${interfaceName}ReplaceableAttrSetterCallback";

@@sub GenerateImplementation
26842714 my $parent = $_;
26852715 AddToImplIncludes("V8${parent}.h");
26862716 $parentClass = "V8" . $parent;
2687  $parentClassTemplate = $parentClass . "::GetTemplate(isolate, worldType)";
 2717 $parentClassTemplate = $parentClass . "::GetTemplate(isolate, currentWorldType)";
26882718 last;
26892719 }
26902720

@@END
27632793 AddToImplIncludes("SerializedScriptValue.h");
27642794 }
27652795
2766  GenerateNormalAttrGetter($attribute, $interface);
2767  GenerateNormalAttrGetterCallback($attribute, $interface);
 2796 GenerateNormalAttrGetter($attribute, $interface, "");
 2797 GenerateNormalAttrGetterCallback($attribute, $interface, "");
 2798
 2799 if (!$attrExt->{"V8EnabledPerContext"}) {
 2800 GenerateNormalAttrGetter($attribute, $interface, "ForMainWorld");
 2801 GenerateNormalAttrGetterCallback($attribute, $interface, "ForMainWorld");
 2802 }
27682803
27692804 if (!HasCustomSetter($attrExt) && $attrExt->{"Replaceable"}) {
27702805 $hasReplaceable = 1;
27712806 } elsif (!IsReadonly($attribute)) {
2772  GenerateNormalAttrSetter($attribute, $interface);
2773  GenerateNormalAttrSetterCallback($attribute, $interface);
 2807 GenerateNormalAttrSetter($attribute, $interface, "");
 2808 GenerateNormalAttrSetterCallback($attribute, $interface, "");
 2809 if (!$attrExt->{"V8EnabledPerContext"}) {
 2810 GenerateNormalAttrSetter($attribute, $interface, "ForMainWorld");
 2811 GenerateNormalAttrSetterCallback($attribute, $interface, "ForMainWorld");
 2812 }
27742813 }
27752814 }
27762815

@@END
28812920 # Put the attributes that disallow shadowing on the shadow object.
28822921 if (@disallowsShadowing) {
28832922 push(@implContent, "static const V8DOMConfiguration::BatchedAttribute shadowAttrs[] = {\n");
2884  GenerateBatchedAttributeData($interface, \@disallowsShadowing);
 2923 GenerateBatchedAttributeData($interface, \@disallowsShadowing, "");
 2924 push(@implContent, "};\n\n");
 2925
 2926 push(@implContent, "static const V8DOMConfiguration::BatchedAttribute shadowAttrsForMainWorld[] = {\n");
 2927 GenerateBatchedAttributeData($interface, \@disallowsShadowing, "ForMainWorld");
28852928 push(@implContent, "};\n\n");
28862929 }
28872930

@@END
28892932 if (@$attributes) {
28902933 $has_attributes = 1;
28912934 push(@implContent, "static const V8DOMConfiguration::BatchedAttribute ${v8InterfaceName}Attrs[] = {\n");
2892  GenerateBatchedAttributeData($interface, $attributes);
 2935 GenerateBatchedAttributeData($interface, $attributes, "");
 2936 push(@implContent, "};\n\n");
 2937
 2938 # Setup attributes with specialized getters.
 2939 push(@implContent, "static const V8DOMConfiguration::BatchedAttribute ${v8InterfaceName}AttrsForMainWorld[] = {\n");
 2940 GenerateBatchedAttributeData($interface, $attributes, "ForMainWorld");
28932941 push(@implContent, "};\n\n");
28942942 }
28952943

@@END
29813029 # configuration method.
29823030 if ($interfaceName eq "DOMWindow") {
29833031 push(@implContent, <<END);
2984 static v8::Persistent<v8::ObjectTemplate> ConfigureShadowObjectTemplate(v8::Persistent<v8::ObjectTemplate> templ, v8::Isolate* isolate)
 3032static v8::Persistent<v8::ObjectTemplate> ConfigureShadowObjectTemplate(v8::Persistent<v8::ObjectTemplate> templ, v8::Isolate* isolate, WrapperWorldType currentWorldType)
29853033{
29863034 V8DOMConfiguration::batchConfigureAttributes(templ, v8::Handle<v8::ObjectTemplate>(), shadowAttrs, WTF_ARRAY_LENGTH(shadowAttrs), isolate);
29873035
 3036 if (currentWorldType == MainWorld)
 3037 V8DOMConfiguration::batchConfigureAttributes(templ, v8::Handle<v8::ObjectTemplate>(), shadowAttrsForMainWorld, WTF_ARRAY_LENGTH(shadowAttrsForMainWorld), isolate);
 3038
29883039 // Install a security handler with V8.
29893040 templ->SetAccessCheckCallbacks(V8DOMWindow::namedSecurityCheckCustom, V8DOMWindow::indexedSecurityCheckCustom, v8::External::New(&V8DOMWindow::info));
29903041 templ->SetInternalFieldCount(V8DOMWindow::internalFieldCount);

@@END
29993050
30003051 # Generate the template configuration method
30013052 push(@implContent, <<END);
3002 static v8::Persistent<v8::FunctionTemplate> Configure${v8InterfaceName}Template(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 3053static v8::Persistent<v8::FunctionTemplate> Configure${v8InterfaceName}Template(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
30033054{
30043055 desc->ReadOnlyPrototype();
30053056

@@END
30083059 if ($interface->extendedAttributes->{"V8EnabledAtRuntime"}) {
30093060 my $enable_function = GetRuntimeEnableFunctionName($interface);
30103061 push(@implContent, <<END);
3011  if (!${enable_function}())
 3062 if (!${enable_function}())
30123063 defaultSignature = V8DOMConfiguration::configureTemplate(desc, \"\", $parentClassTemplate, ${v8InterfaceName}::internalFieldCount, 0, 0, 0, 0, isolate);
30133064 else
30143065END

@@END
30673118 push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString;
30683119 push(@implContent, " if (${enable_function}()) {\n");
30693120 push(@implContent, " static const V8DOMConfiguration::BatchedAttribute attrData =\\\n");
3070  GenerateSingleBatchedAttribute($interfaceName, $runtime_attr, ";", " ");
 3121 GenerateSingleBatchedAttribute($interfaceName, $runtime_attr, ";", " ", "");
30713122 push(@implContent, <<END);
30723123 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
 3124END
 3125 push(@implContent, " if (currentWorldType == MainWorld) {\n");
 3126
 3127 push(@implContent, " static const V8DOMConfiguration::BatchedAttribute attrDataForMainWorld =\\\n");
 3128 GenerateSingleBatchedAttribute($interfaceName, $runtime_attr, ";", " ", "ForMainWorld");
 3129 push(@implContent, <<END);
 3130 V8DOMConfiguration::configureAttribute(instance, proto, attrDataForMainWorld, isolate);
 3131 }
30733132 }
30743133END
30753134 push(@implContent, "\n#endif // ${conditionalString}\n") if $conditionalString;

@@END
30963155 GenerateImplementationCustomCall($interface);
30973156 GenerateImplementationMasqueradesAsUndefined($interface);
30983157
 3158 my $addToTemplate = "V8DOMConfiguration::addToTemplate(desc, ";
 3159 if ($has_attributes) {
 3160 $addToTemplate = $addToTemplate . "${v8InterfaceName}AttrsForMainWorld, WTF_ARRAY_LENGTH(${v8InterfaceName}AttrsForMainWorld), ";
 3161 } else {
 3162 $addToTemplate = $addToTemplate . "0, 0, "
 3163 }
 3164 # No specialized callbacks yet.
 3165 $addToTemplate = $addToTemplate . "0, 0, ";
 3166 $addToTemplate = $addToTemplate . "isolate, defaultSignature);";
 3167
 3168 push(@implContent, <<END);
 3169
 3170 if (currentWorldType == MainWorld)
 3171END
 3172
 3173 if ($interface->extendedAttributes->{"V8EnabledAtRuntime"}) {
 3174 my $enable_function = GetRuntimeEnableFunctionName($interface);
 3175
 3176 push(@implContent, <<END);
 3177 if (${enable_function}())
 3178 ${addToTemplate}
 3179END
 3180 } else {
 3181 push(@implContent, <<END);
 3182 ${addToTemplate}
 3183END
 3184 }
 3185
30993186 # Define our functions with Set() or SetAccessor()
31003187 my $total_functions = 0;
31013188 foreach my $function (@normalFunctions) {

@@END
31523239 return desc;
31533240}
31543241
3155 v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 3242v8::Persistent<v8::FunctionTemplate> ${v8InterfaceName}::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
31563243{
31573244 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
3158  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
3159  if (result != data->templateMap(worldType).end())
 3245 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 3246 if (result != data->templateMap(currentWorldType).end())
31603247 return result->value;
31613248
31623249 v8::HandleScope handleScope;
31633250 v8::Persistent<v8::FunctionTemplate> templ =
3164  Configure${v8InterfaceName}Template(data->rawTemplate(&info, worldType), isolate, worldType);
3165  data->templateMap(worldType).add(&info, templ);
 3251 Configure${v8InterfaceName}Template(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 3252 data->templateMap(currentWorldType).add(&info, templ);
31663253 return templ;
31673254}
31683255
3169 bool ${v8InterfaceName}::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 3256bool ${v8InterfaceName}::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
31703257{
3171  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 3258 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
31723259}
31733260
31743261END

@@END
31893276 push(@implContent, "\n#if ${conditionalString}\n") if $conditionalString;
31903277 push(@implContent, " if (${enableFunction}(impl->document())) {\n");
31913278 push(@implContent, " static const V8DOMConfiguration::BatchedAttribute attrData =\\\n");
3192  GenerateSingleBatchedAttribute($interfaceName, $runtimeAttr, ";", " ");
 3279 GenerateSingleBatchedAttribute($interfaceName, $runtimeAttr, ";", " ", "");
31933280 push(@implContent, <<END);
31943281 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
31953282END

@@v8::Persistent<v8::ObjectTemplate> V8DOMWindow::GetShadowObjectTemplate(v8::Isol
32663353 static v8::Persistent<v8::ObjectTemplate> V8DOMWindowShadowObjectCacheForMainWorld;
32673354 if (V8DOMWindowShadowObjectCacheForMainWorld.IsEmpty()) {
32683355 V8DOMWindowShadowObjectCacheForMainWorld = v8::Persistent<v8::ObjectTemplate>::New(isolate, v8::ObjectTemplate::New());
3269  ConfigureShadowObjectTemplate(V8DOMWindowShadowObjectCacheForMainWorld, isolate);
 3356 ConfigureShadowObjectTemplate(V8DOMWindowShadowObjectCacheForMainWorld, isolate, currentWorldType);
32703357 }
32713358 return V8DOMWindowShadowObjectCacheForMainWorld;
32723359 } else {
32733360 static v8::Persistent<v8::ObjectTemplate> V8DOMWindowShadowObjectCacheForNonMainWorld;
32743361 if (V8DOMWindowShadowObjectCacheForNonMainWorld.IsEmpty()) {
32753362 V8DOMWindowShadowObjectCacheForNonMainWorld = v8::Persistent<v8::ObjectTemplate>::New(isolate, v8::ObjectTemplate::New());
3276  ConfigureShadowObjectTemplate(V8DOMWindowShadowObjectCacheForNonMainWorld, isolate);
 3363 ConfigureShadowObjectTemplate(V8DOMWindowShadowObjectCacheForNonMainWorld, isolate, currentWorldType);
32773364 }
32783365 return V8DOMWindowShadowObjectCacheForNonMainWorld;
32793366 }

@@END
34833570 @args = ();
34843571 foreach my $param (@params) {
34853572 my $paramName = $param->name;
3486  push(@implContent, " v8::Handle<v8::Value> ${paramName}Handle = " . NativeToJSValue($param, $paramName, "v8::Handle<v8::Object>()", "v8Context->GetIsolate()") . ";\n");
 3573 push(@implContent, " v8::Handle<v8::Value> ${paramName}Handle = " . NativeToJSValue($param, $paramName, "v8::Handle<v8::Object>()", "v8Context->GetIsolate()", "") . ";\n");
34873574 push(@implContent, " if (${paramName}Handle.IsEmpty()) {\n");
34883575 push(@implContent, " if (!isScriptControllerTerminating())\n");
34893576 push(@implContent, " CRASH();\n");

@@sub GenerateFunctionCallString
38613948 my $nativeValue;
38623949 # FIXME: Update for all ScriptWrappables.
38633950 if (IsDOMNodeType($interfaceName)) {
3864  $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", "args", "imp", "ReturnUnsafeHandle");
 3951 $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", "args", "imp", "ReturnUnsafeHandle", "");
38653952 } else {
3866  $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", 0, 0, "ReturnUnsafeHandle");
 3953 $nativeValue = NativeToJSValue($function->signature, $return, "args.Holder()", "args.GetIsolate()", 0, 0, "ReturnUnsafeHandle", "");
38673954 }
38683955
38693956 $result .= $indent . "return " . $nativeValue . ";\n";

@@sub CreateCustomSignature
40984185 } else {
40994186 AddToImplIncludes(GetV8HeaderName($type));
41004187 }
4101  $result .= "V8PerIsolateData::from(isolate)->rawTemplate(&V8${type}::info, worldType)";
 4188 $result .= "V8PerIsolateData::from(isolate)->rawTemplate(&V8${type}::info, currentWorldType)";
41024189 }
41034190 } else {
41044191 $result .= "v8::Handle<v8::FunctionTemplate>()";

@@sub NativeToJSValue
42434330 my $getScriptWrappableArg = $getScriptWrappable ? ", $getScriptWrappable" : "";
42444331 my $returnHandleType = shift;
42454332 my $returnHandleTypeArg = $returnHandleType ? ", $returnHandleType" : "";
 4333 my $forMainWorldSuffix = shift;
42464334
42474335 my $type = $signature->type;
42484336

@@sub NativeToJSValue
43004388
43014389 if (IsDOMNodeType($type) || $type eq "EventTarget") {
43024390 if ($getScriptWrappable) {
4303  return "toV8Fast($value$getHolderContainerArg$getScriptWrappableArg)";
 4391 return "toV8Fast${forMainWorldSuffix}($value$getHolderContainerArg$getScriptWrappableArg)";
43044392 }
43054393 return "toV8($value, $getCreationContext, $getIsolate)";
43064394 }

@@sub NativeToJSValue
43204408 AddToImplIncludes("wtf/GetPtr.h");
43214409
43224410 if ($getScriptWrappable) {
4323  return "toV8Fast($value$getHolderContainerArg$getScriptWrappableArg)";
 4411 return "toV8Fast$forMainWorldSuffix($value$getHolderContainerArg$getScriptWrappableArg)";
43244412 }
43254413 return "toV8($value, $getCreationContext, $getIsolate)";
43264414}

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

@@v8::Handle<v8::Value> V8Float64Array::constructorCallback(const v8::Arguments& a
135135 return Float64ArrayV8Internal::constructor(args);
136136}
137137
138 static v8::Persistent<v8::FunctionTemplate> ConfigureV8Float64ArrayTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 138static v8::Persistent<v8::FunctionTemplate> ConfigureV8Float64ArrayTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
139139{
140140 desc->ReadOnlyPrototype();
141141
142142 v8::Local<v8::Signature> defaultSignature;
143  defaultSignature = V8DOMConfiguration::configureTemplate(desc, "Float64Array", V8ArrayBufferView::GetTemplate(isolate, worldType), V8Float64Array::internalFieldCount,
 143 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "Float64Array", V8ArrayBufferView::GetTemplate(isolate, currentWorldType), V8Float64Array::internalFieldCount,
144144 0, 0,
145145 V8Float64ArrayMethods, WTF_ARRAY_LENGTH(V8Float64ArrayMethods), isolate);
146146 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8Float64ArrayTemplate(v8::
151151 UNUSED_PARAM(proto); // In some cases, it will not be used.
152152
153153
 154 if (currentWorldType == MainWorld)
 155 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 156
154157 // Custom Signature 'foo'
155158 const int fooArgc = 1;
156  v8::Handle<v8::FunctionTemplate> fooArgv[fooArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Float32Array::info, worldType) };
 159 v8::Handle<v8::FunctionTemplate> fooArgv[fooArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Float32Array::info, currentWorldType) };
157160 v8::Handle<v8::Signature> fooSignature = v8::Signature::New(desc, fooArgc, fooArgv);
158161 proto->Set(v8::String::NewSymbol("foo"), v8::FunctionTemplate::New(Float64ArrayV8Internal::fooMethodCallback, v8Undefined(), fooSignature));
159162

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8Float64ArrayTemplate(v8::
162165 return desc;
163166}
164167
165 v8::Persistent<v8::FunctionTemplate> V8Float64Array::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 168v8::Persistent<v8::FunctionTemplate> V8Float64Array::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
166169{
167170 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
168  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
169  if (result != data->templateMap(worldType).end())
 171 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 172 if (result != data->templateMap(currentWorldType).end())
170173 return result->value;
171174
172175 v8::HandleScope handleScope;
173176 v8::Persistent<v8::FunctionTemplate> templ =
174  ConfigureV8Float64ArrayTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
175  data->templateMap(worldType).add(&info, templ);
 177 ConfigureV8Float64ArrayTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 178 data->templateMap(currentWorldType).add(&info, templ);
176179 return templ;
177180}
178181
179 bool V8Float64Array::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 182bool V8Float64Array::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
180183{
181  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 184 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
182185}
183186
184187

Source/WebCore/bindings/scripts/test/V8/V8Float64Array.h

@@inline v8::Handle<v8::Value> toV8Fast(Float64Array* impl, const HolderContainer&
7777}
7878
7979template<class HolderContainer, class Wrappable>
 80inline v8::Handle<v8::Value> toV8FastForMainWorld(Float64Array* impl, const HolderContainer& container, Wrappable* wrappable)
 81{
 82 if (UNLIKELY(!impl))
 83 return v8Null(container.GetIsolate());
 84 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 85 if (!wrapper.IsEmpty())
 86 return wrapper;
 87 return wrap(impl, container.Holder(), container.GetIsolate());
 88}
 89
 90template<class HolderContainer, class Wrappable>
 91inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< Float64Array > impl, const HolderContainer& container, Wrappable* wrappable)
 92{
 93 return toV8FastForMainWorld(impl.get(), container, wrappable);
 94}
 95
 96
 97template<class HolderContainer, class Wrappable>
8098inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< Float64Array > impl, const HolderContainer& container, Wrappable* wrappable)
8199{
82100 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> excitingAttrAttrGetterCallback(v8::Local<v8::String
8282 return TestActiveDOMObjectV8Internal::excitingAttrAttrGetter(name, info);
8383}
8484
 85static v8::Handle<v8::Value> excitingAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 86{
 87 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(info.Holder());
 88 return v8Integer(imp->excitingAttr(), info.GetIsolate());
 89}
 90
 91static v8::Handle<v8::Value> excitingAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 92{
 93 return TestActiveDOMObjectV8Internal::excitingAttrAttrGetterForMainWorld(name, info);
 94}
 95
8596bool indexedSecurityCheck(v8::Local<v8::Object> host, uint32_t index, v8::AccessType type, v8::Local<v8::Value>)
8697{
8798 TestActiveDOMObject* imp = V8TestActiveDOMObject::toNative(host);

@@static const V8DOMConfiguration::BatchedAttribute V8TestActiveDOMObjectAttrs[] =
178189 {"excitingAttr", TestActiveDOMObjectV8Internal::excitingAttrAttrGetterCallback, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
179190};
180191
181 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 192static const V8DOMConfiguration::BatchedAttribute V8TestActiveDOMObjectAttrsForMainWorld[] = {
 193 // Attribute 'excitingAttr' (Type: 'readonly attribute' ExtAttr: '')
 194 {"excitingAttr", TestActiveDOMObjectV8Internal::excitingAttrAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 195};
 196
 197static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
182198{
183199 desc->ReadOnlyPrototype();
184200

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectTempla
193209 UNUSED_PARAM(proto); // In some cases, it will not be used.
194210 instance->SetAccessCheckCallbacks(TestActiveDOMObjectV8Internal::namedSecurityCheck, TestActiveDOMObjectV8Internal::indexedSecurityCheck, v8::External::New(&V8TestActiveDOMObject::info));
195211
 212 if (currentWorldType == MainWorld)
 213 V8DOMConfiguration::addToTemplate(desc, V8TestActiveDOMObjectAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestActiveDOMObjectAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 214
196215 // Custom Signature 'excitingFunction'
197216 const int excitingFunctionArgc = 1;
198  v8::Handle<v8::FunctionTemplate> excitingFunctionArgv[excitingFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, worldType) };
 217 v8::Handle<v8::FunctionTemplate> excitingFunctionArgv[excitingFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldType) };
199218 v8::Handle<v8::Signature> excitingFunctionSignature = v8::Signature::New(desc, excitingFunctionArgc, excitingFunctionArgv);
200219 proto->Set(v8::String::NewSymbol("excitingFunction"), v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::excitingFunctionMethodCallback, v8Undefined(), excitingFunctionSignature));
201220

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestActiveDOMObjectTempla
207226 return desc;
208227}
209228
210 v8::Persistent<v8::FunctionTemplate> V8TestActiveDOMObject::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 229v8::Persistent<v8::FunctionTemplate> V8TestActiveDOMObject::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
211230{
212231 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
213  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
214  if (result != data->templateMap(worldType).end())
 232 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 233 if (result != data->templateMap(currentWorldType).end())
215234 return result->value;
216235
217236 v8::HandleScope handleScope;
218237 v8::Persistent<v8::FunctionTemplate> templ =
219  ConfigureV8TestActiveDOMObjectTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
220  data->templateMap(worldType).add(&info, templ);
 238 ConfigureV8TestActiveDOMObjectTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 239 data->templateMap(currentWorldType).add(&info, templ);
221240 return templ;
222241}
223242
224 bool V8TestActiveDOMObject::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 243bool V8TestActiveDOMObject::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
225244{
226  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 245 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
227246}
228247
229248

Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.h

@@inline v8::Handle<v8::Value> toV8Fast(TestActiveDOMObject* impl, const HolderCon
8080}
8181
8282template<class HolderContainer, class Wrappable>
 83inline v8::Handle<v8::Value> toV8FastForMainWorld(TestActiveDOMObject* impl, const HolderContainer& container, Wrappable* wrappable)
 84{
 85 if (UNLIKELY(!impl))
 86 return v8Null(container.GetIsolate());
 87 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 88 if (!wrapper.IsEmpty())
 89 return wrapper;
 90 return wrap(impl, container.Holder(), container.GetIsolate());
 91}
 92
 93template<class HolderContainer, class Wrappable>
 94inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestActiveDOMObject > impl, const HolderContainer& container, Wrappable* wrappable)
 95{
 96 return toV8FastForMainWorld(impl.get(), container, wrappable);
 97}
 98
 99
 100template<class HolderContainer, class Wrappable>
83101inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestActiveDOMObject > impl, const HolderContainer& container, Wrappable* wrappable)
84102{
85103 return toV8Fast(impl.get(), container, wrappable);

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

@@static const V8DOMConfiguration::BatchedMethod V8TestCustomNamedGetterMethods[]
9191 {"anotherFunction", TestCustomNamedGetterV8Internal::anotherFunctionMethodCallback},
9292};
9393
94 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestCustomNamedGetterTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 94static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestCustomNamedGetterTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
9595{
9696 desc->ReadOnlyPrototype();
9797

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestCustomNamedGetterTemp
107107
108108 desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestCustomNamedGetter::namedPropertyGetter, 0, 0, 0, 0);
109109
 110 if (currentWorldType == MainWorld)
 111 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 112
110113 // Custom toString template
111114 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
112115 return desc;
113116}
114117
115 v8::Persistent<v8::FunctionTemplate> V8TestCustomNamedGetter::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 118v8::Persistent<v8::FunctionTemplate> V8TestCustomNamedGetter::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
116119{
117120 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
118  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
119  if (result != data->templateMap(worldType).end())
 121 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 122 if (result != data->templateMap(currentWorldType).end())
120123 return result->value;
121124
122125 v8::HandleScope handleScope;
123126 v8::Persistent<v8::FunctionTemplate> templ =
124  ConfigureV8TestCustomNamedGetterTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
125  data->templateMap(worldType).add(&info, templ);
 127 ConfigureV8TestCustomNamedGetterTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 128 data->templateMap(currentWorldType).add(&info, templ);
126129 return templ;
127130}
128131
129 bool V8TestCustomNamedGetter::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 132bool V8TestCustomNamedGetter::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
130133{
131  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 134 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
132135}
133136
134137

Source/WebCore/bindings/scripts/test/V8/V8TestCustomNamedGetter.h

@@inline v8::Handle<v8::Value> toV8Fast(TestCustomNamedGetter* impl, const HolderC
8181}
8282
8383template<class HolderContainer, class Wrappable>
 84inline v8::Handle<v8::Value> toV8FastForMainWorld(TestCustomNamedGetter* impl, const HolderContainer& container, Wrappable* wrappable)
 85{
 86 if (UNLIKELY(!impl))
 87 return v8Null(container.GetIsolate());
 88 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 89 if (!wrapper.IsEmpty())
 90 return wrapper;
 91 return wrap(impl, container.Holder(), container.GetIsolate());
 92}
 93
 94template<class HolderContainer, class Wrappable>
 95inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestCustomNamedGetter > impl, const HolderContainer& container, Wrappable* wrappable)
 96{
 97 return toV8FastForMainWorld(impl.get(), container, wrappable);
 98}
 99
 100
 101template<class HolderContainer, class Wrappable>
84102inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestCustomNamedGetter > impl, const HolderContainer& container, Wrappable* wrappable)
85103{
86104 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> attr1AttrGetterCallback(v8::Local<v8::String> name,
8181 return TestEventConstructorV8Internal::attr1AttrGetter(name, info);
8282}
8383
 84static v8::Handle<v8::Value> attr1AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 85{
 86 TestEventConstructor* imp = V8TestEventConstructor::toNative(info.Holder());
 87 return v8String(imp->attr1(), info.GetIsolate(), ReturnUnsafeHandle);
 88}
 89
 90static v8::Handle<v8::Value> attr1AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 91{
 92 return TestEventConstructorV8Internal::attr1AttrGetterForMainWorld(name, info);
 93}
 94
8495static v8::Handle<v8::Value> attr2AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
8596{
8697 TestEventConstructor* imp = V8TestEventConstructor::toNative(info.Holder());

@@static v8::Handle<v8::Value> attr2AttrGetterCallback(v8::Local<v8::String> name,
92103 return TestEventConstructorV8Internal::attr2AttrGetter(name, info);
93104}
94105
 106static v8::Handle<v8::Value> attr2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 107{
 108 TestEventConstructor* imp = V8TestEventConstructor::toNative(info.Holder());
 109 return v8String(imp->attr2(), info.GetIsolate(), ReturnUnsafeHandle);
 110}
 111
 112static v8::Handle<v8::Value> attr2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 113{
 114 return TestEventConstructorV8Internal::attr2AttrGetterForMainWorld(name, info);
 115}
 116
95117static v8::Handle<v8::Value> constructor(const v8::Arguments& args)
96118{
97119 if (args.Length() < 1)

@@static const V8DOMConfiguration::BatchedAttribute V8TestEventConstructorAttrs[]
120142 {"attr2", TestEventConstructorV8Internal::attr2AttrGetterCallback, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
121143};
122144
 145static const V8DOMConfiguration::BatchedAttribute V8TestEventConstructorAttrsForMainWorld[] = {
 146 // Attribute 'attr1' (Type: 'readonly attribute' ExtAttr: '')
 147 {"attr1", TestEventConstructorV8Internal::attr1AttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 148 // Attribute 'attr2' (Type: 'readonly attribute' ExtAttr: 'InitializedByEventConstructor')
 149 {"attr2", TestEventConstructorV8Internal::attr2AttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 150};
 151
123152bool fillTestEventConstructorInit(TestEventConstructorInit& eventInit, const Dictionary& options)
124153{
125154 options.get("attr2", eventInit.attr2);

@@v8::Handle<v8::Value> V8TestEventConstructor::constructorCallback(const v8::Argu
137166 return TestEventConstructorV8Internal::constructor(args);
138167}
139168
140 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventConstructorTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 169static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventConstructorTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
141170{
142171 desc->ReadOnlyPrototype();
143172

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventConstructorTempl
149178 desc->SetCallHandler(V8TestEventConstructor::constructorCallback);
150179
151180
 181 if (currentWorldType == MainWorld)
 182 V8DOMConfiguration::addToTemplate(desc, V8TestEventConstructorAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestEventConstructorAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 183
152184 // Custom toString template
153185 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
154186 return desc;
155187}
156188
157 v8::Persistent<v8::FunctionTemplate> V8TestEventConstructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 189v8::Persistent<v8::FunctionTemplate> V8TestEventConstructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
158190{
159191 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
160  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
161  if (result != data->templateMap(worldType).end())
 192 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 193 if (result != data->templateMap(currentWorldType).end())
162194 return result->value;
163195
164196 v8::HandleScope handleScope;
165197 v8::Persistent<v8::FunctionTemplate> templ =
166  ConfigureV8TestEventConstructorTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
167  data->templateMap(worldType).add(&info, templ);
 198 ConfigureV8TestEventConstructorTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 199 data->templateMap(currentWorldType).add(&info, templ);
168200 return templ;
169201}
170202
171 bool V8TestEventConstructor::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 203bool V8TestEventConstructor::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
172204{
173  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 205 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
174206}
175207
176208

Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.h

@@inline v8::Handle<v8::Value> toV8Fast(TestEventConstructor* impl, const HolderCo
8282}
8383
8484template<class HolderContainer, class Wrappable>
 85inline v8::Handle<v8::Value> toV8FastForMainWorld(TestEventConstructor* impl, const HolderContainer& container, Wrappable* wrappable)
 86{
 87 if (UNLIKELY(!impl))
 88 return v8Null(container.GetIsolate());
 89 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 90 if (!wrapper.IsEmpty())
 91 return wrapper;
 92 return wrap(impl, container.Holder(), container.GetIsolate());
 93}
 94
 95template<class HolderContainer, class Wrappable>
 96inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestEventConstructor > impl, const HolderContainer& container, Wrappable* wrappable)
 97{
 98 return toV8FastForMainWorld(impl.get(), container, wrappable);
 99}
 100
 101
 102template<class HolderContainer, class Wrappable>
85103inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEventConstructor > impl, const HolderContainer& container, Wrappable* wrappable)
86104{
87105 return toV8Fast(impl.get(), container, wrappable);

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

@@static const V8DOMConfiguration::BatchedMethod V8TestEventTargetMethods[] = {
159159 {"removeEventListener", TestEventTargetV8Internal::removeEventListenerMethodCallback},
160160};
161161
162 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 162static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
163163{
164164 desc->ReadOnlyPrototype();
165165

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v
177177 desc->InstanceTemplate()->SetNamedPropertyHandler(V8TestEventTarget::namedPropertyGetter, 0, 0, 0, 0);
178178 desc->InstanceTemplate()->MarkAsUndetectable();
179179
 180 if (currentWorldType == MainWorld)
 181 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 182
180183 // Custom Signature 'dispatchEvent'
181184 const int dispatchEventArgc = 1;
182  v8::Handle<v8::FunctionTemplate> dispatchEventArgv[dispatchEventArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Event::info, worldType) };
 185 v8::Handle<v8::FunctionTemplate> dispatchEventArgv[dispatchEventArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Event::info, currentWorldType) };
183186 v8::Handle<v8::Signature> dispatchEventSignature = v8::Signature::New(desc, dispatchEventArgc, dispatchEventArgv);
184187 proto->Set(v8::String::NewSymbol("dispatchEvent"), v8::FunctionTemplate::New(TestEventTargetV8Internal::dispatchEventMethodCallback, v8Undefined(), dispatchEventSignature));
185188

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestEventTargetTemplate(v
188191 return desc;
189192}
190193
191 v8::Persistent<v8::FunctionTemplate> V8TestEventTarget::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 194v8::Persistent<v8::FunctionTemplate> V8TestEventTarget::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
192195{
193196 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
194  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
195  if (result != data->templateMap(worldType).end())
 197 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 198 if (result != data->templateMap(currentWorldType).end())
196199 return result->value;
197200
198201 v8::HandleScope handleScope;
199202 v8::Persistent<v8::FunctionTemplate> templ =
200  ConfigureV8TestEventTargetTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
201  data->templateMap(worldType).add(&info, templ);
 203 ConfigureV8TestEventTargetTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 204 data->templateMap(currentWorldType).add(&info, templ);
202205 return templ;
203206}
204207
205 bool V8TestEventTarget::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 208bool V8TestEventTarget::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
206209{
207  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 210 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
208211}
209212
210213EventTarget* V8TestEventTarget::toEventTarget(v8::Handle<v8::Object> object)

Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.h

@@inline v8::Handle<v8::Value> toV8Fast(TestEventTarget* impl, const HolderContain
8484}
8585
8686template<class HolderContainer, class Wrappable>
 87inline v8::Handle<v8::Value> toV8FastForMainWorld(TestEventTarget* impl, const HolderContainer& container, Wrappable* wrappable)
 88{
 89 if (UNLIKELY(!impl))
 90 return v8Null(container.GetIsolate());
 91 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 92 if (!wrapper.IsEmpty())
 93 return wrapper;
 94 return wrap(impl, container.Holder(), container.GetIsolate());
 95}
 96
 97template<class HolderContainer, class Wrappable>
 98inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestEventTarget > impl, const HolderContainer& container, Wrappable* wrappable)
 99{
 100 return toV8FastForMainWorld(impl.get(), container, wrappable);
 101}
 102
 103
 104template<class HolderContainer, class Wrappable>
87105inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEventTarget > impl, const HolderContainer& container, Wrappable* wrappable)
88106{
89107 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> nameAttrGetterCallback(v8::Local<v8::String> name,
8080 return TestExceptionV8Internal::nameAttrGetter(name, info);
8181}
8282
 83static v8::Handle<v8::Value> nameAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 84{
 85 TestException* imp = V8TestException::toNative(info.Holder());
 86 return v8String(imp->name(), info.GetIsolate(), ReturnUnsafeHandle);
 87}
 88
 89static v8::Handle<v8::Value> nameAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 90{
 91 return TestExceptionV8Internal::nameAttrGetterForMainWorld(name, info);
 92}
 93
8394} // namespace TestExceptionV8Internal
8495
8596static const V8DOMConfiguration::BatchedAttribute V8TestExceptionAttrs[] = {

@@static const V8DOMConfiguration::BatchedAttribute V8TestExceptionAttrs[] = {
8798 {"name", TestExceptionV8Internal::nameAttrGetterCallback, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
8899};
89100
90 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestExceptionTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 101static const V8DOMConfiguration::BatchedAttribute V8TestExceptionAttrsForMainWorld[] = {
 102 // Attribute 'name' (Type: 'readonly attribute' ExtAttr: '')
 103 {"name", TestExceptionV8Internal::nameAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 104};
 105
 106static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestExceptionTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
91107{
92108 desc->ReadOnlyPrototype();
93109

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestExceptionTemplate(v8:
98114 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
99115
100116
 117 if (currentWorldType == MainWorld)
 118 V8DOMConfiguration::addToTemplate(desc, V8TestExceptionAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestExceptionAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 119
101120 // Custom toString template
102121 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
103122 return desc;
104123}
105124
106 v8::Persistent<v8::FunctionTemplate> V8TestException::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 125v8::Persistent<v8::FunctionTemplate> V8TestException::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
107126{
108127 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
109  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
110  if (result != data->templateMap(worldType).end())
 128 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 129 if (result != data->templateMap(currentWorldType).end())
111130 return result->value;
112131
113132 v8::HandleScope handleScope;
114133 v8::Persistent<v8::FunctionTemplate> templ =
115  ConfigureV8TestExceptionTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
116  data->templateMap(worldType).add(&info, templ);
 134 ConfigureV8TestExceptionTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 135 data->templateMap(currentWorldType).add(&info, templ);
117136 return templ;
118137}
119138
120 bool V8TestException::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 139bool V8TestException::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
121140{
122  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 141 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
123142}
124143
125144

Source/WebCore/bindings/scripts/test/V8/V8TestException.h

@@inline v8::Handle<v8::Value> toV8Fast(TestException* impl, const HolderContainer
8080}
8181
8282template<class HolderContainer, class Wrappable>
 83inline v8::Handle<v8::Value> toV8FastForMainWorld(TestException* impl, const HolderContainer& container, Wrappable* wrappable)
 84{
 85 if (UNLIKELY(!impl))
 86 return v8Null(container.GetIsolate());
 87 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 88 if (!wrapper.IsEmpty())
 89 return wrapper;
 90 return wrap(impl, container.Holder(), container.GetIsolate());
 91}
 92
 93template<class HolderContainer, class Wrappable>
 94inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestException > impl, const HolderContainer& container, Wrappable* wrappable)
 95{
 96 return toV8FastForMainWorld(impl.get(), container, wrappable);
 97}
 98
 99
 100template<class HolderContainer, class Wrappable>
83101inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestException > impl, const HolderContainer& container, Wrappable* wrappable)
84102{
85103 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> supplementalStaticReadOnlyAttrAttrGetterCallback(v8
9797
9898#if ENABLE(Condition11) || ENABLE(Condition12)
9999
 100static v8::Handle<v8::Value> supplementalStaticReadOnlyAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 101{
 102 return v8Integer(TestSupplemental::supplementalStaticReadOnlyAttr(), info.GetIsolate());
 103}
 104
 105#endif // ENABLE(Condition11) || ENABLE(Condition12)
 106
 107#if ENABLE(Condition11) || ENABLE(Condition12)
 108
 109static v8::Handle<v8::Value> supplementalStaticReadOnlyAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 110{
 111 return TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterForMainWorld(name, info);
 112}
 113
 114#endif // ENABLE(Condition11) || ENABLE(Condition12)
 115
 116#if ENABLE(Condition11) || ENABLE(Condition12)
 117
100118static v8::Handle<v8::Value> supplementalStaticAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
101119{
102120 return v8String(TestSupplemental::supplementalStaticAttr(), info.GetIsolate(), ReturnUnsafeHandle);

@@static v8::Handle<v8::Value> supplementalStaticAttrAttrGetterCallback(v8::Local<
115133
116134#if ENABLE(Condition11) || ENABLE(Condition12)
117135
 136static v8::Handle<v8::Value> supplementalStaticAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 137{
 138 return v8String(TestSupplemental::supplementalStaticAttr(), info.GetIsolate(), ReturnUnsafeHandle);
 139}
 140
 141#endif // ENABLE(Condition11) || ENABLE(Condition12)
 142
 143#if ENABLE(Condition11) || ENABLE(Condition12)
 144
 145static v8::Handle<v8::Value> supplementalStaticAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 146{
 147 return TestInterfaceV8Internal::supplementalStaticAttrAttrGetterForMainWorld(name, info);
 148}
 149
 150#endif // ENABLE(Condition11) || ENABLE(Condition12)
 151
 152#if ENABLE(Condition11) || ENABLE(Condition12)
 153
118154static void supplementalStaticAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
119155{
120156 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);

@@static void supplementalStaticAttrAttrSetterCallback(v8::Local<v8::String> name,
135171
136172#if ENABLE(Condition11) || ENABLE(Condition12)
137173
 174static void supplementalStaticAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 175{
 176 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 177 TestSupplemental::setSupplementalStaticAttr(v);
 178 return;
 179}
 180
 181#endif // ENABLE(Condition11) || ENABLE(Condition12)
 182
 183#if ENABLE(Condition11) || ENABLE(Condition12)
 184
 185static void supplementalStaticAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 186{
 187 TestInterfaceV8Internal::supplementalStaticAttrAttrSetterForMainWorld(name, value, info);
 188}
 189
 190#endif // ENABLE(Condition11) || ENABLE(Condition12)
 191
 192#if ENABLE(Condition11) || ENABLE(Condition12)
 193
138194static v8::Handle<v8::Value> supplementalStr1AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
139195{
140196 TestInterface* imp = V8TestInterface::toNative(info.Holder());

@@static v8::Handle<v8::Value> supplementalStr1AttrGetterCallback(v8::Local<v8::St
154210
155211#if ENABLE(Condition11) || ENABLE(Condition12)
156212
 213static v8::Handle<v8::Value> supplementalStr1AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 214{
 215 TestInterface* imp = V8TestInterface::toNative(info.Holder());
 216 return v8String(TestSupplemental::supplementalStr1(imp), info.GetIsolate(), ReturnUnsafeHandle);
 217}
 218
 219#endif // ENABLE(Condition11) || ENABLE(Condition12)
 220
 221#if ENABLE(Condition11) || ENABLE(Condition12)
 222
 223static v8::Handle<v8::Value> supplementalStr1AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 224{
 225 return TestInterfaceV8Internal::supplementalStr1AttrGetterForMainWorld(name, info);
 226}
 227
 228#endif // ENABLE(Condition11) || ENABLE(Condition12)
 229
 230#if ENABLE(Condition11) || ENABLE(Condition12)
 231
157232static v8::Handle<v8::Value> supplementalStr2AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
158233{
159234 TestInterface* imp = V8TestInterface::toNative(info.Holder());

@@static v8::Handle<v8::Value> supplementalStr2AttrGetterCallback(v8::Local<v8::St
173248
174249#if ENABLE(Condition11) || ENABLE(Condition12)
175250
 251static v8::Handle<v8::Value> supplementalStr2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 252{
 253 TestInterface* imp = V8TestInterface::toNative(info.Holder());
 254 return v8String(TestSupplemental::supplementalStr2(imp), info.GetIsolate(), ReturnUnsafeHandle);
 255}
 256
 257#endif // ENABLE(Condition11) || ENABLE(Condition12)
 258
 259#if ENABLE(Condition11) || ENABLE(Condition12)
 260
 261static v8::Handle<v8::Value> supplementalStr2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 262{
 263 return TestInterfaceV8Internal::supplementalStr2AttrGetterForMainWorld(name, info);
 264}
 265
 266#endif // ENABLE(Condition11) || ENABLE(Condition12)
 267
 268#if ENABLE(Condition11) || ENABLE(Condition12)
 269
176270static void supplementalStr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
177271{
178272 TestInterface* imp = V8TestInterface::toNative(info.Holder());

@@static void supplementalStr2AttrSetterCallback(v8::Local<v8::String> name, v8::L
194288
195289#if ENABLE(Condition11) || ENABLE(Condition12)
196290
 291static void supplementalStr2AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 292{
 293 TestInterface* imp = V8TestInterface::toNative(info.Holder());
 294 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 295 TestSupplemental::setSupplementalStr2(imp, v);
 296 return;
 297}
 298
 299#endif // ENABLE(Condition11) || ENABLE(Condition12)
 300
 301#if ENABLE(Condition11) || ENABLE(Condition12)
 302
 303static void supplementalStr2AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 304{
 305 TestInterfaceV8Internal::supplementalStr2AttrSetterForMainWorld(name, value, info);
 306}
 307
 308#endif // ENABLE(Condition11) || ENABLE(Condition12)
 309
 310#if ENABLE(Condition11) || ENABLE(Condition12)
 311
197312static v8::Handle<v8::Value> supplementalStr3AttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info)
198313{
199314 return V8TestInterface::supplementalStr3AttrGetterCustom(name, info);

@@static v8::Handle<v8::Value> supplementalStr3AttrGetterCallback(v8::Local<v8::St
203318
204319#if ENABLE(Condition11) || ENABLE(Condition12)
205320
 321static v8::Handle<v8::Value> supplementalStr3AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 322{
 323 return V8TestInterface::supplementalStr3AttrGetterCustom(name, info);
 324}
 325
 326#endif // ENABLE(Condition11) || ENABLE(Condition12)
 327
 328#if ENABLE(Condition11) || ENABLE(Condition12)
 329
206330static void supplementalStr3AttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
207331{
208332 V8TestInterface::supplementalStr3AttrSetterCustom(name, value, info);

@@static void supplementalStr3AttrSetterCallback(v8::Local<v8::String> name, v8::L
212336
213337#if ENABLE(Condition11) || ENABLE(Condition12)
214338
 339static void supplementalStr3AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 340{
 341 V8TestInterface::supplementalStr3AttrSetterCustom(name, value, info);
 342}
 343
 344#endif // ENABLE(Condition11) || ENABLE(Condition12)
 345
 346#if ENABLE(Condition11) || ENABLE(Condition12)
 347
215348static v8::Handle<v8::Value> supplementalNodeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
216349{
217350 TestInterface* imp = V8TestInterface::toNative(info.Holder());

@@static v8::Handle<v8::Value> supplementalNodeAttrGetterCallback(v8::Local<v8::St
231364
232365#if ENABLE(Condition11) || ENABLE(Condition12)
233366
 367static v8::Handle<v8::Value> supplementalNodeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 368{
 369 TestInterface* imp = V8TestInterface::toNative(info.Holder());
 370 return toV8FastForMainWorld(TestSupplemental::supplementalNode(imp), info, imp);
 371}
 372
 373#endif // ENABLE(Condition11) || ENABLE(Condition12)
 374
 375#if ENABLE(Condition11) || ENABLE(Condition12)
 376
 377static v8::Handle<v8::Value> supplementalNodeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 378{
 379 return TestInterfaceV8Internal::supplementalNodeAttrGetterForMainWorld(name, info);
 380}
 381
 382#endif // ENABLE(Condition11) || ENABLE(Condition12)
 383
 384#if ENABLE(Condition11) || ENABLE(Condition12)
 385
234386static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
235387{
236388 TestInterface* imp = V8TestInterface::toNative(info.Holder());

@@static void supplementalNodeAttrSetterCallback(v8::Local<v8::String> name, v8::L
252404
253405#if ENABLE(Condition11) || ENABLE(Condition12)
254406
 407static void supplementalNodeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 408{
 409 TestInterface* imp = V8TestInterface::toNative(info.Holder());
 410 Node* v = V8Node::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 411 TestSupplemental::setSupplementalNode(imp, WTF::getPtr(v));
 412 return;
 413}
 414
 415#endif // ENABLE(Condition11) || ENABLE(Condition12)
 416
 417#if ENABLE(Condition11) || ENABLE(Condition12)
 418
 419static void supplementalNodeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 420{
 421 TestInterfaceV8Internal::supplementalNodeAttrSetterForMainWorld(name, value, info);
 422}
 423
 424#endif // ENABLE(Condition11) || ENABLE(Condition12)
 425
 426#if ENABLE(Condition11) || ENABLE(Condition12)
 427
255428static v8::Handle<v8::Value> supplementalMethod1Method(const v8::Arguments& args)
256429{
257430 TestInterface* imp = V8TestInterface::toNative(args.Holder());

@@static const V8DOMConfiguration::BatchedAttribute V8TestInterfaceAttrs[] = {
381554#endif // ENABLE(Condition11) || ENABLE(Condition12)
382555};
383556
 557static const V8DOMConfiguration::BatchedAttribute V8TestInterfaceAttrsForMainWorld[] = {
 558#if ENABLE(Condition11) || ENABLE(Condition12)
 559 // Attribute 'supplementalStaticReadOnlyAttr' (Type: 'readonly attribute' ExtAttr: 'Conditional ImplementedBy')
 560 {"supplementalStaticReadOnlyAttr", TestInterfaceV8Internal::supplementalStaticReadOnlyAttrAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 561#endif // ENABLE(Condition11) || ENABLE(Condition12)
 562#if ENABLE(Condition11) || ENABLE(Condition12)
 563 // Attribute 'supplementalStaticAttr' (Type: 'attribute' ExtAttr: 'Conditional ImplementedBy')
 564 {"supplementalStaticAttr", TestInterfaceV8Internal::supplementalStaticAttrAttrGetterCallbackForMainWorld, TestInterfaceV8Internal::supplementalStaticAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 565#endif // ENABLE(Condition11) || ENABLE(Condition12)
 566#if ENABLE(Condition11) || ENABLE(Condition12)
 567 // Attribute 'supplementalStr1' (Type: 'readonly attribute' ExtAttr: 'Conditional ImplementedBy')
 568 {"supplementalStr1", TestInterfaceV8Internal::supplementalStr1AttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 569#endif // ENABLE(Condition11) || ENABLE(Condition12)
 570#if ENABLE(Condition11) || ENABLE(Condition12)
 571 // Attribute 'supplementalStr2' (Type: 'attribute' ExtAttr: 'Conditional ImplementedBy')
 572 {"supplementalStr2", TestInterfaceV8Internal::supplementalStr2AttrGetterCallbackForMainWorld, TestInterfaceV8Internal::supplementalStr2AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 573#endif // ENABLE(Condition11) || ENABLE(Condition12)
 574#if ENABLE(Condition11) || ENABLE(Condition12)
 575 // Attribute 'supplementalStr3' (Type: 'attribute' ExtAttr: 'CustomSetter CustomGetter Conditional ImplementedBy')
 576 {"supplementalStr3", TestInterfaceV8Internal::supplementalStr3AttrGetterCallbackForMainWorld, TestInterfaceV8Internal::supplementalStr3AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 577#endif // ENABLE(Condition11) || ENABLE(Condition12)
 578#if ENABLE(Condition11) || ENABLE(Condition12)
 579 // Attribute 'supplementalNode' (Type: 'attribute' ExtAttr: 'Conditional ImplementedBy')
 580 {"supplementalNode", TestInterfaceV8Internal::supplementalNodeAttrGetterCallbackForMainWorld, TestInterfaceV8Internal::supplementalNodeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 581#endif // ENABLE(Condition11) || ENABLE(Condition12)
 582};
 583
384584static const V8DOMConfiguration::BatchedMethod V8TestInterfaceMethods[] = {
385585#if ENABLE(Condition11) || ENABLE(Condition12)
386586 {"supplementalMethod1", TestInterfaceV8Internal::supplementalMethod1MethodCallback},

@@v8::Handle<v8::Value> V8TestInterface::constructorCallback(const v8::Arguments&
418618 return TestInterfaceV8Internal::constructor(args);
419619}
420620
421 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 621static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
422622{
423623 desc->ReadOnlyPrototype();
424624

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8:
436636 UNUSED_PARAM(proto); // In some cases, it will not be used.
437637
438638
 639 if (currentWorldType == MainWorld)
 640 V8DOMConfiguration::addToTemplate(desc, V8TestInterfaceAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestInterfaceAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 641
439642 // Custom Signature 'supplementalMethod2'
440643 const int supplementalMethod2Argc = 2;
441  v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, worldType) };
 644 v8::Handle<v8::FunctionTemplate> supplementalMethod2Argv[supplementalMethod2Argc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) };
442645 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(desc, supplementalMethod2Argc, supplementalMethod2Argv);
443646#if ENABLE(Condition11) || ENABLE(Condition12)
444647 proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2MethodCallback, v8Undefined(), supplementalMethod2Signature));

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestInterfaceTemplate(v8:
453656 return desc;
454657}
455658
456 v8::Persistent<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 659v8::Persistent<v8::FunctionTemplate> V8TestInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
457660{
458661 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
459  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
460  if (result != data->templateMap(worldType).end())
 662 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 663 if (result != data->templateMap(currentWorldType).end())
461664 return result->value;
462665
463666 v8::HandleScope handleScope;
464667 v8::Persistent<v8::FunctionTemplate> templ =
465  ConfigureV8TestInterfaceTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
466  data->templateMap(worldType).add(&info, templ);
 668 ConfigureV8TestInterfaceTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 669 data->templateMap(currentWorldType).add(&info, templ);
467670 return templ;
468671}
469672
470 bool V8TestInterface::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 673bool V8TestInterface::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
471674{
472  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 675 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
473676}
474677
475678ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> object)

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

@@inline v8::Handle<v8::Value> toV8Fast(TestInterface* impl, const HolderContainer
8484}
8585
8686template<class HolderContainer, class Wrappable>
 87inline v8::Handle<v8::Value> toV8FastForMainWorld(TestInterface* impl, const HolderContainer& container, Wrappable* wrappable)
 88{
 89 if (UNLIKELY(!impl))
 90 return v8Null(container.GetIsolate());
 91 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 92 if (!wrapper.IsEmpty())
 93 return wrapper;
 94 return wrap(impl, container.Holder(), container.GetIsolate());
 95}
 96
 97template<class HolderContainer, class Wrappable>
 98inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestInterface > impl, const HolderContainer& container, Wrappable* wrappable)
 99{
 100 return toV8FastForMainWorld(impl.get(), container, wrappable);
 101}
 102
 103
 104template<class HolderContainer, class Wrappable>
87105inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestInterface > impl, const HolderContainer& container, Wrappable* wrappable)
88106{
89107 return toV8Fast(impl.get(), container, wrappable);

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

@@static const V8DOMConfiguration::BatchedMethod V8TestMediaQueryListListenerMetho
9292 {"method", TestMediaQueryListListenerV8Internal::methodMethodCallback},
9393};
9494
95 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestMediaQueryListListenerTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 95static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestMediaQueryListListenerTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
9696{
9797 desc->ReadOnlyPrototype();
9898

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestMediaQueryListListene
107107 UNUSED_PARAM(proto); // In some cases, it will not be used.
108108
109109
 110 if (currentWorldType == MainWorld)
 111 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 112
110113 // Custom toString template
111114 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
112115 return desc;
113116}
114117
115 v8::Persistent<v8::FunctionTemplate> V8TestMediaQueryListListener::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 118v8::Persistent<v8::FunctionTemplate> V8TestMediaQueryListListener::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
116119{
117120 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
118  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
119  if (result != data->templateMap(worldType).end())
 121 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 122 if (result != data->templateMap(currentWorldType).end())
120123 return result->value;
121124
122125 v8::HandleScope handleScope;
123126 v8::Persistent<v8::FunctionTemplate> templ =
124  ConfigureV8TestMediaQueryListListenerTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
125  data->templateMap(worldType).add(&info, templ);
 127 ConfigureV8TestMediaQueryListListenerTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 128 data->templateMap(currentWorldType).add(&info, templ);
126129 return templ;
127130}
128131
129 bool V8TestMediaQueryListListener::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 132bool V8TestMediaQueryListListener::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
130133{
131  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 134 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
132135}
133136
134137

Source/WebCore/bindings/scripts/test/V8/V8TestMediaQueryListListener.h

@@inline v8::Handle<v8::Value> toV8Fast(TestMediaQueryListListener* impl, const Ho
8080}
8181
8282template<class HolderContainer, class Wrappable>
 83inline v8::Handle<v8::Value> toV8FastForMainWorld(TestMediaQueryListListener* impl, const HolderContainer& container, Wrappable* wrappable)
 84{
 85 if (UNLIKELY(!impl))
 86 return v8Null(container.GetIsolate());
 87 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 88 if (!wrapper.IsEmpty())
 89 return wrapper;
 90 return wrap(impl, container.Holder(), container.GetIsolate());
 91}
 92
 93template<class HolderContainer, class Wrappable>
 94inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestMediaQueryListListener > impl, const HolderContainer& container, Wrappable* wrappable)
 95{
 96 return toV8FastForMainWorld(impl.get(), container, wrappable);
 97}
 98
 99
 100template<class HolderContainer, class Wrappable>
83101inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestMediaQueryListListener > impl, const HolderContainer& container, Wrappable* wrappable)
84102{
85103 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> V8TestNamedConstructorConstructorCallback(const v8:
109109 return setDOMException(ec, args.GetIsolate());
110110}
111111
112 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 112v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
113113{
114114 static v8::Persistent<v8::FunctionTemplate> cachedTemplate;
115115 if (!cachedTemplate.IsEmpty())

@@v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructorConstructor::GetTempl
121121 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate();
122122 instance->SetInternalFieldCount(V8TestNamedConstructor::internalFieldCount);
123123 result->SetClassName(v8::String::NewSymbol("TestNamedConstructor"));
124  result->Inherit(V8TestNamedConstructor::GetTemplate(isolate, worldType));
 124 result->Inherit(V8TestNamedConstructor::GetTemplate(isolate, currentWorldType));
125125
126126 cachedTemplate = v8::Persistent<v8::FunctionTemplate>::New(isolate, result);
127127 return cachedTemplate;
128128}
129129
130 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNamedConstructorTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 130static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNamedConstructorTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
131131{
132132 desc->ReadOnlyPrototype();
133133

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNamedConstructorTempl
138138 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
139139
140140
 141 if (currentWorldType == MainWorld)
 142 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 143
141144 // Custom toString template
142145 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
143146 return desc;
144147}
145148
146 v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 149v8::Persistent<v8::FunctionTemplate> V8TestNamedConstructor::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
147150{
148151 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
149  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
150  if (result != data->templateMap(worldType).end())
 152 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 153 if (result != data->templateMap(currentWorldType).end())
151154 return result->value;
152155
153156 v8::HandleScope handleScope;
154157 v8::Persistent<v8::FunctionTemplate> templ =
155  ConfigureV8TestNamedConstructorTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
156  data->templateMap(worldType).add(&info, templ);
 158 ConfigureV8TestNamedConstructorTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 159 data->templateMap(currentWorldType).add(&info, templ);
157160 return templ;
158161}
159162
160 bool V8TestNamedConstructor::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 163bool V8TestNamedConstructor::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
161164{
162  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 165 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
163166}
164167
165168ActiveDOMObject* V8TestNamedConstructor::toActiveDOMObject(v8::Handle<v8::Object> object)

Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.h

@@inline v8::Handle<v8::Value> toV8Fast(TestNamedConstructor* impl, const HolderCo
8787}
8888
8989template<class HolderContainer, class Wrappable>
 90inline v8::Handle<v8::Value> toV8FastForMainWorld(TestNamedConstructor* impl, const HolderContainer& container, Wrappable* wrappable)
 91{
 92 if (UNLIKELY(!impl))
 93 return v8Null(container.GetIsolate());
 94 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 95 if (!wrapper.IsEmpty())
 96 return wrapper;
 97 return wrap(impl, container.Holder(), container.GetIsolate());
 98}
 99
 100template<class HolderContainer, class Wrappable>
 101inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestNamedConstructor > impl, const HolderContainer& container, Wrappable* wrappable)
 102{
 103 return toV8FastForMainWorld(impl.get(), container, wrappable);
 104}
 105
 106
 107template<class HolderContainer, class Wrappable>
90108inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestNamedConstructor > impl, const HolderContainer& container, Wrappable* wrappable)
91109{
92110 return toV8Fast(impl.get(), container, wrappable);

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

@@v8::Handle<v8::Value> V8TestNode::constructorCallback(const v8::Arguments& args)
9393 return TestNodeV8Internal::constructor(args);
9494}
9595
96 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 96static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestNodeTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
9797{
9898 desc->ReadOnlyPrototype();
9999
100100 v8::Local<v8::Signature> defaultSignature;
101  defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V8Node::GetTemplate(isolate, worldType), V8TestNode::internalFieldCount,
 101 defaultSignature = V8DOMConfiguration::configureTemplate(desc, "TestNode", V8Node::GetTemplate(isolate, currentWorldType), V8TestNode::internalFieldCount,
102102 0, 0,
103103 0, 0, isolate);
104104 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used.
105105 desc->SetCallHandler(V8TestNode::constructorCallback);
106106
107107
 108 if (currentWorldType == MainWorld)
 109 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 110
108111 // Custom toString template
109112 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
110113 return desc;
111114}
112115
113 v8::Persistent<v8::FunctionTemplate> V8TestNode::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 116v8::Persistent<v8::FunctionTemplate> V8TestNode::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
114117{
115118 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
116  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
117  if (result != data->templateMap(worldType).end())
 119 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 120 if (result != data->templateMap(currentWorldType).end())
118121 return result->value;
119122
120123 v8::HandleScope handleScope;
121124 v8::Persistent<v8::FunctionTemplate> templ =
122  ConfigureV8TestNodeTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
123  data->templateMap(worldType).add(&info, templ);
 125 ConfigureV8TestNodeTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 126 data->templateMap(currentWorldType).add(&info, templ);
124127 return templ;
125128}
126129
127 bool V8TestNode::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 130bool V8TestNode::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
128131{
129  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 132 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
130133}
131134
132135EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object)

Source/WebCore/bindings/scripts/test/V8/V8TestNode.h

@@inline v8::Handle<v8::Value> toV8Fast(TestNode* impl, const HolderContainer& con
8282}
8383
8484template<class HolderContainer, class Wrappable>
 85inline v8::Handle<v8::Value> toV8FastForMainWorld(TestNode* impl, const HolderContainer& container, Wrappable* wrappable)
 86{
 87 if (UNLIKELY(!impl))
 88 return v8Null(container.GetIsolate());
 89 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 90 if (!wrapper.IsEmpty())
 91 return wrapper;
 92 return wrap(impl, container.Holder(), container.GetIsolate());
 93}
 94
 95template<class HolderContainer, class Wrappable>
 96inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestNode > impl, const HolderContainer& container, Wrappable* wrappable)
 97{
 98 return toV8FastForMainWorld(impl.get(), container, wrappable);
 99}
 100
 101
 102template<class HolderContainer, class Wrappable>
85103inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestNode > impl, const HolderContainer& container, Wrappable* wrappable)
86104{
87105 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> readOnlyLongAttrAttrGetterCallback(v8::Local<v8::St
123123 return TestObjV8Internal::readOnlyLongAttrAttrGetter(name, info);
124124}
125125
 126static v8::Handle<v8::Value> readOnlyLongAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 127{
 128 TestObj* imp = V8TestObj::toNative(info.Holder());
 129 return v8Integer(imp->readOnlyLongAttr(), info.GetIsolate());
 130}
 131
 132static v8::Handle<v8::Value> readOnlyLongAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 133{
 134 return TestObjV8Internal::readOnlyLongAttrAttrGetterForMainWorld(name, info);
 135}
 136
126137static v8::Handle<v8::Value> readOnlyStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
127138{
128139 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> readOnlyStringAttrAttrGetterCallback(v8::Local<v8::
134145 return TestObjV8Internal::readOnlyStringAttrAttrGetter(name, info);
135146}
136147
 148static v8::Handle<v8::Value> readOnlyStringAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 149{
 150 TestObj* imp = V8TestObj::toNative(info.Holder());
 151 return v8String(imp->readOnlyStringAttr(), info.GetIsolate(), ReturnUnsafeHandle);
 152}
 153
 154static v8::Handle<v8::Value> readOnlyStringAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 155{
 156 return TestObjV8Internal::readOnlyStringAttrAttrGetterForMainWorld(name, info);
 157}
 158
137159static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
138160{
139161 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetterCallback(v8::Local<v8:
152174 return TestObjV8Internal::readOnlyTestObjAttrAttrGetter(name, info);
153175}
154176
 177static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 178{
 179 TestObj* imp = V8TestObj::toNative(info.Holder());
 180 RefPtr<TestObj> result = imp->readOnlyTestObjAttr();
 181 v8::Handle<v8::Value> wrapper = result.get() ? v8::Handle<v8::Value>(DOMDataStore::getWrapper(result.get(), info.GetIsolate())) : v8Undefined();
 182 if (wrapper.IsEmpty()) {
 183 wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
 184 if (!wrapper.IsEmpty())
 185 V8HiddenPropertyName::setNamedHiddenReference(info.Holder(), "readOnlyTestObjAttr", wrapper);
 186 }
 187 return wrapper;
 188}
 189
 190static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 191{
 192 return TestObjV8Internal::readOnlyTestObjAttrAttrGetterForMainWorld(name, info);
 193}
 194
155195static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
156196{
157197 return v8Integer(TestObj::staticReadOnlyLongAttr(), info.GetIsolate());

@@static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetterCallback(v8::Local<
162202 return TestObjV8Internal::staticReadOnlyLongAttrAttrGetter(name, info);
163203}
164204
 205static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 206{
 207 return v8Integer(TestObj::staticReadOnlyLongAttr(), info.GetIsolate());
 208}
 209
 210static v8::Handle<v8::Value> staticReadOnlyLongAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 211{
 212 return TestObjV8Internal::staticReadOnlyLongAttrAttrGetterForMainWorld(name, info);
 213}
 214
165215static v8::Handle<v8::Value> staticStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
166216{
167217 return v8String(TestObj::staticStringAttr(), info.GetIsolate(), ReturnUnsafeHandle);

@@static v8::Handle<v8::Value> staticStringAttrAttrGetterCallback(v8::Local<v8::St
172222 return TestObjV8Internal::staticStringAttrAttrGetter(name, info);
173223}
174224
 225static v8::Handle<v8::Value> staticStringAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 226{
 227 return v8String(TestObj::staticStringAttr(), info.GetIsolate(), ReturnUnsafeHandle);
 228}
 229
 230static v8::Handle<v8::Value> staticStringAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 231{
 232 return TestObjV8Internal::staticStringAttrAttrGetterForMainWorld(name, info);
 233}
 234
175235static void staticStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
176236{
177237 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);

@@static void staticStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::L
184244 TestObjV8Internal::staticStringAttrAttrSetter(name, value, info);
185245}
186246
 247static void staticStringAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 248{
 249 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 250 TestObj::setStaticStringAttr(v);
 251 return;
 252}
 253
 254static void staticStringAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 255{
 256 TestObjV8Internal::staticStringAttrAttrSetterForMainWorld(name, value, info);
 257}
 258
187259static v8::Handle<v8::Value> enumAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
188260{
189261 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> enumAttrAttrGetterCallback(v8::Local<v8::String> na
195267 return TestObjV8Internal::enumAttrAttrGetter(name, info);
196268}
197269
 270static v8::Handle<v8::Value> enumAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 271{
 272 TestObj* imp = V8TestObj::toNative(info.Holder());
 273 return v8String(imp->enumAttr(), info.GetIsolate(), ReturnUnsafeHandle);
 274}
 275
 276static v8::Handle<v8::Value> enumAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 277{
 278 return TestObjV8Internal::enumAttrAttrGetterForMainWorld(name, info);
 279}
 280
198281static void enumAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
199282{
200283 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void enumAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8:
211294 TestObjV8Internal::enumAttrAttrSetter(name, value, info);
212295}
213296
 297static void enumAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 298{
 299 TestObj* imp = V8TestObj::toNative(info.Holder());
 300 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 301 String string = v;
 302 if (!(string == "" || string == "EnumValue1" || string == "EnumValue2" || string == "EnumValue3"))
 303 return;
 304 imp->setEnumAttr(v);
 305 return;
 306}
 307
 308static void enumAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 309{
 310 TestObjV8Internal::enumAttrAttrSetterForMainWorld(name, value, info);
 311}
 312
214313static v8::Handle<v8::Value> shortAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
215314{
216315 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> shortAttrAttrGetterCallback(v8::Local<v8::String> n
222321 return TestObjV8Internal::shortAttrAttrGetter(name, info);
223322}
224323
 324static v8::Handle<v8::Value> shortAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 325{
 326 TestObj* imp = V8TestObj::toNative(info.Holder());
 327 return v8Integer(imp->shortAttr(), info.GetIsolate());
 328}
 329
 330static v8::Handle<v8::Value> shortAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 331{
 332 return TestObjV8Internal::shortAttrAttrGetterForMainWorld(name, info);
 333}
 334
225335static void shortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
226336{
227337 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void shortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8
235345 TestObjV8Internal::shortAttrAttrSetter(name, value, info);
236346}
237347
 348static void shortAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 349{
 350 TestObj* imp = V8TestObj::toNative(info.Holder());
 351 int v = toInt32(value);
 352 imp->setShortAttr(v);
 353 return;
 354}
 355
 356static void shortAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 357{
 358 TestObjV8Internal::shortAttrAttrSetterForMainWorld(name, value, info);
 359}
 360
238361static v8::Handle<v8::Value> unsignedShortAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
239362{
240363 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> unsignedShortAttrAttrGetterCallback(v8::Local<v8::S
246369 return TestObjV8Internal::unsignedShortAttrAttrGetter(name, info);
247370}
248371
 372static v8::Handle<v8::Value> unsignedShortAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 373{
 374 TestObj* imp = V8TestObj::toNative(info.Holder());
 375 return v8Integer(imp->unsignedShortAttr(), info.GetIsolate());
 376}
 377
 378static v8::Handle<v8::Value> unsignedShortAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 379{
 380 return TestObjV8Internal::unsignedShortAttrAttrGetterForMainWorld(name, info);
 381}
 382
249383static void unsignedShortAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
250384{
251385 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void unsignedShortAttrAttrSetterCallback(v8::Local<v8::String> name, v8::
259393 TestObjV8Internal::unsignedShortAttrAttrSetter(name, value, info);
260394}
261395
 396static void unsignedShortAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 397{
 398 TestObj* imp = V8TestObj::toNative(info.Holder());
 399 int v = toUInt32(value);
 400 imp->setUnsignedShortAttr(v);
 401 return;
 402}
 403
 404static void unsignedShortAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 405{
 406 TestObjV8Internal::unsignedShortAttrAttrSetterForMainWorld(name, value, info);
 407}
 408
262409static v8::Handle<v8::Value> longAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
263410{
264411 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> longAttrAttrGetterCallback(v8::Local<v8::String> na
270417 return TestObjV8Internal::longAttrAttrGetter(name, info);
271418}
272419
 420static v8::Handle<v8::Value> longAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 421{
 422 TestObj* imp = V8TestObj::toNative(info.Holder());
 423 return v8Integer(imp->longAttr(), info.GetIsolate());
 424}
 425
 426static v8::Handle<v8::Value> longAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 427{
 428 return TestObjV8Internal::longAttrAttrGetterForMainWorld(name, info);
 429}
 430
273431static void longAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
274432{
275433 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void longAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8:
283441 TestObjV8Internal::longAttrAttrSetter(name, value, info);
284442}
285443
 444static void longAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 445{
 446 TestObj* imp = V8TestObj::toNative(info.Holder());
 447 int v = toInt32(value);
 448 imp->setLongAttr(v);
 449 return;
 450}
 451
 452static void longAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 453{
 454 TestObjV8Internal::longAttrAttrSetterForMainWorld(name, value, info);
 455}
 456
286457static v8::Handle<v8::Value> longLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
287458{
288459 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> longLongAttrAttrGetterCallback(v8::Local<v8::String
294465 return TestObjV8Internal::longLongAttrAttrGetter(name, info);
295466}
296467
 468static v8::Handle<v8::Value> longLongAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 469{
 470 TestObj* imp = V8TestObj::toNative(info.Holder());
 471 return v8::Number::New(static_cast<double>(imp->longLongAttr()));
 472}
 473
 474static v8::Handle<v8::Value> longLongAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 475{
 476 return TestObjV8Internal::longLongAttrAttrGetterForMainWorld(name, info);
 477}
 478
297479static void longLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
298480{
299481 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void longLongAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local
307489 TestObjV8Internal::longLongAttrAttrSetter(name, value, info);
308490}
309491
 492static void longLongAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 493{
 494 TestObj* imp = V8TestObj::toNative(info.Holder());
 495 long long v = toInt64(value);
 496 imp->setLongLongAttr(v);
 497 return;
 498}
 499
 500static void longLongAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 501{
 502 TestObjV8Internal::longLongAttrAttrSetterForMainWorld(name, value, info);
 503}
 504
310505static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
311506{
312507 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterCallback(v8::Local<v8
318513 return TestObjV8Internal::unsignedLongLongAttrAttrGetter(name, info);
319514}
320515
 516static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 517{
 518 TestObj* imp = V8TestObj::toNative(info.Holder());
 519 return v8::Number::New(static_cast<double>(imp->unsignedLongLongAttr()));
 520}
 521
 522static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 523{
 524 return TestObjV8Internal::unsignedLongLongAttrAttrGetterForMainWorld(name, info);
 525}
 526
321527static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
322528{
323529 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v
331537 TestObjV8Internal::unsignedLongLongAttrAttrSetter(name, value, info);
332538}
333539
 540static void unsignedLongLongAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 541{
 542 TestObj* imp = V8TestObj::toNative(info.Holder());
 543 unsigned long long v = toInt64(value);
 544 imp->setUnsignedLongLongAttr(v);
 545 return;
 546}
 547
 548static void unsignedLongLongAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 549{
 550 TestObjV8Internal::unsignedLongLongAttrAttrSetterForMainWorld(name, value, info);
 551}
 552
334553static v8::Handle<v8::Value> stringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
335554{
336555 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> stringAttrAttrGetterCallback(v8::Local<v8::String>
342561 return TestObjV8Internal::stringAttrAttrGetter(name, info);
343562}
344563
 564static v8::Handle<v8::Value> stringAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 565{
 566 TestObj* imp = V8TestObj::toNative(info.Holder());
 567 return v8String(imp->stringAttr(), info.GetIsolate(), ReturnUnsafeHandle);
 568}
 569
 570static v8::Handle<v8::Value> stringAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 571{
 572 return TestObjV8Internal::stringAttrAttrGetterForMainWorld(name, info);
 573}
 574
345575static void stringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
346576{
347577 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void stringAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
355585 TestObjV8Internal::stringAttrAttrSetter(name, value, info);
356586}
357587
 588static void stringAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 589{
 590 TestObj* imp = V8TestObj::toNative(info.Holder());
 591 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 592 imp->setStringAttr(v);
 593 return;
 594}
 595
 596static void stringAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 597{
 598 TestObjV8Internal::stringAttrAttrSetterForMainWorld(name, value, info);
 599}
 600
358601static v8::Handle<v8::Value> testObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
359602{
360603 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> testObjAttrAttrGetterCallback(v8::Local<v8::String>
367610 return TestObjV8Internal::testObjAttrAttrGetter(name, info);
368611}
369612
 613static v8::Handle<v8::Value> testObjAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 614{
 615 TestObj* imp = V8TestObj::toNative(info.Holder());
 616 return toV8FastForMainWorld(imp->testObjAttr(), info, imp);
 617}
 618
 619static v8::Handle<v8::Value> testObjAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 620{
 621 FeatureObserver::observe(activeDOMWindow(BindingState::instance()), FeatureObserver::TestFeature);
 622 return TestObjV8Internal::testObjAttrAttrGetterForMainWorld(name, info);
 623}
 624
370625static void testObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
371626{
372627 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void testObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
381636 TestObjV8Internal::testObjAttrAttrSetter(name, value, info);
382637}
383638
 639static void testObjAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 640{
 641 TestObj* imp = V8TestObj::toNative(info.Holder());
 642 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 643 imp->setTestObjAttr(WTF::getPtr(v));
 644 return;
 645}
 646
 647static void testObjAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 648{
 649 FeatureObserver::observe(activeDOMWindow(BindingState::instance()), FeatureObserver::TestFeature);
 650 TestObjV8Internal::testObjAttrAttrSetterForMainWorld(name, value, info);
 651}
 652
384653static v8::Handle<v8::Value> XMLObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
385654{
386655 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> XMLObjAttrAttrGetterCallback(v8::Local<v8::String>
392661 return TestObjV8Internal::XMLObjAttrAttrGetter(name, info);
393662}
394663
 664static v8::Handle<v8::Value> XMLObjAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 665{
 666 TestObj* imp = V8TestObj::toNative(info.Holder());
 667 return toV8FastForMainWorld(imp->xmlObjAttr(), info, imp);
 668}
 669
 670static v8::Handle<v8::Value> XMLObjAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 671{
 672 return TestObjV8Internal::XMLObjAttrAttrGetterForMainWorld(name, info);
 673}
 674
395675static void XMLObjAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
396676{
397677 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void XMLObjAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
405685 TestObjV8Internal::XMLObjAttrAttrSetter(name, value, info);
406686}
407687
 688static void XMLObjAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 689{
 690 TestObj* imp = V8TestObj::toNative(info.Holder());
 691 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 692 imp->setXMLObjAttr(WTF::getPtr(v));
 693 return;
 694}
 695
 696static void XMLObjAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 697{
 698 TestObjV8Internal::XMLObjAttrAttrSetterForMainWorld(name, value, info);
 699}
 700
408701static v8::Handle<v8::Value> createAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
409702{
410703 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> createAttrGetterCallback(v8::Local<v8::String> name
416709 return TestObjV8Internal::createAttrGetter(name, info);
417710}
418711
 712static v8::Handle<v8::Value> createAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 713{
 714 TestObj* imp = V8TestObj::toNative(info.Holder());
 715 return v8Boolean(imp->isCreate(), info.GetIsolate());
 716}
 717
 718static v8::Handle<v8::Value> createAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 719{
 720 return TestObjV8Internal::createAttrGetterForMainWorld(name, info);
 721}
 722
419723static void createAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
420724{
421725 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void createAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::V
429733 TestObjV8Internal::createAttrSetter(name, value, info);
430734}
431735
 736static void createAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 737{
 738 TestObj* imp = V8TestObj::toNative(info.Holder());
 739 bool v = value->BooleanValue();
 740 imp->setCreate(v);
 741 return;
 742}
 743
 744static void createAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 745{
 746 TestObjV8Internal::createAttrSetterForMainWorld(name, value, info);
 747}
 748
432749static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
433750{
434751 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallback(v8::Local<v8:
440757 return TestObjV8Internal::reflectedStringAttrAttrGetter(name, info);
441758}
442759
 760static v8::Handle<v8::Value> reflectedStringAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 761{
 762 TestObj* imp = V8TestObj::toNative(info.Holder());
 763 return v8String(imp->fastGetAttribute(WebCore::HTMLNames::reflectedstringattrAttr), info.GetIsolate(), ReturnUnsafeHandle);
 764}
 765
 766static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 767{
 768 return TestObjV8Internal::reflectedStringAttrAttrGetterForMainWorld(name, info);
 769}
 770
443771static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
444772{
445773 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8
453781 TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info);
454782}
455783
 784static void reflectedStringAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 785{
 786 TestObj* imp = V8TestObj::toNative(info.Holder());
 787 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
 788 imp->setAttribute(WebCore::HTMLNames::reflectedstringattrAttr, v);
 789 return;
 790}
 791
 792static void reflectedStringAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 793{
 794 TestObjV8Internal::reflectedStringAttrAttrSetterForMainWorld(name, value, info);
 795}
 796
456797static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
457798{
458799 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetterCallback(v8::Local<v
464805 return TestObjV8Internal::reflectedIntegralAttrAttrGetter(name, info);
465806}
466807
467 static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 808static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 809{
 810 TestObj* imp = V8TestObj::toNative(info.Holder());
 811 return v8Integer(imp->getIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr), info.GetIsolate());
 812}
 813
 814static v8::Handle<v8::Value> reflectedIntegralAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 815{
 816 return TestObjV8Internal::reflectedIntegralAttrAttrGetterForMainWorld(name, info);
 817}
 818
 819static void reflectedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
468820{
469821 TestObj* imp = V8TestObj::toNative(info.Holder());
470822 int v = toInt32(value);

@@static void reflectedIntegralAttrAttrSetterCallback(v8::Local<v8::String> name,
477829 TestObjV8Internal::reflectedIntegralAttrAttrSetter(name, value, info);
478830}
479831
 832static void reflectedIntegralAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 833{
 834 TestObj* imp = V8TestObj::toNative(info.Holder());
 835 int v = toInt32(value);
 836 imp->setIntegralAttribute(WebCore::HTMLNames::reflectedintegralattrAttr, v);
 837 return;
 838}
 839
 840static void reflectedIntegralAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 841{
 842 TestObjV8Internal::reflectedIntegralAttrAttrSetterForMainWorld(name, value, info);
 843}
 844
480845static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
481846{
482847 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetterCallback(v8:
488853 return TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetter(name, info);
489854}
490855
 856static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 857{
 858 TestObj* imp = V8TestObj::toNative(info.Holder());
 859 return v8UnsignedInteger(std::max(0, imp->getIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr)), info.GetIsolate());
 860}
 861
 862static v8::Handle<v8::Value> reflectedUnsignedIntegralAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 863{
 864 return TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetterForMainWorld(name, info);
 865}
 866
491867static void reflectedUnsignedIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
492868{
493869 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedUnsignedIntegralAttrAttrSetterCallback(v8::Local<v8::String
501877 TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter(name, value, info);
502878}
503879
 880static void reflectedUnsignedIntegralAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 881{
 882 TestObj* imp = V8TestObj::toNative(info.Holder());
 883 unsigned v = toUInt32(value);
 884 imp->setUnsignedIntegralAttribute(WebCore::HTMLNames::reflectedunsignedintegralattrAttr, v);
 885 return;
 886}
 887
 888static void reflectedUnsignedIntegralAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 889{
 890 TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetterForMainWorld(name, value, info);
 891}
 892
504893static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
505894{
506895 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetterCallback(v8::Local<v8
512901 return TestObjV8Internal::reflectedBooleanAttrAttrGetter(name, info);
513902}
514903
 904static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 905{
 906 TestObj* imp = V8TestObj::toNative(info.Holder());
 907 return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr), info.GetIsolate());
 908}
 909
 910static v8::Handle<v8::Value> reflectedBooleanAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 911{
 912 return TestObjV8Internal::reflectedBooleanAttrAttrGetterForMainWorld(name, info);
 913}
 914
515915static void reflectedBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
516916{
517917 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedBooleanAttrAttrSetterCallback(v8::Local<v8::String> name, v
525925 TestObjV8Internal::reflectedBooleanAttrAttrSetter(name, value, info);
526926}
527927
 928static void reflectedBooleanAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 929{
 930 TestObj* imp = V8TestObj::toNative(info.Holder());
 931 bool v = value->BooleanValue();
 932 imp->setBooleanAttribute(WebCore::HTMLNames::reflectedbooleanattrAttr, v);
 933 return;
 934}
 935
 936static void reflectedBooleanAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 937{
 938 TestObjV8Internal::reflectedBooleanAttrAttrSetterForMainWorld(name, value, info);
 939}
 940
528941static v8::Handle<v8::Value> reflectedURLAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
529942{
530943 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedURLAttrAttrGetterCallback(v8::Local<v8::St
536949 return TestObjV8Internal::reflectedURLAttrAttrGetter(name, info);
537950}
538951
 952static v8::Handle<v8::Value> reflectedURLAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 953{
 954 TestObj* imp = V8TestObj::toNative(info.Holder());
 955 return v8String(imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr), info.GetIsolate(), ReturnUnsafeHandle);
 956}
 957
 958static v8::Handle<v8::Value> reflectedURLAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 959{
 960 return TestObjV8Internal::reflectedURLAttrAttrGetterForMainWorld(name, info);
 961}
 962
539963static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
540964{
541965 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedURLAttrAttrSetterCallback(v8::Local<v8::String> name, v8::L
549973 TestObjV8Internal::reflectedURLAttrAttrSetter(name, value, info);
550974}
551975
 976static void reflectedURLAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 977{
 978 TestObj* imp = V8TestObj::toNative(info.Holder());
 979 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
 980 imp->setAttribute(WebCore::HTMLNames::reflectedurlattrAttr, v);
 981 return;
 982}
 983
 984static void reflectedURLAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 985{
 986 TestObjV8Internal::reflectedURLAttrAttrSetterForMainWorld(name, value, info);
 987}
 988
552989static v8::Handle<v8::Value> reflectedStringAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
553990{
554991 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallback(v8::Local<v8:
560997 return TestObjV8Internal::reflectedStringAttrAttrGetter(name, info);
561998}
562999
 1000static v8::Handle<v8::Value> reflectedStringAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1001{
 1002 TestObj* imp = V8TestObj::toNative(info.Holder());
 1003 return v8String(imp->fastGetAttribute(WebCore::HTMLNames::customContentStringAttrAttr), info.GetIsolate(), ReturnUnsafeHandle);
 1004}
 1005
 1006static v8::Handle<v8::Value> reflectedStringAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1007{
 1008 return TestObjV8Internal::reflectedStringAttrAttrGetterForMainWorld(name, info);
 1009}
 1010
5631011static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
5641012{
5651013 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedStringAttrAttrSetterCallback(v8::Local<v8::String> name, v8
5731021 TestObjV8Internal::reflectedStringAttrAttrSetter(name, value, info);
5741022}
5751023
 1024static void reflectedStringAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1025{
 1026 TestObj* imp = V8TestObj::toNative(info.Holder());
 1027 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
 1028 imp->setAttribute(WebCore::HTMLNames::customContentStringAttrAttr, v);
 1029 return;
 1030}
 1031
 1032static void reflectedStringAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1033{
 1034 TestObjV8Internal::reflectedStringAttrAttrSetterForMainWorld(name, value, info);
 1035}
 1036
5761037static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
5771038{
5781039 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetterCallback(v8::L
5841045 return TestObjV8Internal::reflectedCustomIntegralAttrAttrGetter(name, info);
5851046}
5861047
 1048static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1049{
 1050 TestObj* imp = V8TestObj::toNative(info.Holder());
 1051 return v8Integer(imp->getIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr), info.GetIsolate());
 1052}
 1053
 1054static v8::Handle<v8::Value> reflectedCustomIntegralAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1055{
 1056 return TestObjV8Internal::reflectedCustomIntegralAttrAttrGetterForMainWorld(name, info);
 1057}
 1058
5871059static void reflectedCustomIntegralAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
5881060{
5891061 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedCustomIntegralAttrAttrSetterCallback(v8::Local<v8::String>
5971069 TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter(name, value, info);
5981070}
5991071
 1072static void reflectedCustomIntegralAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1073{
 1074 TestObj* imp = V8TestObj::toNative(info.Holder());
 1075 int v = toInt32(value);
 1076 imp->setIntegralAttribute(WebCore::HTMLNames::customContentIntegralAttrAttr, v);
 1077 return;
 1078}
 1079
 1080static void reflectedCustomIntegralAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1081{
 1082 TestObjV8Internal::reflectedCustomIntegralAttrAttrSetterForMainWorld(name, value, info);
 1083}
 1084
6001085static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
6011086{
6021087 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetterCallback(v8::Lo
6081093 return TestObjV8Internal::reflectedCustomBooleanAttrAttrGetter(name, info);
6091094}
6101095
 1096static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1097{
 1098 TestObj* imp = V8TestObj::toNative(info.Holder());
 1099 return v8Boolean(imp->fastHasAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr), info.GetIsolate());
 1100}
 1101
 1102static v8::Handle<v8::Value> reflectedCustomBooleanAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1103{
 1104 return TestObjV8Internal::reflectedCustomBooleanAttrAttrGetterForMainWorld(name, info);
 1105}
 1106
6111107static void reflectedCustomBooleanAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
6121108{
6131109 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedCustomBooleanAttrAttrSetterCallback(v8::Local<v8::String> n
6211117 TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter(name, value, info);
6221118}
6231119
 1120static void reflectedCustomBooleanAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1121{
 1122 TestObj* imp = V8TestObj::toNative(info.Holder());
 1123 bool v = value->BooleanValue();
 1124 imp->setBooleanAttribute(WebCore::HTMLNames::customContentBooleanAttrAttr, v);
 1125 return;
 1126}
 1127
 1128static void reflectedCustomBooleanAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1129{
 1130 TestObjV8Internal::reflectedCustomBooleanAttrAttrSetterForMainWorld(name, value, info);
 1131}
 1132
6241133static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
6251134{
6261135 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetterCallback(v8::Local<
6321141 return TestObjV8Internal::reflectedCustomURLAttrAttrGetter(name, info);
6331142}
6341143
 1144static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1145{
 1146 TestObj* imp = V8TestObj::toNative(info.Holder());
 1147 return v8String(imp->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr), info.GetIsolate(), ReturnUnsafeHandle);
 1148}
 1149
 1150static v8::Handle<v8::Value> reflectedCustomURLAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1151{
 1152 return TestObjV8Internal::reflectedCustomURLAttrAttrGetterForMainWorld(name, info);
 1153}
 1154
6351155static void reflectedCustomURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
6361156{
6371157 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void reflectedCustomURLAttrAttrSetterCallback(v8::Local<v8::String> name,
6451165 TestObjV8Internal::reflectedCustomURLAttrAttrSetter(name, value, info);
6461166}
6471167
 1168static void reflectedCustomURLAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1169{
 1170 TestObj* imp = V8TestObj::toNative(info.Holder());
 1171 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<WithNullCheck>, v, value);
 1172 imp->setAttribute(WebCore::HTMLNames::customContentURLAttrAttr, v);
 1173 return;
 1174}
 1175
 1176static void reflectedCustomURLAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1177{
 1178 TestObjV8Internal::reflectedCustomURLAttrAttrSetterForMainWorld(name, value, info);
 1179}
 1180
6481181static v8::Handle<v8::Value> typedArrayAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
6491182{
6501183 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> typedArrayAttrAttrGetterCallback(v8::Local<v8::Stri
6561189 return TestObjV8Internal::typedArrayAttrAttrGetter(name, info);
6571190}
6581191
 1192static v8::Handle<v8::Value> typedArrayAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1193{
 1194 TestObj* imp = V8TestObj::toNative(info.Holder());
 1195 return toV8FastForMainWorld(imp->typedArrayAttr(), info, imp);
 1196}
 1197
 1198static v8::Handle<v8::Value> typedArrayAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1199{
 1200 return TestObjV8Internal::typedArrayAttrAttrGetterForMainWorld(name, info);
 1201}
 1202
6591203static void typedArrayAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
6601204{
6611205 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void typedArrayAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
6691213 TestObjV8Internal::typedArrayAttrAttrSetter(name, value, info);
6701214}
6711215
 1216static void typedArrayAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1217{
 1218 TestObj* imp = V8TestObj::toNative(info.Holder());
 1219 Float32Array* v = V8Float32Array::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8Float32Array::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1220 imp->setTypedArrayAttr(WTF::getPtr(v));
 1221 return;
 1222}
 1223
 1224static void typedArrayAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1225{
 1226 TestObjV8Internal::typedArrayAttrAttrSetterForMainWorld(name, value, info);
 1227}
 1228
6721229static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
6731230{
6741231 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterCallback(v8::Local
6841241 return TestObjV8Internal::attrWithGetterExceptionAttrGetter(name, info);
6851242}
6861243
 1244static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1245{
 1246 TestObj* imp = V8TestObj::toNative(info.Holder());
 1247 ExceptionCode ec = 0;
 1248 int v = imp->attrWithGetterException(ec);
 1249 if (UNLIKELY(ec))
 1250 return setDOMException(ec, info.GetIsolate());
 1251 return v8Integer(v, info.GetIsolate());
 1252}
 1253
 1254static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1255{
 1256 return TestObjV8Internal::attrWithGetterExceptionAttrGetterForMainWorld(name, info);
 1257}
 1258
6871259static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
6881260{
6891261 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name
6971269 TestObjV8Internal::attrWithGetterExceptionAttrSetter(name, value, info);
6981270}
6991271
 1272static void attrWithGetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1273{
 1274 TestObj* imp = V8TestObj::toNative(info.Holder());
 1275 int v = toInt32(value);
 1276 imp->setAttrWithGetterException(v);
 1277 return;
 1278}
 1279
 1280static void attrWithGetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1281{
 1282 TestObjV8Internal::attrWithGetterExceptionAttrSetterForMainWorld(name, value, info);
 1283}
 1284
7001285static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
7011286{
7021287 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterCallback(v8::Local
7081293 return TestObjV8Internal::attrWithSetterExceptionAttrGetter(name, info);
7091294}
7101295
 1296static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1297{
 1298 TestObj* imp = V8TestObj::toNative(info.Holder());
 1299 return v8Integer(imp->attrWithSetterException(), info.GetIsolate());
 1300}
 1301
 1302static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1303{
 1304 return TestObjV8Internal::attrWithSetterExceptionAttrGetterForMainWorld(name, info);
 1305}
 1306
7111307static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
7121308{
7131309 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name
7241320 TestObjV8Internal::attrWithSetterExceptionAttrSetter(name, value, info);
7251321}
7261322
 1323static void attrWithSetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1324{
 1325 TestObj* imp = V8TestObj::toNative(info.Holder());
 1326 int v = toInt32(value);
 1327 ExceptionCode ec = 0;
 1328 imp->setAttrWithSetterException(v, ec);
 1329 if (UNLIKELY(ec))
 1330 setDOMException(ec, info.GetIsolate());
 1331 return;
 1332}
 1333
 1334static void attrWithSetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1335{
 1336 TestObjV8Internal::attrWithSetterExceptionAttrSetterForMainWorld(name, value, info);
 1337}
 1338
7271339static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
7281340{
7291341 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterCallback(v8:
7391351 return TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info);
7401352}
7411353
 1354static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1355{
 1356 TestObj* imp = V8TestObj::toNative(info.Holder());
 1357 ExceptionCode ec = 0;
 1358 String v = imp->stringAttrWithGetterException(ec);
 1359 if (UNLIKELY(ec))
 1360 return setDOMException(ec, info.GetIsolate());
 1361 return v8String(v, info.GetIsolate(), ReturnUnsafeHandle);
 1362}
 1363
 1364static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1365{
 1366 return TestObjV8Internal::stringAttrWithGetterExceptionAttrGetterForMainWorld(name, info);
 1367}
 1368
7421369static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
7431370{
7441371 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String
7521379 TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info);
7531380}
7541381
 1382static void stringAttrWithGetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1383{
 1384 TestObj* imp = V8TestObj::toNative(info.Holder());
 1385 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 1386 imp->setStringAttrWithGetterException(v);
 1387 return;
 1388}
 1389
 1390static void stringAttrWithGetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1391{
 1392 TestObjV8Internal::stringAttrWithGetterExceptionAttrSetterForMainWorld(name, value, info);
 1393}
 1394
7551395static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
7561396{
7571397 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterCallback(v8:
7631403 return TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info);
7641404}
7651405
 1406static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1407{
 1408 TestObj* imp = V8TestObj::toNative(info.Holder());
 1409 return v8String(imp->stringAttrWithSetterException(), info.GetIsolate(), ReturnUnsafeHandle);
 1410}
 1411
 1412static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1413{
 1414 return TestObjV8Internal::stringAttrWithSetterExceptionAttrGetterForMainWorld(name, info);
 1415}
 1416
7661417static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
7671418{
7681419 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String
7791430 TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info);
7801431}
7811432
 1433static void stringAttrWithSetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1434{
 1435 TestObj* imp = V8TestObj::toNative(info.Holder());
 1436 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 1437 ExceptionCode ec = 0;
 1438 imp->setStringAttrWithSetterException(v, ec);
 1439 if (UNLIKELY(ec))
 1440 setDOMException(ec, info.GetIsolate());
 1441 return;
 1442}
 1443
 1444static void stringAttrWithSetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1445{
 1446 TestObjV8Internal::stringAttrWithSetterExceptionAttrSetterForMainWorld(name, value, info);
 1447}
 1448
7821449static v8::Handle<v8::Value> customAttrAttrGetterCallback(v8::Local<v8::String> name, const v8::AccessorInfo& info)
7831450{
7841451 return V8TestObj::customAttrAttrGetterCustom(name, info);
7851452}
7861453
 1454static v8::Handle<v8::Value> customAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1455{
 1456 return V8TestObj::customAttrAttrGetterCustom(name, info);
 1457}
 1458
7871459static void customAttrAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
7881460{
7891461 V8TestObj::customAttrAttrSetterCustom(name, value, info);
7901462}
7911463
 1464static void customAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1465{
 1466 V8TestObj::customAttrAttrSetterCustom(name, value, info);
 1467}
 1468
7921469static v8::Handle<v8::Value> withScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
7931470{
7941471 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptStateAttributeAttrGetterCallback(v8::Loca
8041481 return TestObjV8Internal::withScriptStateAttributeAttrGetter(name, info);
8051482}
8061483
 1484static v8::Handle<v8::Value> withScriptStateAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1485{
 1486 TestObj* imp = V8TestObj::toNative(info.Holder());
 1487 ScriptState* currentState = ScriptState::current();
 1488 if (!currentState)
 1489 return v8Undefined();
 1490 ScriptState& state = *currentState;
 1491 return v8Integer(imp->withScriptStateAttribute(&state), info.GetIsolate());
 1492}
 1493
 1494static v8::Handle<v8::Value> withScriptStateAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1495{
 1496 return TestObjV8Internal::withScriptStateAttributeAttrGetterForMainWorld(name, info);
 1497}
 1498
8071499static void withScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
8081500{
8091501 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptStateAttributeAttrSetterCallback(v8::Local<v8::String> nam
8231515 TestObjV8Internal::withScriptStateAttributeAttrSetter(name, value, info);
8241516}
8251517
 1518static void withScriptStateAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1519{
 1520 TestObj* imp = V8TestObj::toNative(info.Holder());
 1521 int v = toInt32(value);
 1522 ScriptState* currentState = ScriptState::current();
 1523 if (!currentState)
 1524 return;
 1525 ScriptState& state = *currentState;
 1526 imp->setWithScriptStateAttribute(&state, v);
 1527 if (state.hadException())
 1528 throwError(state.exception(), info.GetIsolate());
 1529 return;
 1530}
 1531
 1532static void withScriptStateAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1533{
 1534 TestObjV8Internal::withScriptStateAttributeAttrSetterForMainWorld(name, value, info);
 1535}
 1536
8261537static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
8271538{
8281539 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetterCallba
8351546 return TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter(name, info);
8361547}
8371548
 1549static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1550{
 1551 TestObj* imp = V8TestObj::toNative(info.Holder());
 1552 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1553 return toV8FastForMainWorld(imp->withScriptExecutionContextAttribute(scriptContext), info, imp);
 1554}
 1555
 1556static v8::Handle<v8::Value> withScriptExecutionContextAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1557{
 1558 return TestObjV8Internal::withScriptExecutionContextAttributeAttrGetterForMainWorld(name, info);
 1559}
 1560
8381561static void withScriptExecutionContextAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
8391562{
8401563 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptExecutionContextAttributeAttrSetterCallback(v8::Local<v8::
8491572 TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter(name, value, info);
8501573}
8511574
 1575static void withScriptExecutionContextAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1576{
 1577 TestObj* imp = V8TestObj::toNative(info.Holder());
 1578 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1579 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1580 imp->setWithScriptExecutionContextAttribute(scriptContext, WTF::getPtr(v));
 1581 return;
 1582}
 1583
 1584static void withScriptExecutionContextAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1585{
 1586 TestObjV8Internal::withScriptExecutionContextAttributeAttrSetterForMainWorld(name, value, info);
 1587}
 1588
8521589static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
8531590{
8541591 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetterCallback(v8
8701607 return TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter(name, info);
8711608}
8721609
 1610static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1611{
 1612 TestObj* imp = V8TestObj::toNative(info.Holder());
 1613 ExceptionCode ec = 0;
 1614 ScriptState* currentState = ScriptState::current();
 1615 if (!currentState)
 1616 return v8Undefined();
 1617 ScriptState& state = *currentState;
 1618 RefPtr<TestObj> v = imp->withScriptStateAttributeRaises(&state, ec);
 1619 if (UNLIKELY(ec))
 1620 return setDOMException(ec, info.GetIsolate());
 1621 if (state.hadException())
 1622 return throwError(state.exception(), info.GetIsolate());
 1623 return toV8FastForMainWorld(v.release(), info, imp);
 1624}
 1625
 1626static v8::Handle<v8::Value> withScriptStateAttributeRaisesAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1627{
 1628 return TestObjV8Internal::withScriptStateAttributeRaisesAttrGetterForMainWorld(name, info);
 1629}
 1630
8731631static void withScriptStateAttributeRaisesAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
8741632{
8751633 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptStateAttributeRaisesAttrSetterCallback(v8::Local<v8::Strin
8891647 TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter(name, value, info);
8901648}
8911649
 1650static void withScriptStateAttributeRaisesAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1651{
 1652 TestObj* imp = V8TestObj::toNative(info.Holder());
 1653 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1654 ScriptState* currentState = ScriptState::current();
 1655 if (!currentState)
 1656 return;
 1657 ScriptState& state = *currentState;
 1658 imp->setWithScriptStateAttributeRaises(&state, WTF::getPtr(v));
 1659 if (state.hadException())
 1660 throwError(state.exception(), info.GetIsolate());
 1661 return;
 1662}
 1663
 1664static void withScriptStateAttributeRaisesAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1665{
 1666 TestObjV8Internal::withScriptStateAttributeRaisesAttrSetterForMainWorld(name, value, info);
 1667}
 1668
8921669static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
8931670{
8941671 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetter
9051682 return TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter(name, info);
9061683}
9071684
 1685static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1686{
 1687 TestObj* imp = V8TestObj::toNative(info.Holder());
 1688 ExceptionCode ec = 0;
 1689 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1690 RefPtr<TestObj> v = imp->withScriptExecutionContextAttributeRaises(scriptContext, ec);
 1691 if (UNLIKELY(ec))
 1692 return setDOMException(ec, info.GetIsolate());
 1693 return toV8FastForMainWorld(v.release(), info, imp);
 1694}
 1695
 1696static v8::Handle<v8::Value> withScriptExecutionContextAttributeRaisesAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1697{
 1698 return TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetterForMainWorld(name, info);
 1699}
 1700
9081701static void withScriptExecutionContextAttributeRaisesAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
9091702{
9101703 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptExecutionContextAttributeRaisesAttrSetterCallback(v8::Loca
9191712 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter(name, value, info);
9201713}
9211714
 1715static void withScriptExecutionContextAttributeRaisesAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1716{
 1717 TestObj* imp = V8TestObj::toNative(info.Holder());
 1718 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1719 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1720 imp->setWithScriptExecutionContextAttributeRaises(scriptContext, WTF::getPtr(v));
 1721 return;
 1722}
 1723
 1724static void withScriptExecutionContextAttributeRaisesAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1725{
 1726 TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetterForMainWorld(name, value, info);
 1727}
 1728
9221729static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
9231730{
9241731 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAt
9351742 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter(name, info);
9361743}
9371744
 1745static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1746{
 1747 TestObj* imp = V8TestObj::toNative(info.Holder());
 1748 ScriptState* currentState = ScriptState::current();
 1749 if (!currentState)
 1750 return v8Undefined();
 1751 ScriptState& state = *currentState;
 1752 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1753 return toV8FastForMainWorld(imp->withScriptExecutionContextAndScriptStateAttribute(&state, scriptContext), info, imp);
 1754}
 1755
 1756static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1757{
 1758 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetterForMainWorld(name, info);
 1759}
 1760
9381761static void withScriptExecutionContextAndScriptStateAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
9391762{
9401763 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallback(
9551778 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter(name, value, info);
9561779}
9571780
 1781static void withScriptExecutionContextAndScriptStateAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1782{
 1783 TestObj* imp = V8TestObj::toNative(info.Holder());
 1784 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1785 ScriptState* currentState = ScriptState::current();
 1786 if (!currentState)
 1787 return;
 1788 ScriptState& state = *currentState;
 1789 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1790 imp->setWithScriptExecutionContextAndScriptStateAttribute(&state, scriptContext, WTF::getPtr(v));
 1791 if (state.hadException())
 1792 throwError(state.exception(), info.GetIsolate());
 1793 return;
 1794}
 1795
 1796static void withScriptExecutionContextAndScriptStateAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1797{
 1798 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetterForMainWorld(name, value, info);
 1799}
 1800
9581801static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
9591802{
9601803 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRa
9771820 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter(name, info);
9781821}
9791822
 1823static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1824{
 1825 TestObj* imp = V8TestObj::toNative(info.Holder());
 1826 ExceptionCode ec = 0;
 1827 ScriptState* currentState = ScriptState::current();
 1828 if (!currentState)
 1829 return v8Undefined();
 1830 ScriptState& state = *currentState;
 1831 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1832 RefPtr<TestObj> v = imp->withScriptExecutionContextAndScriptStateAttributeRaises(&state, scriptContext, ec);
 1833 if (UNLIKELY(ec))
 1834 return setDOMException(ec, info.GetIsolate());
 1835 if (state.hadException())
 1836 return throwError(state.exception(), info.GetIsolate());
 1837 return toV8FastForMainWorld(v.release(), info, imp);
 1838}
 1839
 1840static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1841{
 1842 return TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterForMainWorld(name, info);
 1843}
 1844
9801845static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
9811846{
9821847 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCal
9971862 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter(name, value, info);
9981863}
9991864
 1865static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1866{
 1867 TestObj* imp = V8TestObj::toNative(info.Holder());
 1868 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1869 ScriptState* currentState = ScriptState::current();
 1870 if (!currentState)
 1871 return;
 1872 ScriptState& state = *currentState;
 1873 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1874 imp->setWithScriptExecutionContextAndScriptStateAttributeRaises(&state, scriptContext, WTF::getPtr(v));
 1875 if (state.hadException())
 1876 throwError(state.exception(), info.GetIsolate());
 1877 return;
 1878}
 1879
 1880static void withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1881{
 1882 TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterForMainWorld(name, value, info);
 1883}
 1884
10001885static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
10011886{
10021887 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesA
10131898 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter(name, info);
10141899}
10151900
 1901static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1902{
 1903 TestObj* imp = V8TestObj::toNative(info.Holder());
 1904 ScriptState* currentState = ScriptState::current();
 1905 if (!currentState)
 1906 return v8Undefined();
 1907 ScriptState& state = *currentState;
 1908 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1909 return toV8FastForMainWorld(imp->withScriptExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext), info, imp);
 1910}
 1911
 1912static v8::Handle<v8::Value> withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1913{
 1914 return TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterForMainWorld(name, info);
 1915}
 1916
10161917static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
10171918{
10181919 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSette
10331934 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter(name, value, info);
10341935}
10351936
 1937static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1938{
 1939 TestObj* imp = V8TestObj::toNative(info.Holder());
 1940 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1941 ScriptState* currentState = ScriptState::current();
 1942 if (!currentState)
 1943 return;
 1944 ScriptState& state = *currentState;
 1945 ScriptExecutionContext* scriptContext = getScriptExecutionContext();
 1946 imp->setWithScriptExecutionContextAndScriptStateWithSpacesAttribute(&state, scriptContext, WTF::getPtr(v));
 1947 if (state.hadException())
 1948 throwError(state.exception(), info.GetIsolate());
 1949 return;
 1950}
 1951
 1952static void withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1953{
 1954 TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterForMainWorld(name, value, info);
 1955}
 1956
10361957static v8::Handle<v8::Value> withScriptArgumentsAndCallStackAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
10371958{
10381959 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> withScriptArgumentsAndCallStackAttributeAttrGetterC
10441965 return TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetter(name, info);
10451966}
10461967
 1968static v8::Handle<v8::Value> withScriptArgumentsAndCallStackAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1969{
 1970 TestObj* imp = V8TestObj::toNative(info.Holder());
 1971 return toV8FastForMainWorld(imp->withScriptArgumentsAndCallStackAttribute(), info, imp);
 1972}
 1973
 1974static v8::Handle<v8::Value> withScriptArgumentsAndCallStackAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 1975{
 1976 return TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetterForMainWorld(name, info);
 1977}
 1978
10471979static void withScriptArgumentsAndCallStackAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
10481980{
10491981 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void withScriptArgumentsAndCallStackAttributeAttrSetterCallback(v8::Local
10571989 TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter(name, value, info);
10581990}
10591991
 1992static void withScriptArgumentsAndCallStackAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 1993{
 1994 TestObj* imp = V8TestObj::toNative(info.Holder());
 1995 TestObj* v = V8TestObj::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8TestObj::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 1996 imp->setWithScriptArgumentsAndCallStackAttribute(WTF::getPtr(v));
 1997 return;
 1998}
 1999
 2000static void withScriptArgumentsAndCallStackAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2001{
 2002 TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetterForMainWorld(name, value, info);
 2003}
 2004
10602005#if ENABLE(Condition1)
10612006
10622007static v8::Handle<v8::Value> conditionalAttr1AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)

@@static v8::Handle<v8::Value> conditionalAttr1AttrGetterCallback(v8::Local<v8::St
10782023
10792024#if ENABLE(Condition1)
10802025
 2026static v8::Handle<v8::Value> conditionalAttr1AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2027{
 2028 TestObj* imp = V8TestObj::toNative(info.Holder());
 2029 return v8Integer(imp->conditionalAttr1(), info.GetIsolate());
 2030}
 2031
 2032#endif // ENABLE(Condition1)
 2033
 2034#if ENABLE(Condition1)
 2035
 2036static v8::Handle<v8::Value> conditionalAttr1AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2037{
 2038 return TestObjV8Internal::conditionalAttr1AttrGetterForMainWorld(name, info);
 2039}
 2040
 2041#endif // ENABLE(Condition1)
 2042
 2043#if ENABLE(Condition1)
 2044
10812045static void conditionalAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
10822046{
10832047 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void conditionalAttr1AttrSetterCallback(v8::Local<v8::String> name, v8::L
10972061
10982062#endif // ENABLE(Condition1)
10992063
 2064#if ENABLE(Condition1)
 2065
 2066static void conditionalAttr1AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2067{
 2068 TestObj* imp = V8TestObj::toNative(info.Holder());
 2069 int v = toInt32(value);
 2070 imp->setConditionalAttr1(v);
 2071 return;
 2072}
 2073
 2074#endif // ENABLE(Condition1)
 2075
 2076#if ENABLE(Condition1)
 2077
 2078static void conditionalAttr1AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2079{
 2080 TestObjV8Internal::conditionalAttr1AttrSetterForMainWorld(name, value, info);
 2081}
 2082
 2083#endif // ENABLE(Condition1)
 2084
11002085#if ENABLE(Condition1) && ENABLE(Condition2)
11012086
11022087static v8::Handle<v8::Value> conditionalAttr2AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)

@@static v8::Handle<v8::Value> conditionalAttr2AttrGetterCallback(v8::Local<v8::St
11182103
11192104#if ENABLE(Condition1) && ENABLE(Condition2)
11202105
 2106static v8::Handle<v8::Value> conditionalAttr2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2107{
 2108 TestObj* imp = V8TestObj::toNative(info.Holder());
 2109 return v8Integer(imp->conditionalAttr2(), info.GetIsolate());
 2110}
 2111
 2112#endif // ENABLE(Condition1) && ENABLE(Condition2)
 2113
 2114#if ENABLE(Condition1) && ENABLE(Condition2)
 2115
 2116static v8::Handle<v8::Value> conditionalAttr2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2117{
 2118 return TestObjV8Internal::conditionalAttr2AttrGetterForMainWorld(name, info);
 2119}
 2120
 2121#endif // ENABLE(Condition1) && ENABLE(Condition2)
 2122
 2123#if ENABLE(Condition1) && ENABLE(Condition2)
 2124
11212125static void conditionalAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
11222126{
11232127 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void conditionalAttr2AttrSetterCallback(v8::Local<v8::String> name, v8::L
11372141
11382142#endif // ENABLE(Condition1) && ENABLE(Condition2)
11392143
 2144#if ENABLE(Condition1) && ENABLE(Condition2)
 2145
 2146static void conditionalAttr2AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2147{
 2148 TestObj* imp = V8TestObj::toNative(info.Holder());
 2149 int v = toInt32(value);
 2150 imp->setConditionalAttr2(v);
 2151 return;
 2152}
 2153
 2154#endif // ENABLE(Condition1) && ENABLE(Condition2)
 2155
 2156#if ENABLE(Condition1) && ENABLE(Condition2)
 2157
 2158static void conditionalAttr2AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2159{
 2160 TestObjV8Internal::conditionalAttr2AttrSetterForMainWorld(name, value, info);
 2161}
 2162
 2163#endif // ENABLE(Condition1) && ENABLE(Condition2)
 2164
11402165#if ENABLE(Condition1) || ENABLE(Condition2)
11412166
11422167static v8::Handle<v8::Value> conditionalAttr3AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)

@@static v8::Handle<v8::Value> conditionalAttr3AttrGetterCallback(v8::Local<v8::St
11582183
11592184#if ENABLE(Condition1) || ENABLE(Condition2)
11602185
 2186static v8::Handle<v8::Value> conditionalAttr3AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2187{
 2188 TestObj* imp = V8TestObj::toNative(info.Holder());
 2189 return v8Integer(imp->conditionalAttr3(), info.GetIsolate());
 2190}
 2191
 2192#endif // ENABLE(Condition1) || ENABLE(Condition2)
 2193
 2194#if ENABLE(Condition1) || ENABLE(Condition2)
 2195
 2196static v8::Handle<v8::Value> conditionalAttr3AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2197{
 2198 return TestObjV8Internal::conditionalAttr3AttrGetterForMainWorld(name, info);
 2199}
 2200
 2201#endif // ENABLE(Condition1) || ENABLE(Condition2)
 2202
 2203#if ENABLE(Condition1) || ENABLE(Condition2)
 2204
11612205static void conditionalAttr3AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
11622206{
11632207 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void conditionalAttr3AttrSetterCallback(v8::Local<v8::String> name, v8::L
11772221
11782222#endif // ENABLE(Condition1) || ENABLE(Condition2)
11792223
 2224#if ENABLE(Condition1) || ENABLE(Condition2)
 2225
 2226static void conditionalAttr3AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2227{
 2228 TestObj* imp = V8TestObj::toNative(info.Holder());
 2229 int v = toInt32(value);
 2230 imp->setConditionalAttr3(v);
 2231 return;
 2232}
 2233
 2234#endif // ENABLE(Condition1) || ENABLE(Condition2)
 2235
 2236#if ENABLE(Condition1) || ENABLE(Condition2)
 2237
 2238static void conditionalAttr3AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2239{
 2240 TestObjV8Internal::conditionalAttr3AttrSetterForMainWorld(name, value, info);
 2241}
 2242
 2243#endif // ENABLE(Condition1) || ENABLE(Condition2)
 2244
11802245static v8::Handle<v8::Value> cachedAttribute1AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
11812246{
11822247 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> cachedAttribute1AttrGetterCallback(v8::Local<v8::St
11882253 return TestObjV8Internal::cachedAttribute1AttrGetter(name, info);
11892254}
11902255
 2256static v8::Handle<v8::Value> cachedAttribute1AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2257{
 2258 TestObj* imp = V8TestObj::toNative(info.Holder());
 2259 return imp->cachedAttribute1().v8Value();
 2260}
 2261
 2262static v8::Handle<v8::Value> cachedAttribute1AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2263{
 2264 return TestObjV8Internal::cachedAttribute1AttrGetterForMainWorld(name, info);
 2265}
 2266
11912267static v8::Handle<v8::Value> cachedAttribute2AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
11922268{
11932269 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> cachedAttribute2AttrGetterCallback(v8::Local<v8::St
11992275 return TestObjV8Internal::cachedAttribute2AttrGetter(name, info);
12002276}
12012277
 2278static v8::Handle<v8::Value> cachedAttribute2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2279{
 2280 TestObj* imp = V8TestObj::toNative(info.Holder());
 2281 return imp->cachedAttribute2().v8Value();
 2282}
 2283
 2284static v8::Handle<v8::Value> cachedAttribute2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2285{
 2286 return TestObjV8Internal::cachedAttribute2AttrGetterForMainWorld(name, info);
 2287}
 2288
12022289static v8::Handle<v8::Value> anyAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
12032290{
12042291 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> anyAttributeAttrGetterCallback(v8::Local<v8::String
12102297 return TestObjV8Internal::anyAttributeAttrGetter(name, info);
12112298}
12122299
 2300static v8::Handle<v8::Value> anyAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2301{
 2302 TestObj* imp = V8TestObj::toNative(info.Holder());
 2303 return imp->anyAttribute().v8Value();
 2304}
 2305
 2306static v8::Handle<v8::Value> anyAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2307{
 2308 return TestObjV8Internal::anyAttributeAttrGetterForMainWorld(name, info);
 2309}
 2310
12132311static void anyAttributeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
12142312{
12152313 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void anyAttributeAttrSetterCallback(v8::Local<v8::String> name, v8::Local
12232321 TestObjV8Internal::anyAttributeAttrSetter(name, value, info);
12242322}
12252323
 2324static void anyAttributeAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2325{
 2326 TestObj* imp = V8TestObj::toNative(info.Holder());
 2327 ScriptValue v = ScriptValue(value);
 2328 imp->setAnyAttribute(WTF::getPtr(v));
 2329 return;
 2330}
 2331
 2332static void anyAttributeAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2333{
 2334 TestObjV8Internal::anyAttributeAttrSetterForMainWorld(name, value, info);
 2335}
 2336
12262337static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
12272338{
12282339 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetterCallback(v8::Local<v
12342345 return TestObjV8Internal::enabledAtRuntimeAttr1AttrGetter(name, info);
12352346}
12362347
 2348static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2349{
 2350 TestObj* imp = V8TestObj::toNative(info.Holder());
 2351 return v8Integer(imp->enabledAtRuntimeAttr1(), info.GetIsolate());
 2352}
 2353
 2354static v8::Handle<v8::Value> enabledAtRuntimeAttr1AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2355{
 2356 return TestObjV8Internal::enabledAtRuntimeAttr1AttrGetterForMainWorld(name, info);
 2357}
 2358
12372359static void enabledAtRuntimeAttr1AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
12382360{
12392361 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void enabledAtRuntimeAttr1AttrSetterCallback(v8::Local<v8::String> name,
12472369 TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter(name, value, info);
12482370}
12492371
 2372static void enabledAtRuntimeAttr1AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2373{
 2374 TestObj* imp = V8TestObj::toNative(info.Holder());
 2375 int v = toInt32(value);
 2376 imp->setEnabledAtRuntimeAttr1(v);
 2377 return;
 2378}
 2379
 2380static void enabledAtRuntimeAttr1AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2381{
 2382 TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterForMainWorld(name, value, info);
 2383}
 2384
12502385static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
12512386{
12522387 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetterCallback(v8::Local<v
12582393 return TestObjV8Internal::enabledAtRuntimeAttr2AttrGetter(name, info);
12592394}
12602395
 2396static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2397{
 2398 TestObj* imp = V8TestObj::toNative(info.Holder());
 2399 return v8Integer(imp->enabledAtRuntimeAttr2(), info.GetIsolate());
 2400}
 2401
 2402static v8::Handle<v8::Value> enabledAtRuntimeAttr2AttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2403{
 2404 return TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterForMainWorld(name, info);
 2405}
 2406
12612407static void enabledAtRuntimeAttr2AttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
12622408{
12632409 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void enabledAtRuntimeAttr2AttrSetterCallback(v8::Local<v8::String> name,
12712417 TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter(name, value, info);
12722418}
12732419
 2420static void enabledAtRuntimeAttr2AttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2421{
 2422 TestObj* imp = V8TestObj::toNative(info.Holder());
 2423 int v = toInt32(value);
 2424 imp->setEnabledAtRuntimeAttr2(v);
 2425 return;
 2426}
 2427
 2428static void enabledAtRuntimeAttr2AttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2429{
 2430 TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterForMainWorld(name, value, info);
 2431}
 2432
12742433static v8::Handle<v8::Value> enabledPerContextAttr1AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
12752434{
12762435 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> floatArrayAttrGetterCallback(v8::Local<v8::String>
13302489 return TestObjV8Internal::floatArrayAttrGetter(name, info);
13312490}
13322491
 2492static v8::Handle<v8::Value> floatArrayAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2493{
 2494 TestObj* imp = V8TestObj::toNative(info.Holder());
 2495 return v8Array(imp->floatArray(), info.GetIsolate());
 2496}
 2497
 2498static v8::Handle<v8::Value> floatArrayAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2499{
 2500 return TestObjV8Internal::floatArrayAttrGetterForMainWorld(name, info);
 2501}
 2502
13332503static void floatArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
13342504{
13352505 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void floatArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
13432513 TestObjV8Internal::floatArrayAttrSetter(name, value, info);
13442514}
13452515
 2516static void floatArrayAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2517{
 2518 TestObj* imp = V8TestObj::toNative(info.Holder());
 2519 Vector<float> v = toNativeArray<float>(value);
 2520 imp->setFloatArray(v);
 2521 return;
 2522}
 2523
 2524static void floatArrayAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2525{
 2526 TestObjV8Internal::floatArrayAttrSetterForMainWorld(name, value, info);
 2527}
 2528
13462529static v8::Handle<v8::Value> doubleArrayAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
13472530{
13482531 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> doubleArrayAttrGetterCallback(v8::Local<v8::String>
13542537 return TestObjV8Internal::doubleArrayAttrGetter(name, info);
13552538}
13562539
 2540static v8::Handle<v8::Value> doubleArrayAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2541{
 2542 TestObj* imp = V8TestObj::toNative(info.Holder());
 2543 return v8Array(imp->doubleArray(), info.GetIsolate());
 2544}
 2545
 2546static v8::Handle<v8::Value> doubleArrayAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2547{
 2548 return TestObjV8Internal::doubleArrayAttrGetterForMainWorld(name, info);
 2549}
 2550
13572551static void doubleArrayAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
13582552{
13592553 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void doubleArrayAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
13672561 TestObjV8Internal::doubleArrayAttrSetter(name, value, info);
13682562}
13692563
 2564static void doubleArrayAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2565{
 2566 TestObj* imp = V8TestObj::toNative(info.Holder());
 2567 Vector<double> v = toNativeArray<double>(value);
 2568 imp->setDoubleArray(v);
 2569 return;
 2570}
 2571
 2572static void doubleArrayAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2573{
 2574 TestObjV8Internal::doubleArrayAttrSetterForMainWorld(name, value, info);
 2575}
 2576
13702577static v8::Handle<v8::Value> contentDocumentAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
13712578{
13722579 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> contentDocumentAttrGetterCallback(v8::Local<v8::Str
13812588 return TestObjV8Internal::contentDocumentAttrGetter(name, info);
13822589}
13832590
 2591static v8::Handle<v8::Value> contentDocumentAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2592{
 2593 TestObj* imp = V8TestObj::toNative(info.Holder());
 2594 if (!BindingSecurity::shouldAllowAccessToNode(BindingState::instance(), imp->contentDocument()))
 2595 return v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
 2596
 2597 return toV8FastForMainWorld(imp->contentDocument(), info, imp);
 2598}
 2599
 2600static v8::Handle<v8::Value> contentDocumentAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2601{
 2602 return TestObjV8Internal::contentDocumentAttrGetterForMainWorld(name, info);
 2603}
 2604
13842605static v8::Handle<v8::Value> mutablePointAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
13852606{
13862607 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> mutablePointAttrGetterCallback(v8::Local<v8::String
13922613 return TestObjV8Internal::mutablePointAttrGetter(name, info);
13932614}
13942615
 2616static v8::Handle<v8::Value> mutablePointAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2617{
 2618 TestObj* imp = V8TestObj::toNative(info.Holder());
 2619 return toV8FastForMainWorld(WTF::getPtr(SVGStaticPropertyTearOff<TestObj, FloatPoint>::create(imp, imp->mutablePoint(), &TestObj::updateMutablePoint)), info, imp);
 2620}
 2621
 2622static v8::Handle<v8::Value> mutablePointAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2623{
 2624 return TestObjV8Internal::mutablePointAttrGetterForMainWorld(name, info);
 2625}
 2626
13952627static void mutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
13962628{
13972629 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void mutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Local
14052637 TestObjV8Internal::mutablePointAttrSetter(name, value, info);
14062638}
14072639
 2640static void mutablePointAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2641{
 2642 TestObj* imp = V8TestObj::toNative(info.Holder());
 2643 RefPtr<SVGPropertyTearOff<FloatPoint> > v = V8SVGPoint::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 2644 imp->setMutablePoint(WTF::getPtr(v));
 2645 return;
 2646}
 2647
 2648static void mutablePointAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2649{
 2650 TestObjV8Internal::mutablePointAttrSetterForMainWorld(name, value, info);
 2651}
 2652
14082653static v8::Handle<v8::Value> immutablePointAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
14092654{
14102655 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> immutablePointAttrGetterCallback(v8::Local<v8::Stri
14162661 return TestObjV8Internal::immutablePointAttrGetter(name, info);
14172662}
14182663
 2664static v8::Handle<v8::Value> immutablePointAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2665{
 2666 TestObj* imp = V8TestObj::toNative(info.Holder());
 2667 return toV8FastForMainWorld(WTF::getPtr(SVGPropertyTearOff<FloatPoint>::create(imp->immutablePoint())), info, imp);
 2668}
 2669
 2670static v8::Handle<v8::Value> immutablePointAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2671{
 2672 return TestObjV8Internal::immutablePointAttrGetterForMainWorld(name, info);
 2673}
 2674
14192675static void immutablePointAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
14202676{
14212677 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void immutablePointAttrSetterCallback(v8::Local<v8::String> name, v8::Loc
14292685 TestObjV8Internal::immutablePointAttrSetter(name, value, info);
14302686}
14312687
 2688static void immutablePointAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2689{
 2690 TestObj* imp = V8TestObj::toNative(info.Holder());
 2691 RefPtr<SVGPropertyTearOff<FloatPoint> > v = V8SVGPoint::HasInstance(value, info.GetIsolate(), worldType(info.GetIsolate())) ? V8SVGPoint::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;
 2692 imp->setImmutablePoint(WTF::getPtr(v));
 2693 return;
 2694}
 2695
 2696static void immutablePointAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2697{
 2698 TestObjV8Internal::immutablePointAttrSetterForMainWorld(name, value, info);
 2699}
 2700
14322701static v8::Handle<v8::Value> strawberryAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
14332702{
14342703 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> strawberryAttrGetterCallback(v8::Local<v8::String>
14402709 return TestObjV8Internal::strawberryAttrGetter(name, info);
14412710}
14422711
 2712static v8::Handle<v8::Value> strawberryAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2713{
 2714 TestObj* imp = V8TestObj::toNative(info.Holder());
 2715 return v8Integer(imp->blueberry(), info.GetIsolate());
 2716}
 2717
 2718static v8::Handle<v8::Value> strawberryAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2719{
 2720 return TestObjV8Internal::strawberryAttrGetterForMainWorld(name, info);
 2721}
 2722
14432723static void strawberryAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
14442724{
14452725 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void strawberryAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v
14532733 TestObjV8Internal::strawberryAttrSetter(name, value, info);
14542734}
14552735
 2736static void strawberryAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2737{
 2738 TestObj* imp = V8TestObj::toNative(info.Holder());
 2739 int v = toInt32(value);
 2740 imp->setBlueberry(v);
 2741 return;
 2742}
 2743
 2744static void strawberryAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2745{
 2746 TestObjV8Internal::strawberryAttrSetterForMainWorld(name, value, info);
 2747}
 2748
14562749static v8::Handle<v8::Value> strictFloatAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
14572750{
14582751 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> strictFloatAttrGetterCallback(v8::Local<v8::String>
14642757 return TestObjV8Internal::strictFloatAttrGetter(name, info);
14652758}
14662759
 2760static v8::Handle<v8::Value> strictFloatAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2761{
 2762 TestObj* imp = V8TestObj::toNative(info.Holder());
 2763 return v8::Number::New(imp->strictFloat());
 2764}
 2765
 2766static v8::Handle<v8::Value> strictFloatAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2767{
 2768 return TestObjV8Internal::strictFloatAttrGetterForMainWorld(name, info);
 2769}
 2770
14672771static void strictFloatAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
14682772{
14692773 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void strictFloatAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
14772781 TestObjV8Internal::strictFloatAttrSetter(name, value, info);
14782782}
14792783
 2784static void strictFloatAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2785{
 2786 TestObj* imp = V8TestObj::toNative(info.Holder());
 2787 float v = static_cast<float>(value->NumberValue());
 2788 imp->setStrictFloat(v);
 2789 return;
 2790}
 2791
 2792static void strictFloatAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2793{
 2794 TestObjV8Internal::strictFloatAttrSetterForMainWorld(name, value, info);
 2795}
 2796
14802797static v8::Handle<v8::Value> descriptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
14812798{
14822799 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> descriptionAttrGetterCallback(v8::Local<v8::String>
14882805 return TestObjV8Internal::descriptionAttrGetter(name, info);
14892806}
14902807
 2808static v8::Handle<v8::Value> descriptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2809{
 2810 TestObj* imp = V8TestObj::toNative(info.Holder());
 2811 return v8Integer(imp->description(), info.GetIsolate());
 2812}
 2813
 2814static v8::Handle<v8::Value> descriptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2815{
 2816 return TestObjV8Internal::descriptionAttrGetterForMainWorld(name, info);
 2817}
 2818
14912819static v8::Handle<v8::Value> idAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
14922820{
14932821 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> idAttrGetterCallback(v8::Local<v8::String> name, co
14992827 return TestObjV8Internal::idAttrGetter(name, info);
15002828}
15012829
 2830static v8::Handle<v8::Value> idAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2831{
 2832 TestObj* imp = V8TestObj::toNative(info.Holder());
 2833 return v8Integer(imp->id(), info.GetIsolate());
 2834}
 2835
 2836static v8::Handle<v8::Value> idAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2837{
 2838 return TestObjV8Internal::idAttrGetterForMainWorld(name, info);
 2839}
 2840
15022841static void idAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
15032842{
15042843 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static void idAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Value
15122851 TestObjV8Internal::idAttrSetter(name, value, info);
15132852}
15142853
 2854static void idAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2855{
 2856 TestObj* imp = V8TestObj::toNative(info.Holder());
 2857 int v = toInt32(value);
 2858 imp->setId(v);
 2859 return;
 2860}
 2861
 2862static void idAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 2863{
 2864 TestObjV8Internal::idAttrSetterForMainWorld(name, value, info);
 2865}
 2866
15152867static v8::Handle<v8::Value> hashAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
15162868{
15172869 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> hashAttrGetterCallback(v8::Local<v8::String> name,
15232875 return TestObjV8Internal::hashAttrGetter(name, info);
15242876}
15252877
 2878static v8::Handle<v8::Value> hashAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2879{
 2880 TestObj* imp = V8TestObj::toNative(info.Holder());
 2881 return v8String(imp->hash(), info.GetIsolate(), ReturnUnsafeHandle);
 2882}
 2883
 2884static v8::Handle<v8::Value> hashAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2885{
 2886 return TestObjV8Internal::hashAttrGetterForMainWorld(name, info);
 2887}
 2888
15262889static v8::Handle<v8::Value> replaceableAttributeAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
15272890{
15282891 TestObj* imp = V8TestObj::toNative(info.Holder());

@@static v8::Handle<v8::Value> replaceableAttributeAttrGetterCallback(v8::Local<v8
15342897 return TestObjV8Internal::replaceableAttributeAttrGetter(name, info);
15352898}
15362899
 2900static v8::Handle<v8::Value> replaceableAttributeAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2901{
 2902 TestObj* imp = V8TestObj::toNative(info.Holder());
 2903 return v8Integer(imp->replaceableAttribute(), info.GetIsolate());
 2904}
 2905
 2906static v8::Handle<v8::Value> replaceableAttributeAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 2907{
 2908 return TestObjV8Internal::replaceableAttributeAttrGetterForMainWorld(name, info);
 2909}
 2910
15372911static v8::Handle<v8::Value> TestObjConstructorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
15382912{
15392913 v8::Handle<v8::Value> data = info.Data();

@@static const V8DOMConfiguration::BatchedAttribute V8TestObjAttrs[] = {
29364310 {"replaceableAttribute", TestObjV8Internal::replaceableAttributeAttrGetterCallback, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
29374311};
29384312
 4313static const V8DOMConfiguration::BatchedAttribute V8TestObjAttrsForMainWorld[] = {
 4314 // Attribute 'readOnlyLongAttr' (Type: 'readonly attribute' ExtAttr: '')
 4315 {"readOnlyLongAttr", TestObjV8Internal::readOnlyLongAttrAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4316 // Attribute 'readOnlyStringAttr' (Type: 'readonly attribute' ExtAttr: '')
 4317 {"readOnlyStringAttr", TestObjV8Internal::readOnlyStringAttrAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4318 // Attribute 'readOnlyTestObjAttr' (Type: 'readonly attribute' ExtAttr: '')
 4319 {"readOnlyTestObjAttr", TestObjV8Internal::readOnlyTestObjAttrAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4320 // Attribute 'staticReadOnlyLongAttr' (Type: 'readonly attribute' ExtAttr: '')
 4321 {"staticReadOnlyLongAttr", TestObjV8Internal::staticReadOnlyLongAttrAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4322 // Attribute 'staticStringAttr' (Type: 'attribute' ExtAttr: '')
 4323 {"staticStringAttr", TestObjV8Internal::staticStringAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::staticStringAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4324 // Attribute 'TestSubObj' (Type: 'readonly attribute' ExtAttr: '')
 4325 {"TestSubObj", TestObjV8Internal::TestObjConstructorGetter, 0, &V8TestSubObj::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4326 // Attribute 'enumAttr' (Type: 'attribute' ExtAttr: '')
 4327 {"enumAttr", TestObjV8Internal::enumAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::enumAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4328 // Attribute 'shortAttr' (Type: 'attribute' ExtAttr: '')
 4329 {"shortAttr", TestObjV8Internal::shortAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::shortAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4330 // Attribute 'unsignedShortAttr' (Type: 'attribute' ExtAttr: '')
 4331 {"unsignedShortAttr", TestObjV8Internal::unsignedShortAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::unsignedShortAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4332 // Attribute 'longAttr' (Type: 'attribute' ExtAttr: '')
 4333 {"longAttr", TestObjV8Internal::longAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::longAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4334 // Attribute 'longLongAttr' (Type: 'attribute' ExtAttr: '')
 4335 {"longLongAttr", TestObjV8Internal::longLongAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::longLongAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4336 // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '')
 4337 {"unsignedLongLongAttr", TestObjV8Internal::unsignedLongLongAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::unsignedLongLongAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4338 // Attribute 'stringAttr' (Type: 'attribute' ExtAttr: '')
 4339 {"stringAttr", TestObjV8Internal::stringAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::stringAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4340 // Attribute 'testObjAttr' (Type: 'attribute' ExtAttr: 'V8MeasureAs')
 4341 {"testObjAttr", TestObjV8Internal::testObjAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::testObjAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4342 // Attribute 'XMLObjAttr' (Type: 'attribute' ExtAttr: '')
 4343 {"XMLObjAttr", TestObjV8Internal::XMLObjAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::XMLObjAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4344 // Attribute 'create' (Type: 'attribute' ExtAttr: '')
 4345 {"create", TestObjV8Internal::createAttrGetterCallbackForMainWorld, TestObjV8Internal::createAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4346 // Attribute 'reflectedStringAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4347 {"reflectedStringAttr", TestObjV8Internal::reflectedStringAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedStringAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4348 // Attribute 'reflectedIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4349 {"reflectedIntegralAttr", TestObjV8Internal::reflectedIntegralAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedIntegralAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4350 // Attribute 'reflectedUnsignedIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4351 {"reflectedUnsignedIntegralAttr", TestObjV8Internal::reflectedUnsignedIntegralAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4352 // Attribute 'reflectedBooleanAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4353 {"reflectedBooleanAttr", TestObjV8Internal::reflectedBooleanAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedBooleanAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4354 // Attribute 'reflectedURLAttr' (Type: 'attribute' ExtAttr: 'URL Reflect')
 4355 {"reflectedURLAttr", TestObjV8Internal::reflectedURLAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedURLAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4356 // Attribute 'reflectedStringAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4357 {"reflectedStringAttr", TestObjV8Internal::reflectedStringAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedStringAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4358 // Attribute 'reflectedCustomIntegralAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4359 {"reflectedCustomIntegralAttr", TestObjV8Internal::reflectedCustomIntegralAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedCustomIntegralAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4360 // Attribute 'reflectedCustomBooleanAttr' (Type: 'attribute' ExtAttr: 'Reflect')
 4361 {"reflectedCustomBooleanAttr", TestObjV8Internal::reflectedCustomBooleanAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedCustomBooleanAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4362 // Attribute 'reflectedCustomURLAttr' (Type: 'attribute' ExtAttr: 'URL Reflect')
 4363 {"reflectedCustomURLAttr", TestObjV8Internal::reflectedCustomURLAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::reflectedCustomURLAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4364 // Attribute 'typedArrayAttr' (Type: 'attribute' ExtAttr: '')
 4365 {"typedArrayAttr", TestObjV8Internal::typedArrayAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::typedArrayAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4366 // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '')
 4367 {"attrWithGetterException", TestObjV8Internal::attrWithGetterExceptionAttrGetterCallbackForMainWorld, TestObjV8Internal::attrWithGetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4368 // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '')
 4369 {"attrWithSetterException", TestObjV8Internal::attrWithSetterExceptionAttrGetterCallbackForMainWorld, TestObjV8Internal::attrWithSetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4370 // Attribute 'stringAttrWithGetterException' (Type: 'attribute' ExtAttr: '')
 4371 {"stringAttrWithGetterException", TestObjV8Internal::stringAttrWithGetterExceptionAttrGetterCallbackForMainWorld, TestObjV8Internal::stringAttrWithGetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4372 // Attribute 'stringAttrWithSetterException' (Type: 'attribute' ExtAttr: '')
 4373 {"stringAttrWithSetterException", TestObjV8Internal::stringAttrWithSetterExceptionAttrGetterCallbackForMainWorld, TestObjV8Internal::stringAttrWithSetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4374 // Attribute 'customAttr' (Type: 'attribute' ExtAttr: 'Custom')
 4375 {"customAttr", TestObjV8Internal::customAttrAttrGetterCallbackForMainWorld, TestObjV8Internal::customAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4376 // Attribute 'withScriptStateAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
 4377 {"withScriptStateAttribute", TestObjV8Internal::withScriptStateAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptStateAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4378 // Attribute 'withScriptExecutionContextAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
 4379 {"withScriptExecutionContextAttribute", TestObjV8Internal::withScriptExecutionContextAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptExecutionContextAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4380 // Attribute 'withScriptStateAttributeRaises' (Type: 'attribute' ExtAttr: 'CallWith')
 4381 {"withScriptStateAttributeRaises", TestObjV8Internal::withScriptStateAttributeRaisesAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptStateAttributeRaisesAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4382 // Attribute 'withScriptExecutionContextAttributeRaises' (Type: 'attribute' ExtAttr: 'CallWith')
 4383 {"withScriptExecutionContextAttributeRaises", TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4384 // Attribute 'withScriptExecutionContextAndScriptStateAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
 4385 {"withScriptExecutionContextAndScriptStateAttribute", TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4386 // Attribute 'withScriptExecutionContextAndScriptStateAttributeRaises' (Type: 'attribute' ExtAttr: 'CallWith')
 4387 {"withScriptExecutionContextAndScriptStateAttributeRaises", TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4388 // Attribute 'withScriptExecutionContextAndScriptStateWithSpacesAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
 4389 {"withScriptExecutionContextAndScriptStateWithSpacesAttribute", TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4390 // Attribute 'withScriptArgumentsAndCallStackAttribute' (Type: 'attribute' ExtAttr: 'CallWith')
 4391 {"withScriptArgumentsAndCallStackAttribute", TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4392#if ENABLE(Condition1)
 4393 // Attribute 'conditionalAttr1' (Type: 'attribute' ExtAttr: 'Conditional')
 4394 {"conditionalAttr1", TestObjV8Internal::conditionalAttr1AttrGetterCallbackForMainWorld, TestObjV8Internal::conditionalAttr1AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4395#endif // ENABLE(Condition1)
 4396#if ENABLE(Condition1) && ENABLE(Condition2)
 4397 // Attribute 'conditionalAttr2' (Type: 'attribute' ExtAttr: 'Conditional')
 4398 {"conditionalAttr2", TestObjV8Internal::conditionalAttr2AttrGetterCallbackForMainWorld, TestObjV8Internal::conditionalAttr2AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4399#endif // ENABLE(Condition1) && ENABLE(Condition2)
 4400#if ENABLE(Condition1) || ENABLE(Condition2)
 4401 // Attribute 'conditionalAttr3' (Type: 'attribute' ExtAttr: 'Conditional')
 4402 {"conditionalAttr3", TestObjV8Internal::conditionalAttr3AttrGetterCallbackForMainWorld, TestObjV8Internal::conditionalAttr3AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4403#endif // ENABLE(Condition1) || ENABLE(Condition2)
 4404#if ENABLE(Condition1)
 4405 // Attribute 'conditionalAttr4' (Type: 'attribute' ExtAttr: 'Conditional')
 4406 {"conditionalAttr4", TestObjV8Internal::TestObjConstructorGetter, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, &V8TestObjectA::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4407#endif // ENABLE(Condition1)
 4408#if ENABLE(Condition1) && ENABLE(Condition2)
 4409 // Attribute 'conditionalAttr5' (Type: 'attribute' ExtAttr: 'Conditional')
 4410 {"conditionalAttr5", TestObjV8Internal::TestObjConstructorGetter, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, &V8TestObjectB::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4411#endif // ENABLE(Condition1) && ENABLE(Condition2)
 4412#if ENABLE(Condition1) || ENABLE(Condition2)
 4413 // Attribute 'conditionalAttr6' (Type: 'attribute' ExtAttr: 'Conditional')
 4414 {"conditionalAttr6", TestObjV8Internal::TestObjConstructorGetter, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, &V8TestObjectC::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4415#endif // ENABLE(Condition1) || ENABLE(Condition2)
 4416 // Attribute 'cachedAttribute1' (Type: 'readonly attribute' ExtAttr: 'CachedAttribute')
 4417 {"cachedAttribute1", TestObjV8Internal::cachedAttribute1AttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4418 // Attribute 'cachedAttribute2' (Type: 'readonly attribute' ExtAttr: 'CachedAttribute')
 4419 {"cachedAttribute2", TestObjV8Internal::cachedAttribute2AttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4420 // Attribute 'anyAttribute' (Type: 'attribute' ExtAttr: '')
 4421 {"anyAttribute", TestObjV8Internal::anyAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::anyAttributeAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4422 // Attribute 'floatArray' (Type: 'attribute' ExtAttr: '')
 4423 {"floatArray", TestObjV8Internal::floatArrayAttrGetterCallbackForMainWorld, TestObjV8Internal::floatArrayAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4424 // Attribute 'doubleArray' (Type: 'attribute' ExtAttr: '')
 4425 {"doubleArray", TestObjV8Internal::doubleArrayAttrGetterCallbackForMainWorld, TestObjV8Internal::doubleArrayAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4426 // Attribute 'contentDocument' (Type: 'readonly attribute' ExtAttr: 'CheckSecurityForNode')
 4427 {"contentDocument", TestObjV8Internal::contentDocumentAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4428 // Attribute 'mutablePoint' (Type: 'attribute' ExtAttr: '')
 4429 {"mutablePoint", TestObjV8Internal::mutablePointAttrGetterCallbackForMainWorld, TestObjV8Internal::mutablePointAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4430 // Attribute 'immutablePoint' (Type: 'attribute' ExtAttr: 'Immutable')
 4431 {"immutablePoint", TestObjV8Internal::immutablePointAttrGetterCallbackForMainWorld, TestObjV8Internal::immutablePointAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4432 // Attribute 'strawberry' (Type: 'attribute' ExtAttr: 'ImplementedAs')
 4433 {"strawberry", TestObjV8Internal::strawberryAttrGetterCallbackForMainWorld, TestObjV8Internal::strawberryAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4434 // Attribute 'strictFloat' (Type: 'attribute' ExtAttr: 'StrictTypeChecking')
 4435 {"strictFloat", TestObjV8Internal::strictFloatAttrGetterCallbackForMainWorld, TestObjV8Internal::strictFloatAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4436 // Attribute 'description' (Type: 'readonly attribute' ExtAttr: '')
 4437 {"description", TestObjV8Internal::descriptionAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4438 // Attribute 'id' (Type: 'attribute' ExtAttr: '')
 4439 {"id", TestObjV8Internal::idAttrGetterCallbackForMainWorld, TestObjV8Internal::idAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4440 // Attribute 'hash' (Type: 'readonly attribute' ExtAttr: '')
 4441 {"hash", TestObjV8Internal::hashAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4442 // Attribute 'replaceableAttribute' (Type: 'readonly attribute' ExtAttr: 'Replaceable')
 4443 {"replaceableAttribute", TestObjV8Internal::replaceableAttributeAttrGetterCallbackForMainWorld, TestObjV8Internal::TestObjReplaceableAttrSetterCallback, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 4444};
 4445
29394446static const V8DOMConfiguration::BatchedMethod V8TestObjMethods[] = {
29404447 {"voidMethod", TestObjV8Internal::voidMethodMethodCallback},
29414448 {"longMethod", TestObjV8Internal::longMethodMethodCallback},

@@v8::Handle<v8::Value> V8TestObj::constructorCallback(const v8::Arguments& args)
30324539 return TestObjV8Internal::constructor(args);
30334540}
30344541
3035 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 4542static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
30364543{
30374544 desc->ReadOnlyPrototype();
30384545

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
30524559 // Attribute 'enabledAtRuntimeAttr1' (Type: 'attribute' ExtAttr: 'V8EnabledAtRuntime')
30534560 {"enabledAtRuntimeAttr1", TestObjV8Internal::enabledAtRuntimeAttr1AttrGetterCallback, TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterCallback, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
30544561 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
 4562 if (currentWorldType == MainWorld) {
 4563 static const V8DOMConfiguration::BatchedAttribute attrDataForMainWorld =\
 4564 // Attribute 'enabledAtRuntimeAttr1' (Type: 'attribute' ExtAttr: 'V8EnabledAtRuntime')
 4565 {"enabledAtRuntimeAttr1", TestObjV8Internal::enabledAtRuntimeAttr1AttrGetterCallbackForMainWorld, TestObjV8Internal::enabledAtRuntimeAttr1AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
 4566 V8DOMConfiguration::configureAttribute(instance, proto, attrDataForMainWorld, isolate);
 4567 }
30554568 }
30564569 if (RuntimeEnabledFeatures::featureNameEnabled()) {
30574570 static const V8DOMConfiguration::BatchedAttribute attrData =\
30584571 // Attribute 'enabledAtRuntimeAttr2' (Type: 'attribute' ExtAttr: 'V8EnabledAtRuntime')
30594572 {"enabledAtRuntimeAttr2", TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterCallback, TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallback, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
30604573 V8DOMConfiguration::configureAttribute(instance, proto, attrData, isolate);
 4574 if (currentWorldType == MainWorld) {
 4575 static const V8DOMConfiguration::BatchedAttribute attrDataForMainWorld =\
 4576 // Attribute 'enabledAtRuntimeAttr2' (Type: 'attribute' ExtAttr: 'V8EnabledAtRuntime')
 4577 {"enabledAtRuntimeAttr2", TestObjV8Internal::enabledAtRuntimeAttr2AttrGetterCallbackForMainWorld, TestObjV8Internal::enabledAtRuntimeAttr2AttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
 4578 V8DOMConfiguration::configureAttribute(instance, proto, attrDataForMainWorld, isolate);
 4579 }
30614580 }
30624581
 4582 if (currentWorldType == MainWorld)
 4583 V8DOMConfiguration::addToTemplate(desc, V8TestObjAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestObjAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 4584
30634585 // Custom Signature 'voidMethodWithArgs'
30644586 const int voidMethodWithArgsArgc = 3;
3065  v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, worldType) };
 4587 v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) };
30664588 v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(desc, voidMethodWithArgsArgc, voidMethodWithArgsArgv);
30674589 proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::voidMethodWithArgsMethodCallback, v8Undefined(), voidMethodWithArgsSignature));
30684590
30694591 // Custom Signature 'longMethodWithArgs'
30704592 const int longMethodWithArgsArgc = 3;
3071  v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, worldType) };
 4593 v8::Handle<v8::FunctionTemplate> longMethodWithArgsArgv[longMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) };
30724594 v8::Handle<v8::Signature> longMethodWithArgsSignature = v8::Signature::New(desc, longMethodWithArgsArgc, longMethodWithArgsArgv);
30734595 proto->Set(v8::String::NewSymbol("longMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::longMethodWithArgsMethodCallback, v8Undefined(), longMethodWithArgsSignature));
30744596
30754597 // Custom Signature 'objMethodWithArgs'
30764598 const int objMethodWithArgsArgc = 3;
3077  v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, worldType) };
 4599 v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) };
30784600 v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(desc, objMethodWithArgsArgc, objMethodWithArgsArgv);
30794601 proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::objMethodWithArgsMethodCallback, v8Undefined(), objMethodWithArgsSignature));
30804602
30814603 // Custom Signature 'methodWithSequenceArg'
30824604 const int methodWithSequenceArgArgc = 1;
3083  v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8sequence<ScriptProfile>::info, worldType) };
 4605 v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8sequence<ScriptProfile>::info, currentWorldType) };
30844606 v8::Handle<v8::Signature> methodWithSequenceArgSignature = v8::Signature::New(desc, methodWithSequenceArgArgc, methodWithSequenceArgArgv);
30854607 proto->Set(v8::String::NewSymbol("methodWithSequenceArg"), v8::FunctionTemplate::New(TestObjV8Internal::methodWithSequenceArgMethodCallback, v8Undefined(), methodWithSequenceArgSignature));
30864608
30874609 // Custom Signature 'methodThatRequiresAllArgsAndThrows'
30884610 const int methodThatRequiresAllArgsAndThrowsArgc = 2;
3089  v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[methodThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, worldType) };
 4611 v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[methodThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8PerIsolateData::from(isolate)->rawTemplate(&V8TestObj::info, currentWorldType) };
30904612 v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresAllArgsAndThrowsArgv);
30914613 proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsMethodCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature));
30924614 desc->Set(v8::String::NewSymbol("staticMethodWithCallbackAndOptionalArg"), v8::FunctionTemplate::New(TestObjV8Internal::staticMethodWithCallbackAndOptionalArgMethodCallback, v8Undefined(), v8::Local<v8::Signature>()));

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
31044626
31054627 // Custom Signature 'stringArrayFunction'
31064628 const int stringArrayFunctionArgc = 1;
3107  v8::Handle<v8::FunctionTemplate> stringArrayFunctionArgv[stringArrayFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, worldType) };
 4629 v8::Handle<v8::FunctionTemplate> stringArrayFunctionArgv[stringArrayFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, currentWorldType) };
31084630 v8::Handle<v8::Signature> stringArrayFunctionSignature = v8::Signature::New(desc, stringArrayFunctionArgc, stringArrayFunctionArgv);
31094631 proto->Set(v8::String::NewSymbol("stringArrayFunction"), v8::FunctionTemplate::New(TestObjV8Internal::stringArrayFunctionMethodCallback, v8Undefined(), stringArrayFunctionSignature));
31104632
31114633 // Custom Signature 'domStringListFunction'
31124634 const int domStringListFunctionArgc = 1;
3113  v8::Handle<v8::FunctionTemplate> domStringListFunctionArgv[domStringListFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMStringList::info, worldType) };
 4635 v8::Handle<v8::FunctionTemplate> domStringListFunctionArgv[domStringListFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMStringList::info, currentWorldType) };
31144636 v8::Handle<v8::Signature> domStringListFunctionSignature = v8::Signature::New(desc, domStringListFunctionArgc, domStringListFunctionArgv);
31154637 proto->Set(v8::String::NewSymbol("domStringListFunction"), v8::FunctionTemplate::New(TestObjV8Internal::domStringListFunctionMethodCallback, v8Undefined(), domStringListFunctionSignature));
31164638
31174639 // Custom Signature 'convert1'
31184640 const int convert1Argc = 1;
3119  v8::Handle<v8::FunctionTemplate> convert1Argv[convert1Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8a::info, worldType) };
 4641 v8::Handle<v8::FunctionTemplate> convert1Argv[convert1Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8a::info, currentWorldType) };
31204642 v8::Handle<v8::Signature> convert1Signature = v8::Signature::New(desc, convert1Argc, convert1Argv);
31214643 proto->Set(v8::String::NewSymbol("convert1"), v8::FunctionTemplate::New(TestObjV8Internal::convert1MethodCallback, v8Undefined(), convert1Signature));
31224644
31234645 // Custom Signature 'convert2'
31244646 const int convert2Argc = 1;
3125  v8::Handle<v8::FunctionTemplate> convert2Argv[convert2Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8b::info, worldType) };
 4647 v8::Handle<v8::FunctionTemplate> convert2Argv[convert2Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8b::info, currentWorldType) };
31264648 v8::Handle<v8::Signature> convert2Signature = v8::Signature::New(desc, convert2Argc, convert2Argv);
31274649 proto->Set(v8::String::NewSymbol("convert2"), v8::FunctionTemplate::New(TestObjV8Internal::convert2MethodCallback, v8Undefined(), convert2Signature));
31284650
31294651 // Custom Signature 'convert4'
31304652 const int convert4Argc = 1;
3131  v8::Handle<v8::FunctionTemplate> convert4Argv[convert4Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8d::info, worldType) };
 4653 v8::Handle<v8::FunctionTemplate> convert4Argv[convert4Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8d::info, currentWorldType) };
31324654 v8::Handle<v8::Signature> convert4Signature = v8::Signature::New(desc, convert4Argc, convert4Argv);
31334655 proto->Set(v8::String::NewSymbol("convert4"), v8::FunctionTemplate::New(TestObjV8Internal::convert4MethodCallback, v8Undefined(), convert4Signature));
31344656
31354657 // Custom Signature 'convert5'
31364658 const int convert5Argc = 1;
3137  v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8e::info, worldType) };
 4659 v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8e::info, currentWorldType) };
31384660 v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, convert5Argc, convert5Argv);
31394661 proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(TestObjV8Internal::convert5MethodCallback, v8Undefined(), convert5Signature));
31404662
31414663 // Custom Signature 'variadicNodeMethod'
31424664 const int variadicNodeMethodArgc = 2;
3143  v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, worldType), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, worldType) };
 4665 v8::Handle<v8::FunctionTemplate> variadicNodeMethodArgv[variadicNodeMethodArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldType), V8PerIsolateData::from(isolate)->rawTemplate(&V8Node::info, currentWorldType) };
31444666 v8::Handle<v8::Signature> variadicNodeMethodSignature = v8::Signature::New(desc, variadicNodeMethodArgc, variadicNodeMethodArgv);
31454667 proto->Set(v8::String::NewSymbol("variadicNodeMethod"), v8::FunctionTemplate::New(TestObjV8Internal::variadicNodeMethodMethodCallback, v8Undefined(), variadicNodeMethodSignature));
31464668 V8DOMConfiguration::batchConfigureConstants(desc, proto, V8TestObjConsts, WTF_ARRAY_LENGTH(V8TestObjConsts), isolate);

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestObjTemplate(v8::Persi
31504672 return desc;
31514673}
31524674
3153 v8::Persistent<v8::FunctionTemplate> V8TestObj::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 4675v8::Persistent<v8::FunctionTemplate> V8TestObj::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
31544676{
31554677 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
3156  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
3157  if (result != data->templateMap(worldType).end())
 4678 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 4679 if (result != data->templateMap(currentWorldType).end())
31584680 return result->value;
31594681
31604682 v8::HandleScope handleScope;
31614683 v8::Persistent<v8::FunctionTemplate> templ =
3162  ConfigureV8TestObjTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
3163  data->templateMap(worldType).add(&info, templ);
 4684 ConfigureV8TestObjTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 4685 data->templateMap(currentWorldType).add(&info, templ);
31644686 return templ;
31654687}
31664688
3167 bool V8TestObj::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 4689bool V8TestObj::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
31684690{
3169  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 4691 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
31704692}
31714693
31724694void V8TestObj::installPerContextProperties(v8::Handle<v8::Object> instance, TestObj* impl, v8::Isolate* isolate)

Source/WebCore/bindings/scripts/test/V8/V8TestObj.h

@@inline v8::Handle<v8::Value> toV8Fast(TestObj* impl, const HolderContainer& cont
8686}
8787
8888template<class HolderContainer, class Wrappable>
 89inline v8::Handle<v8::Value> toV8FastForMainWorld(TestObj* impl, const HolderContainer& container, Wrappable* wrappable)
 90{
 91 if (UNLIKELY(!impl))
 92 return v8Null(container.GetIsolate());
 93 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 94 if (!wrapper.IsEmpty())
 95 return wrapper;
 96 return wrap(impl, container.Holder(), container.GetIsolate());
 97}
 98
 99template<class HolderContainer, class Wrappable>
 100inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestObj > impl, const HolderContainer& container, Wrappable* wrappable)
 101{
 102 return toV8FastForMainWorld(impl.get(), container, wrappable);
 103}
 104
 105
 106template<class HolderContainer, class Wrappable>
89107inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestObj > impl, const HolderContainer& container, Wrappable* wrappable)
90108{
91109 return toV8Fast(impl.get(), container, wrappable);

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

@@v8::Handle<v8::Value> V8TestOverloadedConstructors::constructorCallback(const v8
147147 return TestOverloadedConstructorsV8Internal::constructor(args);
148148}
149149
150 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestOverloadedConstructorsTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 150static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestOverloadedConstructorsTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
151151{
152152 desc->ReadOnlyPrototype();
153153

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestOverloadedConstructor
159159 desc->SetCallHandler(V8TestOverloadedConstructors::constructorCallback);
160160
161161
 162 if (currentWorldType == MainWorld)
 163 V8DOMConfiguration::addToTemplate(desc, 0, 0, 0, 0, isolate, defaultSignature);
 164
162165 // Custom toString template
163166 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
164167 return desc;
165168}
166169
167 v8::Persistent<v8::FunctionTemplate> V8TestOverloadedConstructors::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 170v8::Persistent<v8::FunctionTemplate> V8TestOverloadedConstructors::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
168171{
169172 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
170  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
171  if (result != data->templateMap(worldType).end())
 173 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 174 if (result != data->templateMap(currentWorldType).end())
172175 return result->value;
173176
174177 v8::HandleScope handleScope;
175178 v8::Persistent<v8::FunctionTemplate> templ =
176  ConfigureV8TestOverloadedConstructorsTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
177  data->templateMap(worldType).add(&info, templ);
 179 ConfigureV8TestOverloadedConstructorsTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 180 data->templateMap(currentWorldType).add(&info, templ);
178181 return templ;
179182}
180183
181 bool V8TestOverloadedConstructors::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 184bool V8TestOverloadedConstructors::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
182185{
183  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 186 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
184187}
185188
186189

Source/WebCore/bindings/scripts/test/V8/V8TestOverloadedConstructors.h

@@inline v8::Handle<v8::Value> toV8Fast(TestOverloadedConstructors* impl, const Ho
8181}
8282
8383template<class HolderContainer, class Wrappable>
 84inline v8::Handle<v8::Value> toV8FastForMainWorld(TestOverloadedConstructors* impl, const HolderContainer& container, Wrappable* wrappable)
 85{
 86 if (UNLIKELY(!impl))
 87 return v8Null(container.GetIsolate());
 88 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 89 if (!wrapper.IsEmpty())
 90 return wrapper;
 91 return wrap(impl, container.Holder(), container.GetIsolate());
 92}
 93
 94template<class HolderContainer, class Wrappable>
 95inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestOverloadedConstructors > impl, const HolderContainer& container, Wrappable* wrappable)
 96{
 97 return toV8FastForMainWorld(impl.get(), container, wrappable);
 98}
 99
 100
 101template<class HolderContainer, class Wrappable>
84102inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestOverloadedConstructors > impl, const HolderContainer& container, Wrappable* wrappable)
85103{
86104 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> valueAttrGetterCallback(v8::Local<v8::String> name,
8686 return TestSerializedScriptValueInterfaceV8Internal::valueAttrGetter(name, info);
8787}
8888
 89static v8::Handle<v8::Value> valueAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 90{
 91 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 92 return imp->value() ? imp->value()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
 93}
 94
 95static v8::Handle<v8::Value> valueAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 96{
 97 return TestSerializedScriptValueInterfaceV8Internal::valueAttrGetterForMainWorld(name, info);
 98}
 99
89100static void valueAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
90101{
91102 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());

@@static void valueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<v8::Va
99110 TestSerializedScriptValueInterfaceV8Internal::valueAttrSetter(name, value, info);
100111}
101112
 113static void valueAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 114{
 115 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 116 RefPtr<SerializedScriptValue> v = SerializedScriptValue::create(value, info.GetIsolate());
 117 imp->setValue(WTF::getPtr(v));
 118 return;
 119}
 120
 121static void valueAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 122{
 123 TestSerializedScriptValueInterfaceV8Internal::valueAttrSetterForMainWorld(name, value, info);
 124}
 125
102126static v8::Handle<v8::Value> readonlyValueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
103127{
104128 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());

@@static v8::Handle<v8::Value> readonlyValueAttrGetterCallback(v8::Local<v8::Strin
110134 return TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetter(name, info);
111135}
112136
 137static v8::Handle<v8::Value> readonlyValueAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 138{
 139 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 140 return imp->readonlyValue() ? imp->readonlyValue()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
 141}
 142
 143static v8::Handle<v8::Value> readonlyValueAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 144{
 145 return TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetterForMainWorld(name, info);
 146}
 147
113148static v8::Handle<v8::Value> cachedValueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
114149{
115150 v8::Handle<v8::String> propertyName = v8::String::NewSymbol("cachedValue");

@@static v8::Handle<v8::Value> cachedValueAttrGetterCallback(v8::Local<v8::String>
128163 return TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter(name, info);
129164}
130165
 166static v8::Handle<v8::Value> cachedValueAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 167{
 168 v8::Handle<v8::String> propertyName = v8::String::NewSymbol("cachedValue");
 169 v8::Handle<v8::Value> value = info.Holder()->GetHiddenValue(propertyName);
 170 if (!value.IsEmpty())
 171 return value;
 172 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 173 RefPtr<SerializedScriptValue> serialized = imp->cachedValue();
 174 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
 175 info.Holder()->SetHiddenValue(propertyName, value);
 176 return value;
 177}
 178
 179static v8::Handle<v8::Value> cachedValueAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 180{
 181 return TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetterForMainWorld(name, info);
 182}
 183
131184static void cachedValueAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
132185{
133186 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());

@@static void cachedValueAttrSetterCallback(v8::Local<v8::String> name, v8::Local<
142195 TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetter(name, value, info);
143196}
144197
 198static void cachedValueAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 199{
 200 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 201 RefPtr<SerializedScriptValue> v = SerializedScriptValue::create(value, info.GetIsolate());
 202 imp->setCachedValue(WTF::getPtr(v));
 203 info.Holder()->DeleteHiddenValue(v8::String::NewSymbol("cachedValue")); // Invalidate the cached value.
 204 return;
 205}
 206
 207static void cachedValueAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 208{
 209 TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetterForMainWorld(name, value, info);
 210}
 211
145212static v8::Handle<v8::Value> portsAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
146213{
147214 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());

@@static v8::Handle<v8::Value> portsAttrGetterCallback(v8::Local<v8::String> name,
160227 return TestSerializedScriptValueInterfaceV8Internal::portsAttrGetter(name, info);
161228}
162229
 230static v8::Handle<v8::Value> portsAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 231{
 232 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 233 MessagePortArray* ports = imp->ports();
 234 if (!ports)
 235 return v8::Array::New(0);
 236 MessagePortArray portsCopy(*ports);
 237 v8::Local<v8::Array> portArray = v8::Array::New(portsCopy.size());
 238 for (size_t i = 0; i < portsCopy.size(); ++i)
 239 portArray->Set(v8Integer(i, info.GetIsolate()), toV8FastForMainWorld(portsCopy[i].get(), info, imp));
 240 return portArray;
 241}
 242
 243static v8::Handle<v8::Value> portsAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 244{
 245 return TestSerializedScriptValueInterfaceV8Internal::portsAttrGetterForMainWorld(name, info);
 246}
 247
163248static v8::Handle<v8::Value> cachedReadonlyValueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
164249{
165250 v8::Handle<v8::String> propertyName = v8::String::NewSymbol("cachedReadonlyValue");

@@static v8::Handle<v8::Value> cachedReadonlyValueAttrGetterCallback(v8::Local<v8:
178263 return TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter(name, info);
179264}
180265
 266static v8::Handle<v8::Value> cachedReadonlyValueAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 267{
 268 v8::Handle<v8::String> propertyName = v8::String::NewSymbol("cachedReadonlyValue");
 269 v8::Handle<v8::Value> value = info.Holder()->GetHiddenValue(propertyName);
 270 if (!value.IsEmpty())
 271 return value;
 272 TestSerializedScriptValueInterface* imp = V8TestSerializedScriptValueInterface::toNative(info.Holder());
 273 RefPtr<SerializedScriptValue> serialized = imp->cachedReadonlyValue();
 274 value = serialized ? serialized->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
 275 info.Holder()->SetHiddenValue(propertyName, value);
 276 return value;
 277}
 278
 279static v8::Handle<v8::Value> cachedReadonlyValueAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 280{
 281 return TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetterForMainWorld(name, info);
 282}
 283
181284static v8::Handle<v8::Value> acceptTransferListMethod(const v8::Arguments& args)
182285{
183286 if (args.Length() < 1)

@@static const V8DOMConfiguration::BatchedAttribute V8TestSerializedScriptValueInt
292395 {"cachedReadonlyValue", TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetterCallback, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
293396};
294397
 398static const V8DOMConfiguration::BatchedAttribute V8TestSerializedScriptValueInterfaceAttrsForMainWorld[] = {
 399 // Attribute 'value' (Type: 'attribute' ExtAttr: '')
 400 {"value", TestSerializedScriptValueInterfaceV8Internal::valueAttrGetterCallbackForMainWorld, TestSerializedScriptValueInterfaceV8Internal::valueAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 401 // Attribute 'readonlyValue' (Type: 'readonly attribute' ExtAttr: '')
 402 {"readonlyValue", TestSerializedScriptValueInterfaceV8Internal::readonlyValueAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 403 // Attribute 'cachedValue' (Type: 'attribute' ExtAttr: 'CachedAttribute')
 404 {"cachedValue", TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetterCallbackForMainWorld, TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 405 // Attribute 'ports' (Type: 'readonly attribute' ExtAttr: '')
 406 {"ports", TestSerializedScriptValueInterfaceV8Internal::portsAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 407 // Attribute 'cachedReadonlyValue' (Type: 'readonly attribute' ExtAttr: 'CachedAttribute')
 408 {"cachedReadonlyValue", TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetterCallbackForMainWorld, 0, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 409};
 410
295411static const V8DOMConfiguration::BatchedMethod V8TestSerializedScriptValueInterfaceMethods[] = {
296412 {"acceptTransferList", TestSerializedScriptValueInterfaceV8Internal::acceptTransferListMethodCallback},
297413 {"multiTransferList", TestSerializedScriptValueInterfaceV8Internal::multiTransferListMethodCallback},

@@v8::Handle<v8::Value> V8TestSerializedScriptValueInterface::constructorCallback(
308424 return TestSerializedScriptValueInterfaceV8Internal::constructor(args);
309425}
310426
311 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestSerializedScriptValueInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 427static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestSerializedScriptValueInterfaceTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
312428{
313429 desc->ReadOnlyPrototype();
314430

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestSerializedScriptValue
324440 UNUSED_PARAM(proto); // In some cases, it will not be used.
325441
326442
 443 if (currentWorldType == MainWorld)
 444 V8DOMConfiguration::addToTemplate(desc, V8TestSerializedScriptValueInterfaceAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestSerializedScriptValueInterfaceAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 445
327446 // Custom toString template
328447 desc->Set(v8::String::NewSymbol("toString"), V8PerIsolateData::current()->toStringTemplate());
329448 return desc;
330449}
331450
332 v8::Persistent<v8::FunctionTemplate> V8TestSerializedScriptValueInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 451v8::Persistent<v8::FunctionTemplate> V8TestSerializedScriptValueInterface::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
333452{
334453 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
335  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
336  if (result != data->templateMap(worldType).end())
 454 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 455 if (result != data->templateMap(currentWorldType).end())
337456 return result->value;
338457
339458 v8::HandleScope handleScope;
340459 v8::Persistent<v8::FunctionTemplate> templ =
341  ConfigureV8TestSerializedScriptValueInterfaceTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
342  data->templateMap(worldType).add(&info, templ);
 460 ConfigureV8TestSerializedScriptValueInterfaceTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 461 data->templateMap(currentWorldType).add(&info, templ);
343462 return templ;
344463}
345464
346 bool V8TestSerializedScriptValueInterface::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 465bool V8TestSerializedScriptValueInterface::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
347466{
348  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 467 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
349468}
350469
351470

Source/WebCore/bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h

@@inline v8::Handle<v8::Value> toV8Fast(TestSerializedScriptValueInterface* impl,
8282}
8383
8484template<class HolderContainer, class Wrappable>
 85inline v8::Handle<v8::Value> toV8FastForMainWorld(TestSerializedScriptValueInterface* impl, const HolderContainer& container, Wrappable* wrappable)
 86{
 87 if (UNLIKELY(!impl))
 88 return v8Null(container.GetIsolate());
 89 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 90 if (!wrapper.IsEmpty())
 91 return wrapper;
 92 return wrap(impl, container.Holder(), container.GetIsolate());
 93}
 94
 95template<class HolderContainer, class Wrappable>
 96inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestSerializedScriptValueInterface > impl, const HolderContainer& container, Wrappable* wrappable)
 97{
 98 return toV8FastForMainWorld(impl.get(), container, wrappable);
 99}
 100
 101
 102template<class HolderContainer, class Wrappable>
85103inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestSerializedScriptValueInterface > impl, const HolderContainer& container, Wrappable* wrappable)
86104{
87105 return toV8Fast(impl.get(), container, wrappable);

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

@@static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterCallback(v8::Local<v8
9191 return TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter(name, info);
9292}
9393
 94static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 95{
 96 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 97 return v8::Number::New(static_cast<double>(imp->unsignedLongLongAttr()));
 98}
 99
 100static v8::Handle<v8::Value> unsignedLongLongAttrAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 101{
 102 return TestTypedefsV8Internal::unsignedLongLongAttrAttrGetterForMainWorld(name, info);
 103}
 104
94105static void unsignedLongLongAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
95106{
96107 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static void unsignedLongLongAttrAttrSetterCallback(v8::Local<v8::String> name, v
104115 TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter(name, value, info);
105116}
106117
 118static void unsignedLongLongAttrAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 119{
 120 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 121 unsigned long long v = toInt64(value);
 122 imp->setUnsignedLongLongAttr(v);
 123 return;
 124}
 125
 126static void unsignedLongLongAttrAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 127{
 128 TestTypedefsV8Internal::unsignedLongLongAttrAttrSetterForMainWorld(name, value, info);
 129}
 130
107131static v8::Handle<v8::Value> immutableSerializedScriptValueAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
108132{
109133 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static v8::Handle<v8::Value> immutableSerializedScriptValueAttrGetterCallback(v8
115139 return TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter(name, info);
116140}
117141
 142static v8::Handle<v8::Value> immutableSerializedScriptValueAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 143{
 144 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 145 return imp->immutableSerializedScriptValue() ? imp->immutableSerializedScriptValue()->deserialize() : v8::Handle<v8::Value>(v8Null(info.GetIsolate()));
 146}
 147
 148static v8::Handle<v8::Value> immutableSerializedScriptValueAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 149{
 150 return TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetterForMainWorld(name, info);
 151}
 152
118153static void immutableSerializedScriptValueAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
119154{
120155 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static void immutableSerializedScriptValueAttrSetterCallback(v8::Local<v8::Strin
128163 TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter(name, value, info);
129164}
130165
 166static void immutableSerializedScriptValueAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 167{
 168 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 169 RefPtr<SerializedScriptValue> v = SerializedScriptValue::create(value, info.GetIsolate());
 170 imp->setImmutableSerializedScriptValue(WTF::getPtr(v));
 171 return;
 172}
 173
 174static void immutableSerializedScriptValueAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 175{
 176 TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetterForMainWorld(name, value, info);
 177}
 178
131179static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
132180{
133181 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterCallback(v8::Local
143191 return TestTypedefsV8Internal::attrWithGetterExceptionAttrGetter(name, info);
144192}
145193
 194static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 195{
 196 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 197 ExceptionCode ec = 0;
 198 int v = imp->attrWithGetterException(ec);
 199 if (UNLIKELY(ec))
 200 return setDOMException(ec, info.GetIsolate());
 201 return v8Integer(v, info.GetIsolate());
 202}
 203
 204static v8::Handle<v8::Value> attrWithGetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 205{
 206 return TestTypedefsV8Internal::attrWithGetterExceptionAttrGetterForMainWorld(name, info);
 207}
 208
146209static void attrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
147210{
148211 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static void attrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String> name
156219 TestTypedefsV8Internal::attrWithGetterExceptionAttrSetter(name, value, info);
157220}
158221
 222static void attrWithGetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 223{
 224 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 225 int v = toInt32(value);
 226 imp->setAttrWithGetterException(v);
 227 return;
 228}
 229
 230static void attrWithGetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 231{
 232 TestTypedefsV8Internal::attrWithGetterExceptionAttrSetterForMainWorld(name, value, info);
 233}
 234
159235static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
160236{
161237 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterCallback(v8::Local
167243 return TestTypedefsV8Internal::attrWithSetterExceptionAttrGetter(name, info);
168244}
169245
 246static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 247{
 248 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 249 return v8Integer(imp->attrWithSetterException(), info.GetIsolate());
 250}
 251
 252static v8::Handle<v8::Value> attrWithSetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 253{
 254 return TestTypedefsV8Internal::attrWithSetterExceptionAttrGetterForMainWorld(name, info);
 255}
 256
170257static void attrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
171258{
172259 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static void attrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String> name
183270 TestTypedefsV8Internal::attrWithSetterExceptionAttrSetter(name, value, info);
184271}
185272
 273static void attrWithSetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 274{
 275 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 276 int v = toInt32(value);
 277 ExceptionCode ec = 0;
 278 imp->setAttrWithSetterException(v, ec);
 279 if (UNLIKELY(ec))
 280 setDOMException(ec, info.GetIsolate());
 281 return;
 282}
 283
 284static void attrWithSetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 285{
 286 TestTypedefsV8Internal::attrWithSetterExceptionAttrSetterForMainWorld(name, value, info);
 287}
 288
186289static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
187290{
188291 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterCallback(v8:
198301 return TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrGetter(name, info);
199302}
200303
 304static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 305{
 306 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 307 ExceptionCode ec = 0;
 308 String v = imp->stringAttrWithGetterException(ec);
 309 if (UNLIKELY(ec))
 310 return setDOMException(ec, info.GetIsolate());
 311 return v8String(v, info.GetIsolate(), ReturnUnsafeHandle);
 312}
 313
 314static v8::Handle<v8::Value> stringAttrWithGetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 315{
 316 return TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrGetterForMainWorld(name, info);
 317}
 318
201319static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
202320{
203321 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static void stringAttrWithGetterExceptionAttrSetterCallback(v8::Local<v8::String
211329 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetter(name, value, info);
212330}
213331
 332static void stringAttrWithGetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 333{
 334 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 335 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 336 imp->setStringAttrWithGetterException(v);
 337 return;
 338}
 339
 340static void stringAttrWithGetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 341{
 342 TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetterForMainWorld(name, value, info);
 343}
 344
214345static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
215346{
216347 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterCallback(v8:
222353 return TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetter(name, info);
223354}
224355
 356static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 357{
 358 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 359 return v8String(imp->stringAttrWithSetterException(), info.GetIsolate(), ReturnUnsafeHandle);
 360}
 361
 362static v8::Handle<v8::Value> stringAttrWithSetterExceptionAttrGetterCallbackForMainWorld(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 363{
 364 return TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetterForMainWorld(name, info);
 365}
 366
225367static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
226368{
227369 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());

@@static void stringAttrWithSetterExceptionAttrSetterCallback(v8::Local<v8::String
238380 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetter(name, value, info);
239381}
240382
 383static void stringAttrWithSetterExceptionAttrSetterForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 384{
 385 TestTypedefs* imp = V8TestTypedefs::toNative(info.Holder());
 386 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, v, value);
 387 ExceptionCode ec = 0;
 388 imp->setStringAttrWithSetterException(v, ec);
 389 if (UNLIKELY(ec))
 390 setDOMException(ec, info.GetIsolate());
 391 return;
 392}
 393
 394static void stringAttrWithSetterExceptionAttrSetterCallbackForMainWorld(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
 395{
 396 TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetterForMainWorld(name, value, info);
 397}
 398
241399static v8::Handle<v8::Value> TestTypedefsConstructorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
242400{
243401 v8::Handle<v8::Value> data = info.Data();

@@static const V8DOMConfiguration::BatchedAttribute V8TestTypedefsAttrs[] = {
513671 {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetterCallback, TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetterCallback, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
514672};
515673
 674static const V8DOMConfiguration::BatchedAttribute V8TestTypedefsAttrsForMainWorld[] = {
 675 // Attribute 'unsignedLongLongAttr' (Type: 'attribute' ExtAttr: '')
 676 {"unsignedLongLongAttr", TestTypedefsV8Internal::unsignedLongLongAttrAttrGetterCallbackForMainWorld, TestTypedefsV8Internal::unsignedLongLongAttrAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 677 // Attribute 'immutableSerializedScriptValue' (Type: 'attribute' ExtAttr: 'Immutable')
 678 {"immutableSerializedScriptValue", TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetterCallbackForMainWorld, TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 679 // Attribute 'TestSubObj' (Type: 'readonly attribute' ExtAttr: '')
 680 {"TestSubObj", TestTypedefsV8Internal::TestTypedefsConstructorGetter, 0, &V8TestSubObj::info, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 681 // Attribute 'attrWithGetterException' (Type: 'attribute' ExtAttr: '')
 682 {"attrWithGetterException", TestTypedefsV8Internal::attrWithGetterExceptionAttrGetterCallbackForMainWorld, TestTypedefsV8Internal::attrWithGetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 683 // Attribute 'attrWithSetterException' (Type: 'attribute' ExtAttr: '')
 684 {"attrWithSetterException", TestTypedefsV8Internal::attrWithSetterExceptionAttrGetterCallbackForMainWorld, TestTypedefsV8Internal::attrWithSetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 685 // Attribute 'stringAttrWithGetterException' (Type: 'attribute' ExtAttr: '')
 686 {"stringAttrWithGetterException", TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrGetterCallbackForMainWorld, TestTypedefsV8Internal::stringAttrWithGetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 687 // Attribute 'stringAttrWithSetterException' (Type: 'attribute' ExtAttr: '')
 688 {"stringAttrWithSetterException", TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrGetterCallbackForMainWorld, TestTypedefsV8Internal::stringAttrWithSetterExceptionAttrSetterCallbackForMainWorld, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */},
 689};
 690
516691static const V8DOMConfiguration::BatchedMethod V8TestTypedefsMethods[] = {
517692 {"func", TestTypedefsV8Internal::funcMethodCallback},
518693 {"multiTransferList", TestTypedefsV8Internal::multiTransferListMethodCallback},

@@v8::Handle<v8::Value> V8TestTypedefs::constructorCallback(const v8::Arguments& a
533708 return TestTypedefsV8Internal::constructor(args);
534709}
535710
536 static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType worldType)
 711static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::Persistent<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldType currentWorldType)
537712{
538713 desc->ReadOnlyPrototype();
539714

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::
549724 UNUSED_PARAM(proto); // In some cases, it will not be used.
550725
551726
 727 if (currentWorldType == MainWorld)
 728 V8DOMConfiguration::addToTemplate(desc, V8TestTypedefsAttrsForMainWorld, WTF_ARRAY_LENGTH(V8TestTypedefsAttrsForMainWorld), 0, 0, isolate, defaultSignature);
 729
552730 // Custom Signature 'methodWithSequenceArg'
553731 const int methodWithSequenceArgArgc = 1;
554  v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8sequence<SerializedScriptValue>::info, worldType) };
 732 v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8sequence<SerializedScriptValue>::info, currentWorldType) };
555733 v8::Handle<v8::Signature> methodWithSequenceArgSignature = v8::Signature::New(desc, methodWithSequenceArgArgc, methodWithSequenceArgArgv);
556734 proto->Set(v8::String::NewSymbol("methodWithSequenceArg"), v8::FunctionTemplate::New(TestTypedefsV8Internal::methodWithSequenceArgMethodCallback, v8Undefined(), methodWithSequenceArgSignature));
557735
558736 // Custom Signature 'nullableArrayArg'
559737 const int nullableArrayArgArgc = 1;
560  v8::Handle<v8::FunctionTemplate> nullableArrayArgArgv[nullableArrayArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, worldType) };
 738 v8::Handle<v8::FunctionTemplate> nullableArrayArgArgv[nullableArrayArgArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, currentWorldType) };
561739 v8::Handle<v8::Signature> nullableArrayArgSignature = v8::Signature::New(desc, nullableArrayArgArgc, nullableArrayArgArgv);
562740 proto->Set(v8::String::NewSymbol("nullableArrayArg"), v8::FunctionTemplate::New(TestTypedefsV8Internal::nullableArrayArgMethodCallback, v8Undefined(), nullableArrayArgSignature));
563741
564742 // Custom Signature 'stringArrayFunction'
565743 const int stringArrayFunctionArgc = 1;
566  v8::Handle<v8::FunctionTemplate> stringArrayFunctionArgv[stringArrayFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, worldType) };
 744 v8::Handle<v8::FunctionTemplate> stringArrayFunctionArgv[stringArrayFunctionArgc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, currentWorldType) };
567745 v8::Handle<v8::Signature> stringArrayFunctionSignature = v8::Signature::New(desc, stringArrayFunctionArgc, stringArrayFunctionArgv);
568746 proto->Set(v8::String::NewSymbol("stringArrayFunction"), v8::FunctionTemplate::New(TestTypedefsV8Internal::stringArrayFunctionMethodCallback, v8Undefined(), stringArrayFunctionSignature));
569747
570748 // Custom Signature 'stringArrayFunction2'
571749 const int stringArrayFunction2Argc = 1;
572  v8::Handle<v8::FunctionTemplate> stringArrayFunction2Argv[stringArrayFunction2Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, worldType) };
 750 v8::Handle<v8::FunctionTemplate> stringArrayFunction2Argv[stringArrayFunction2Argc] = { V8PerIsolateData::from(isolate)->rawTemplate(&V8DOMString[]::info, currentWorldType) };
573751 v8::Handle<v8::Signature> stringArrayFunction2Signature = v8::Signature::New(desc, stringArrayFunction2Argc, stringArrayFunction2Argv);
574752 proto->Set(v8::String::NewSymbol("stringArrayFunction2"), v8::FunctionTemplate::New(TestTypedefsV8Internal::stringArrayFunction2MethodCallback, v8Undefined(), stringArrayFunction2Signature));
575753

@@static v8::Persistent<v8::FunctionTemplate> ConfigureV8TestTypedefsTemplate(v8::
578756 return desc;
579757}
580758
581 v8::Persistent<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolate, WrapperWorldType worldType)
 759v8::Persistent<v8::FunctionTemplate> V8TestTypedefs::GetTemplate(v8::Isolate* isolate, WrapperWorldType currentWorldType)
582760{
583761 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
584  V8PerIsolateData::TemplateMap::iterator result = data->templateMap(worldType).find(&info);
585  if (result != data->templateMap(worldType).end())
 762 V8PerIsolateData::TemplateMap::iterator result = data->templateMap(currentWorldType).find(&info);
 763 if (result != data->templateMap(currentWorldType).end())
586764 return result->value;
587765
588766 v8::HandleScope handleScope;
589767 v8::Persistent<v8::FunctionTemplate> templ =
590  ConfigureV8TestTypedefsTemplate(data->rawTemplate(&info, worldType), isolate, worldType);
591  data->templateMap(worldType).add(&info, templ);
 768 ConfigureV8TestTypedefsTemplate(data->rawTemplate(&info, currentWorldType), isolate, currentWorldType);
 769 data->templateMap(currentWorldType).add(&info, templ);
592770 return templ;
593771}
594772
595 bool V8TestTypedefs::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType worldType)
 773bool V8TestTypedefs::HasInstance(v8::Handle<v8::Value> value, v8::Isolate* isolate, WrapperWorldType currentWorldType)
596774{
597  return V8PerIsolateData::from(isolate)->hasInstance(&info, value, worldType);
 775 return V8PerIsolateData::from(isolate)->hasInstance(&info, value, currentWorldType);
598776}
599777
600778

Source/WebCore/bindings/scripts/test/V8/V8TestTypedefs.h

@@inline v8::Handle<v8::Value> toV8Fast(TestTypedefs* impl, const HolderContainer&
8181}
8282
8383template<class HolderContainer, class Wrappable>
 84inline v8::Handle<v8::Value> toV8FastForMainWorld(TestTypedefs* impl, const HolderContainer& container, Wrappable* wrappable)
 85{
 86 if (UNLIKELY(!impl))
 87 return v8Null(container.GetIsolate());
 88 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl);
 89 if (!wrapper.IsEmpty())
 90 return wrapper;
 91 return wrap(impl, container.Holder(), container.GetIsolate());
 92}
 93
 94template<class HolderContainer, class Wrappable>
 95inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestTypedefs > impl, const HolderContainer& container, Wrappable* wrappable)
 96{
 97 return toV8FastForMainWorld(impl.get(), container, wrappable);
 98}
 99
 100
 101template<class HolderContainer, class Wrappable>
84102inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestTypedefs > impl, const HolderContainer& container, Wrappable* wrappable)
85103{
86104 return toV8Fast(impl.get(), container, wrappable);

Source/WebCore/bindings/v8/DOMDataStore.h

@@public:
8484 }
8585
8686 template<typename T>
 87 static v8::Handle<v8::Object> getWrapperForMainWorld(T* object)
 88 {
 89 if (mainWorldWrapperIsStoredInObject(object) && isMainWorldObject(object)) {
 90 if (LIKELY(!DOMWrapperWorld::isolatedWorldsExist()))
 91 return getWrapperFromObject(object);
 92 }
 93 return mainWorldStore()->get(object);
 94 }
 95
 96 template<typename T>
8797 static void setWrapper(T* object, v8::Handle<v8::Object> wrapper, v8::Isolate* isolate, const WrapperConfiguration& configuration)
8898 {
8999 if (mainWorldWrapperIsStoredInObject(object) && isMainWorldObject(object)) {

Source/WebCore/bindings/v8/V8DOMConfiguration.cpp

@@v8::Local<v8::Signature> V8DOMConfiguration::configureTemplate(v8::Persistent<v8
7777 return defaultSignature;
7878}
7979
 80void V8DOMConfiguration::addToTemplate(v8::Persistent<v8::FunctionTemplate> functionDescriptor, const BatchedAttribute* attributes, size_t attributeCount, const BatchedMethod* callbacks, size_t callbackCount, v8::Isolate* isolate, v8::Local<v8::Signature> signature)
 81{
 82 if (attributeCount) {
 83 v8::Local<v8::ObjectTemplate> instance = functionDescriptor->InstanceTemplate();
 84 batchConfigureAttributes(instance, functionDescriptor->PrototypeTemplate(), attributes, attributeCount, isolate);
 85 }
 86 if (callbackCount)
 87 batchConfigureCallbacks(functionDescriptor->PrototypeTemplate(), signature, static_cast<v8::PropertyAttribute>(v8::DontDelete), callbacks, callbackCount, isolate);
 88}
 89
8090} // namespace WebCore

Source/WebCore/bindings/v8/V8DOMConfiguration.h

@@public:
8585 static void batchConfigureCallbacks(v8::Handle<v8::ObjectTemplate>, v8::Handle<v8::Signature>, v8::PropertyAttribute, const BatchedMethod*, size_t callbackCount, v8::Isolate*);
8686
8787 static v8::Local<v8::Signature> configureTemplate(v8::Persistent<v8::FunctionTemplate>, const char* interfaceName, v8::Persistent<v8::FunctionTemplate> parentClass, size_t fieldCount, const BatchedAttribute*, size_t attributeCount, const BatchedMethod*, size_t callbackCount, v8::Isolate*);
 88
 89 static void addToTemplate(v8::Persistent<v8::FunctionTemplate>, const BatchedAttribute*, size_t attributeCount, const BatchedMethod*, size_t callbackCount, v8::Isolate*, v8::Local<v8::Signature>);
8890};
8991
9092} // namespace WebCore