Changeset 126141 in webkit
- Timestamp:
- Aug 21, 2012 12:33:09 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126140 r126141 1 2012-08-21 Kentaro Hara <haraken@chromium.org> 2 3 [V8] Remove String::New() from V8 binding (Part 1) 4 https://bugs.webkit.org/show_bug.cgi?id=94574 5 6 Reviewed by Adam Barth. 7 8 Currently, V8 binding mixes String::New(), String::NewSymbol() and v8String(). 9 String::New() should be replaced with String::NewSymbol() or v8String(), 10 depending on use cases: 11 12 - If it is a symbol (e.g. attribute name, constant string, etc), 13 String::NewSymbol() should be used. Cache of created symbols is managed by V8. 14 15 - If it is not a symbol, v8String() should be used. Cache of created strings 16 is managed by V8 binding (i.e. StringCache class). 17 18 This patch replaces String::New() for symbols with String::NewSymbol(). 19 20 No tests. No change in behavior. 21 22 * bindings/scripts/CodeGeneratorV8.pm: 23 (GenerateNamedConstructorCallback): 24 (GenerateNonStandardFunction): 25 (GenerateImplementation): 26 * bindings/scripts/test/V8/V8Float64Array.cpp: 27 (WebCore::ConfigureV8Float64ArrayTemplate): 28 * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp: 29 (WebCore::ConfigureV8TestActiveDOMObjectTemplate): 30 * bindings/scripts/test/V8/V8TestEventTarget.cpp: 31 (WebCore::ConfigureV8TestEventTargetTemplate): 32 * bindings/scripts/test/V8/V8TestInterface.cpp: 33 (WebCore::ConfigureV8TestInterfaceTemplate): 34 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp: 35 (WebCore::V8TestNamedConstructorConstructor::GetTemplate): 36 * bindings/scripts/test/V8/V8TestObj.cpp: 37 (WebCore::ConfigureV8TestObjTemplate): 38 (WebCore::V8TestObj::installPerContextProperties): 39 * bindings/v8/V8DOMConfiguration.cpp: 40 (WebCore::V8DOMConfiguration::batchConfigureConstants): 41 (WebCore::V8DOMConfiguration::batchConfigureCallbacks): 42 (WebCore::V8DOMConfiguration::configureTemplate): 43 * bindings/v8/V8DOMConfiguration.h: 44 (WebCore::V8DOMConfiguration::configureAttribute): 45 1 46 2012-08-21 Sheriff Bot <webkit.review.bot@gmail.com> 2 47 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r125745 r126141 2099 2099 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate(); 2100 2100 instance->SetInternalFieldCount(V8${implClassName}::internalFieldCount); 2101 result->SetClassName(v8::String::New ("${implClassName}"));2101 result->SetClassName(v8::String::NewSymbol("${implClassName}")); 2102 2102 result->Inherit(V8${implClassName}::GetTemplate()); 2103 2103 … … 2299 2299 2300 2300 // $commentInfo 2301 ${conditional}$template->SetAccessor(v8::String::New ("$name"), ${interfaceName}V8Internal::${name}AttrGetter, ${interfaceName}V8Internal::${interfaceName}DomainSafeFunctionSetter, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>($property_attributes));2301 ${conditional}$template->SetAccessor(v8::String::NewSymbol("$name"), ${interfaceName}V8Internal::${name}AttrGetter, ${interfaceName}V8Internal::${interfaceName}DomainSafeFunctionSetter, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>($property_attributes)); 2302 2302 END 2303 2303 return; … … 2330 2330 push(@implContent, "#if ${conditionalString}\n") if $conditionalString; 2331 2331 2332 push(@implContent, " ${conditional}$template->Set(v8::String::New (\"$name\"), v8::FunctionTemplate::New($callback, v8Undefined(), ${signature})$property_attributes);\n");2332 push(@implContent, " ${conditional}$template->Set(v8::String::NewSymbol(\"$name\"), v8::FunctionTemplate::New($callback, v8Undefined(), ${signature})$property_attributes);\n"); 2333 2333 2334 2334 push(@implContent, "#endif // ${conditionalString}\n") if $conditionalString; … … 2952 2952 // For security reasons, these functions are on the instance instead 2953 2953 // of on the prototype object to ensure that they cannot be overwritten. 2954 instance->SetAccessor(v8::String::New ("reload"), V8Location::reloadAccessorGetter, 0, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));2955 instance->SetAccessor(v8::String::New ("replace"), V8Location::replaceAccessorGetter, 0, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));2956 instance->SetAccessor(v8::String::New ("assign"), V8Location::assignAccessorGetter, 0, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly));2954 instance->SetAccessor(v8::String::NewSymbol("reload"), V8Location::reloadAccessorGetter, 0, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)); 2955 instance->SetAccessor(v8::String::NewSymbol("replace"), V8Location::replaceAccessorGetter, 0, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)); 2956 instance->SetAccessor(v8::String::NewSymbol("assign"), V8Location::assignAccessorGetter, 0, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly)); 2957 2957 END 2958 2958 } … … 3041 3041 my $callback = GetFunctionTemplateCallbackName($runtimeFunc, $interfaceName); 3042 3042 push(@implContent, <<END); 3043 proto->Set(v8::String::New ("${name}"), v8::FunctionTemplate::New(${callback}, v8Undefined(), defaultSignature)->GetFunction());3043 proto->Set(v8::String::NewSymbol("${name}"), v8::FunctionTemplate::New(${callback}, v8Undefined(), defaultSignature)->GetFunction()); 3044 3044 END 3045 3045 push(@implContent, " }\n"); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8Float64Array.cpp
r125495 r126141 108 108 v8::Handle<v8::FunctionTemplate> fooArgv[fooArgc] = { V8Float32Array::GetRawTemplate() }; 109 109 v8::Handle<v8::Signature> fooSignature = v8::Signature::New(desc, fooArgc, fooArgv); 110 proto->Set(v8::String::New ("foo"), v8::FunctionTemplate::New(Float64ArrayV8Internal::fooCallback, v8Undefined(), fooSignature));110 proto->Set(v8::String::NewSymbol("foo"), v8::FunctionTemplate::New(Float64ArrayV8Internal::fooCallback, v8Undefined(), fooSignature)); 111 111 112 112 // Custom toString template -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestActiveDOMObject.cpp
r125495 r126141 135 135 v8::Handle<v8::FunctionTemplate> excitingFunctionArgv[excitingFunctionArgc] = { V8Node::GetRawTemplate() }; 136 136 v8::Handle<v8::Signature> excitingFunctionSignature = v8::Signature::New(desc, excitingFunctionArgc, excitingFunctionArgv); 137 proto->Set(v8::String::New ("excitingFunction"), v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::excitingFunctionCallback, v8Undefined(), excitingFunctionSignature));137 proto->Set(v8::String::NewSymbol("excitingFunction"), v8::FunctionTemplate::New(TestActiveDOMObjectV8Internal::excitingFunctionCallback, v8Undefined(), excitingFunctionSignature)); 138 138 139 139 // Function 'postMessage' (ExtAttr: 'DoNotCheckSecurity') 140 proto->SetAccessor(v8::String::New ("postMessage"), TestActiveDOMObjectV8Internal::postMessageAttrGetter, TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete));140 proto->SetAccessor(v8::String::NewSymbol("postMessage"), TestActiveDOMObjectV8Internal::postMessageAttrGetter, TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter, v8Undefined(), v8::ALL_CAN_READ, static_cast<v8::PropertyAttribute>(v8::DontDelete)); 141 141 142 142 // Custom toString template -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventTarget.cpp
r125495 r126141 132 132 v8::Handle<v8::FunctionTemplate> dispatchEventArgv[dispatchEventArgc] = { V8Event::GetRawTemplate() }; 133 133 v8::Handle<v8::Signature> dispatchEventSignature = v8::Signature::New(desc, dispatchEventArgc, dispatchEventArgv); 134 proto->Set(v8::String::New ("dispatchEvent"), v8::FunctionTemplate::New(TestEventTargetV8Internal::dispatchEventCallback, v8Undefined(), dispatchEventSignature));134 proto->Set(v8::String::NewSymbol("dispatchEvent"), v8::FunctionTemplate::New(TestEventTargetV8Internal::dispatchEventCallback, v8Undefined(), dispatchEventSignature)); 135 135 136 136 // Custom toString template -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp
r125495 r126141 296 296 v8::Handle<v8::Signature> supplementalMethod2Signature = v8::Signature::New(desc, supplementalMethod2Argc, supplementalMethod2Argv); 297 297 #if ENABLE(Condition11) || ENABLE(Condition12) 298 proto->Set(v8::String::New ("supplementalMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2Callback, v8Undefined(), supplementalMethod2Signature));299 #endif // ENABLE(Condition11) || ENABLE(Condition12) 300 #if ENABLE(Condition11) || ENABLE(Condition12) 301 desc->Set(v8::String::New ("supplementalMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod4Callback, v8Undefined(), v8::Local<v8::Signature>()));298 proto->Set(v8::String::NewSymbol("supplementalMethod2"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod2Callback, v8Undefined(), supplementalMethod2Signature)); 299 #endif // ENABLE(Condition11) || ENABLE(Condition12) 300 #if ENABLE(Condition11) || ENABLE(Condition12) 301 desc->Set(v8::String::NewSymbol("supplementalMethod4"), v8::FunctionTemplate::New(TestInterfaceV8Internal::supplementalMethod4Callback, v8Undefined(), v8::Local<v8::Signature>())); 302 302 #endif // ENABLE(Condition11) || ENABLE(Condition12) 303 303 V8DOMConfiguration::batchConfigureConstants(desc, proto, TestInterfaceConsts, WTF_ARRAY_LENGTH(TestInterfaceConsts)); -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestNamedConstructor.cpp
r125495 r126141 96 96 v8::Local<v8::ObjectTemplate> instance = result->InstanceTemplate(); 97 97 instance->SetInternalFieldCount(V8TestNamedConstructor::internalFieldCount); 98 result->SetClassName(v8::String::New ("TestNamedConstructor"));98 result->SetClassName(v8::String::NewSymbol("TestNamedConstructor")); 99 99 result->Inherit(V8TestNamedConstructor::GetTemplate()); 100 100 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r125495 r126141 2193 2193 v8::Handle<v8::FunctionTemplate> voidMethodWithArgsArgv[voidMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() }; 2194 2194 v8::Handle<v8::Signature> voidMethodWithArgsSignature = v8::Signature::New(desc, voidMethodWithArgsArgc, voidMethodWithArgsArgv); 2195 proto->Set(v8::String::New ("voidMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::voidMethodWithArgsCallback, v8Undefined(), voidMethodWithArgsSignature));2195 proto->Set(v8::String::NewSymbol("voidMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::voidMethodWithArgsCallback, v8Undefined(), voidMethodWithArgsSignature)); 2196 2196 2197 2197 // Custom Signature 'MethodWithArgs' … … 2199 2199 v8::Handle<v8::FunctionTemplate> MethodWithArgsArgv[MethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() }; 2200 2200 v8::Handle<v8::Signature> MethodWithArgsSignature = v8::Signature::New(desc, MethodWithArgsArgc, MethodWithArgsArgv); 2201 proto->Set(v8::String::New ("MethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::MethodWithArgsCallback, v8Undefined(), MethodWithArgsSignature));2201 proto->Set(v8::String::NewSymbol("MethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::MethodWithArgsCallback, v8Undefined(), MethodWithArgsSignature)); 2202 2202 2203 2203 // Custom Signature 'objMethodWithArgs' … … 2205 2205 v8::Handle<v8::FunctionTemplate> objMethodWithArgsArgv[objMethodWithArgsArgc] = { v8::Handle<v8::FunctionTemplate>(), v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() }; 2206 2206 v8::Handle<v8::Signature> objMethodWithArgsSignature = v8::Signature::New(desc, objMethodWithArgsArgc, objMethodWithArgsArgv); 2207 proto->Set(v8::String::New ("objMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::objMethodWithArgsCallback, v8Undefined(), objMethodWithArgsSignature));2207 proto->Set(v8::String::NewSymbol("objMethodWithArgs"), v8::FunctionTemplate::New(TestObjV8Internal::objMethodWithArgsCallback, v8Undefined(), objMethodWithArgsSignature)); 2208 2208 2209 2209 // Custom Signature 'methodWithSequenceArg' … … 2211 2211 v8::Handle<v8::FunctionTemplate> methodWithSequenceArgArgv[methodWithSequenceArgArgc] = { V8sequence<ScriptProfile>::GetRawTemplate() }; 2212 2212 v8::Handle<v8::Signature> methodWithSequenceArgSignature = v8::Signature::New(desc, methodWithSequenceArgArgc, methodWithSequenceArgArgv); 2213 proto->Set(v8::String::New ("methodWithSequenceArg"), v8::FunctionTemplate::New(TestObjV8Internal::methodWithSequenceArgCallback, v8Undefined(), methodWithSequenceArgSignature));2213 proto->Set(v8::String::NewSymbol("methodWithSequenceArg"), v8::FunctionTemplate::New(TestObjV8Internal::methodWithSequenceArgCallback, v8Undefined(), methodWithSequenceArgSignature)); 2214 2214 2215 2215 // Custom Signature 'methodThatRequiresAllArgsAndThrows' … … 2217 2217 v8::Handle<v8::FunctionTemplate> methodThatRequiresAllArgsAndThrowsArgv[methodThatRequiresAllArgsAndThrowsArgc] = { v8::Handle<v8::FunctionTemplate>(), V8TestObj::GetRawTemplate() }; 2218 2218 v8::Handle<v8::Signature> methodThatRequiresAllArgsAndThrowsSignature = v8::Signature::New(desc, methodThatRequiresAllArgsAndThrowsArgc, methodThatRequiresAllArgsAndThrowsArgv); 2219 proto->Set(v8::String::New ("methodThatRequiresAllArgsAndThrows"), v8::FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature));2220 desc->Set(v8::String::New ("classMethod"), v8::FunctionTemplate::New(TestObjV8Internal::classMethodCallback, v8Undefined(), v8::Local<v8::Signature>()));2221 desc->Set(v8::String::New ("classMethodWithOptional"), v8::FunctionTemplate::New(TestObjV8Internal::classMethodWithOptionalCallback, v8Undefined(), v8::Local<v8::Signature>()));2222 desc->Set(v8::String::New ("classMethod2"), v8::FunctionTemplate::New(V8TestObj::classMethod2Callback, v8Undefined(), v8::Local<v8::Signature>()));2219 proto->Set(v8::String::NewSymbol("methodThatRequiresAllArgsAndThrows"), v8::FunctionTemplate::New(TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback, v8Undefined(), methodThatRequiresAllArgsAndThrowsSignature)); 2220 desc->Set(v8::String::NewSymbol("classMethod"), v8::FunctionTemplate::New(TestObjV8Internal::classMethodCallback, v8Undefined(), v8::Local<v8::Signature>())); 2221 desc->Set(v8::String::NewSymbol("classMethodWithOptional"), v8::FunctionTemplate::New(TestObjV8Internal::classMethodWithOptionalCallback, v8Undefined(), v8::Local<v8::Signature>())); 2222 desc->Set(v8::String::NewSymbol("classMethod2"), v8::FunctionTemplate::New(V8TestObj::classMethod2Callback, v8Undefined(), v8::Local<v8::Signature>())); 2223 2223 #if ENABLE(Condition1) 2224 desc->Set(v8::String::New ("overloadedMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::overloadedMethod1Callback, v8Undefined(), v8::Local<v8::Signature>()));2224 desc->Set(v8::String::NewSymbol("overloadedMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::overloadedMethod1Callback, v8Undefined(), v8::Local<v8::Signature>())); 2225 2225 #endif // ENABLE(Condition1) 2226 2226 if (RuntimeEnabledFeatures::enabledAtRuntimeMethod1Enabled()) 2227 proto->Set(v8::String::New ("enabledAtRuntimeMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::enabledAtRuntimeMethod1Callback, v8Undefined(), defaultSignature));2227 proto->Set(v8::String::NewSymbol("enabledAtRuntimeMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::enabledAtRuntimeMethod1Callback, v8Undefined(), defaultSignature)); 2228 2228 if (RuntimeEnabledFeatures::featureNameEnabled()) 2229 proto->Set(v8::String::New ("enabledAtRuntimeMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::enabledAtRuntimeMethod2Callback, v8Undefined(), defaultSignature));2229 proto->Set(v8::String::NewSymbol("enabledAtRuntimeMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::enabledAtRuntimeMethod2Callback, v8Undefined(), defaultSignature)); 2230 2230 2231 2231 // Custom Signature 'convert1' … … 2233 2233 v8::Handle<v8::FunctionTemplate> convert1Argv[convert1Argc] = { V8a::GetRawTemplate() }; 2234 2234 v8::Handle<v8::Signature> convert1Signature = v8::Signature::New(desc, convert1Argc, convert1Argv); 2235 proto->Set(v8::String::New ("convert1"), v8::FunctionTemplate::New(TestObjV8Internal::convert1Callback, v8Undefined(), convert1Signature));2235 proto->Set(v8::String::NewSymbol("convert1"), v8::FunctionTemplate::New(TestObjV8Internal::convert1Callback, v8Undefined(), convert1Signature)); 2236 2236 2237 2237 // Custom Signature 'convert2' … … 2239 2239 v8::Handle<v8::FunctionTemplate> convert2Argv[convert2Argc] = { V8b::GetRawTemplate() }; 2240 2240 v8::Handle<v8::Signature> convert2Signature = v8::Signature::New(desc, convert2Argc, convert2Argv); 2241 proto->Set(v8::String::New ("convert2"), v8::FunctionTemplate::New(TestObjV8Internal::convert2Callback, v8Undefined(), convert2Signature));2241 proto->Set(v8::String::NewSymbol("convert2"), v8::FunctionTemplate::New(TestObjV8Internal::convert2Callback, v8Undefined(), convert2Signature)); 2242 2242 2243 2243 // Custom Signature 'convert4' … … 2245 2245 v8::Handle<v8::FunctionTemplate> convert4Argv[convert4Argc] = { V8d::GetRawTemplate() }; 2246 2246 v8::Handle<v8::Signature> convert4Signature = v8::Signature::New(desc, convert4Argc, convert4Argv); 2247 proto->Set(v8::String::New ("convert4"), v8::FunctionTemplate::New(TestObjV8Internal::convert4Callback, v8Undefined(), convert4Signature));2247 proto->Set(v8::String::NewSymbol("convert4"), v8::FunctionTemplate::New(TestObjV8Internal::convert4Callback, v8Undefined(), convert4Signature)); 2248 2248 2249 2249 // Custom Signature 'convert5' … … 2251 2251 v8::Handle<v8::FunctionTemplate> convert5Argv[convert5Argc] = { V8e::GetRawTemplate() }; 2252 2252 v8::Handle<v8::Signature> convert5Signature = v8::Signature::New(desc, convert5Argc, convert5Argv); 2253 proto->Set(v8::String::New ("convert5"), v8::FunctionTemplate::New(TestObjV8Internal::convert5Callback, v8Undefined(), convert5Signature));2253 proto->Set(v8::String::NewSymbol("convert5"), v8::FunctionTemplate::New(TestObjV8Internal::convert5Callback, v8Undefined(), convert5Signature)); 2254 2254 V8DOMConfiguration::batchConfigureConstants(desc, proto, TestObjConsts, WTF_ARRAY_LENGTH(TestObjConsts)); 2255 2255 … … 2311 2311 UNUSED_PARAM(defaultSignature); // In some cases, it will not be used. 2312 2312 if (ContextFeatures::enabledPerContextMethod1Enabled(impl->document())) { 2313 proto->Set(v8::String::New ("enabledPerContextMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::enabledPerContextMethod1Callback, v8Undefined(), defaultSignature)->GetFunction());2313 proto->Set(v8::String::NewSymbol("enabledPerContextMethod1"), v8::FunctionTemplate::New(TestObjV8Internal::enabledPerContextMethod1Callback, v8Undefined(), defaultSignature)->GetFunction()); 2314 2314 } 2315 2315 if (ContextFeatures::featureNameEnabled(impl->document())) { 2316 proto->Set(v8::String::New ("enabledPerContextMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::enabledPerContextMethod2Callback, v8Undefined(), defaultSignature)->GetFunction());2316 proto->Set(v8::String::NewSymbol("enabledPerContextMethod2"), v8::FunctionTemplate::New(TestObjV8Internal::enabledPerContextMethod2Callback, v8Undefined(), defaultSignature)->GetFunction()); 2317 2317 } 2318 2318 } -
trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.cpp
r125295 r126141 50 50 for (size_t i = 0; i < constantCount; ++i) { 51 51 const BatchedConstant* constant = &constants[i]; 52 functionDescriptor->Set(v8::String::New (constant->name), v8Integer(constant->value), v8::ReadOnly);53 prototype->Set(v8::String::New (constant->name), v8Integer(constant->value), v8::ReadOnly);52 functionDescriptor->Set(v8::String::NewSymbol(constant->name), v8Integer(constant->value), v8::ReadOnly); 53 prototype->Set(v8::String::NewSymbol(constant->name), v8Integer(constant->value), v8::ReadOnly); 54 54 } 55 55 } … … 62 62 { 63 63 for (size_t i = 0; i < callbackCount; ++i) 64 prototype->Set(v8::String::New (callbacks[i].name), v8::FunctionTemplate::New(callbacks[i].callback, v8Undefined(), signature), attributes);64 prototype->Set(v8::String::NewSymbol(callbacks[i].name), v8::FunctionTemplate::New(callbacks[i].callback, v8Undefined(), signature), attributes); 65 65 } 66 66 … … 74 74 size_t callbackCount) 75 75 { 76 functionDescriptor->SetClassName(v8::String::New (interfaceName));76 functionDescriptor->SetClassName(v8::String::NewSymbol(interfaceName)); 77 77 v8::Local<v8::ObjectTemplate> instance = functionDescriptor->InstanceTemplate(); 78 78 instance->SetInternalFieldCount(fieldCount); -
trunk/Source/WebCore/bindings/v8/V8DOMConfiguration.h
r125295 r126141 64 64 const BatchedAttribute& attribute) 65 65 { 66 (attribute.onPrototype ? prototype : instance)->SetAccessor(v8::String::New (attribute.name),66 (attribute.onPrototype ? prototype : instance)->SetAccessor(v8::String::NewSymbol(attribute.name), 67 67 attribute.getter, 68 68 attribute.setter,
Note: See TracChangeset
for help on using the changeset viewer.