Changeset 112506 in webkit
- Timestamp:
- Mar 29, 2012 1:32:50 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 deleted
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r112505 r112506 1 2012-03-29 Vineet Chaudhary <rgf748@motorola.com> 2 3 Remove custom bindings form Internals.idl of attribute type Array. 4 https://bugs.webkit.org/show_bug.cgi?id=82319 5 6 Reviewed by Kentaro Hara. 7 8 Remove custom bindings for Array type and replace Array type with sequence<String>. 9 10 No new tests. LayoutTests/fast/harness/user-preferred-language.html should pass 11 even after these changes. 12 13 * Target.pri: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp. 14 * UseJSC.cmake: Remove JSInternalsCustom.cpp. 15 * UseV8.cmake: Remove V8InternalsCustom.cpp. 16 * WebCore.gypi: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp. 17 * WebCore.vcproj/WebCoreTestSupport.vcproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp. 18 * WebCore.xcodeproj/project.pbxproj: Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp. 19 * bindings/js/JSDOMBinding.h: 20 (WebCore): 21 (WebCore::jsArray): Added new specialize function template for Strings. 22 * bindings/scripts/CodeGeneratorJS.pm: 23 (JSValueToNative): Add jsArray<String>() to deduce return type. 24 (NativeToJSValue): Added check for type String. 25 * bindings/scripts/CodeGeneratorV8.pm: 26 (JSValueToNative): Add v8Array<String>() to deduce return type. 27 (NativeToJSValue): Added check for type String. 28 * bindings/scripts/test/JS/JSTestObj.cpp: 29 (WebCore::setJSTestObjSequenceAttr): Modified results from run-binding-tests. 30 * bindings/scripts/test/V8/V8TestObj.cpp: Modified results from run-binding-tests. 31 (WebCore::TestObjInternal::sequenceAttrAttrSetter): 32 * bindings/v8/V8Binding.h: Added new specialize function template for Strings. 33 (WebCore): 34 (WebCore::v8Array): 35 (WebCore::toNativeArray): 36 * testing/Internals.idl: Replace Array type with sequence<String> 37 * testing/js/JSInternalsCustom.cpp: Removed. 38 * testing/v8/V8InternalsCustom.cpp: Removed. 39 1 40 2012-03-29 Sheriff Bot <webkit.review.bot@gmail.com> 2 41 -
trunk/Source/WebCore/Target.pri
r112453 r112506 238 238 bindings/v8/custom/V8SQLTransactionSyncCustom.cpp \ 239 239 bindings/v8/V8WorkerContextErrorHandler.cpp \ 240 testing/v8/V8InternalsCustom.cpp \241 240 testing/v8/WebCoreTestSupport.cpp 242 241 } else { … … 399 398 bridge/runtime_object.cpp \ 400 399 bridge/runtime_root.cpp \ 401 testing/js/JSInternalsCustom.cpp \402 400 testing/js/WebCoreTestSupport.cpp 403 401 } -
trunk/Source/WebCore/UseJSC.cmake
r109787 r112506 170 170 171 171 LIST(APPEND WebCoreTestSupport_SOURCES 172 testing/js/JSInternalsCustom.cpp173 172 testing/js/WebCoreTestSupport.cpp 174 173 ) -
trunk/Source/WebCore/UseV8.cmake
r110788 r112506 165 165 166 166 LIST(APPEND WebCoreTestSupport_SOURCES 167 testing/v8/V8InternalsCustom.cpp168 167 testing/v8/WebCoreTestSupport.cpp 169 168 ) -
trunk/Source/WebCore/WebCore.gypi
r112490 r112506 6149 6149 ], 6150 6150 'webcore_test_support_files': [ 6151 'testing/v8/V8InternalsCustom.cpp',6152 6151 'testing/v8/WebCoreTestSupport.cpp', 6153 6152 'testing/v8/WebCoreTestSupport.h', 6154 'testing/js/JSInternalsCustom.cpp',6155 6153 'testing/js/WebCoreTestSupport.cpp', 6156 6154 'testing/js/WebCoreTestSupport.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCoreTestSupport.vcproj
r105900 r112506 692 692 > 693 693 </File> 694 <File695 RelativePath="..\testing\js\JSInternalsCustom.cpp"696 >697 <FileConfiguration698 Name="Debug|Win32"699 >700 <Tool701 Name="VCCLCompilerTool"702 UsePrecompiledHeader="0"703 DisableSpecificWarnings="4065;4273;4565;4701;4702"704 ForcedIncludeFiles="$(NOINHERIT)"705 />706 </FileConfiguration>707 <FileConfiguration708 Name="Release|Win32"709 >710 <Tool711 Name="VCCLCompilerTool"712 UsePrecompiledHeader="0"713 DisableSpecificWarnings="4065;4273;4565;4701;4702"714 ForcedIncludeFiles="$(NOINHERIT)"715 />716 </FileConfiguration>717 <FileConfiguration718 Name="Debug_Cairo_CFLite|Win32"719 >720 <Tool721 Name="VCCLCompilerTool"722 UsePrecompiledHeader="0"723 DisableSpecificWarnings="4065;4273;4565;4701;4702"724 ForcedIncludeFiles="$(NOINHERIT)"725 />726 </FileConfiguration>727 <FileConfiguration728 Name="Release_Cairo_CFLite|Win32"729 >730 <Tool731 Name="VCCLCompilerTool"732 UsePrecompiledHeader="0"733 DisableSpecificWarnings="4065;4273;4565;4701;4702"734 ForcedIncludeFiles="$(NOINHERIT)"735 />736 </FileConfiguration>737 <FileConfiguration738 Name="Debug_All|Win32"739 >740 <Tool741 Name="VCCLCompilerTool"742 UsePrecompiledHeader="0"743 DisableSpecificWarnings="4065;4273;4565;4701;4702"744 ForcedIncludeFiles="$(NOINHERIT)"745 />746 </FileConfiguration>747 <FileConfiguration748 Name="Production|Win32"749 >750 <Tool751 Name="VCCLCompilerTool"752 UsePrecompiledHeader="0"753 DisableSpecificWarnings="4065;4273;4565;4701;4702"754 ForcedIncludeFiles="$(NOINHERIT)"755 />756 </FileConfiguration>757 </File>758 <File759 RelativePath="..\testing\js\JSInternalsCustom.h"760 >761 </File>762 694 </Filter> 763 695 <File -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r112490 r112506 110 110 0720B0A014D3323500642955 /* GenericEventQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0720B09E14D3323500642955 /* GenericEventQueue.cpp */; }; 111 111 0720B0A114D3323500642955 /* GenericEventQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 0720B09F14D3323500642955 /* GenericEventQueue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 112 07230CBC14C10ED900F6B702 /* JSInternalsCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07230CBB14C10ED900F6B702 /* JSInternalsCustom.cpp */; };113 112 072C8B11131C518600A4FCE9 /* MediaPlayerPrivateAVFoundation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076F0D0912B8192700C26AA4 /* MediaPlayerPrivateAVFoundation.cpp */; }; 114 113 0735EE6A0F40C5E4004A2604 /* MediaPlayerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 6896 6895 0720B09E14D3323500642955 /* GenericEventQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GenericEventQueue.cpp; sourceTree = "<group>"; }; 6897 6896 0720B09F14D3323500642955 /* GenericEventQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GenericEventQueue.h; sourceTree = "<group>"; }; 6898 07230CBB14C10ED900F6B702 /* JSInternalsCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternalsCustom.cpp; sourceTree = "<group>"; };6899 6897 0735EE690F40C5E4004A2604 /* MediaPlayerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlayerProxy.h; sourceTree = "<group>"; }; 6900 6898 0753860014489E9800B78452 /* CachedTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CachedTextTrack.cpp; sourceTree = "<group>"; }; … … 14538 14536 isa = PBXGroup; 14539 14537 children = ( 14540 07230CBB14C10ED900F6B702 /* JSInternalsCustom.cpp */,14541 14538 41815C1C138319830057AAA4 /* WebCoreTestSupport.cpp */, 14542 14539 41815C1D138319830057AAA4 /* WebCoreTestSupport.h */, … … 24996 24993 A7BF7EDF14C9175A0014489D /* InternalSettings.cpp in Sources */, 24997 24994 417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */, 24998 07230CBC14C10ED900F6B702 /* JSInternalsCustom.cpp in Sources */,24999 24995 A740B5A714C935AF00A77FA4 /* JSInternalSettings.cpp in Sources */, 25000 24996 41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/JSDOMBinding.h
r111520 r112506 280 280 } 281 281 282 template <typename Iterable>283 JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Iterable& iterator)282 template <typename T> 283 JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<T>& iterator) 284 284 { 285 285 JSC::MarkedArgumentBuffer list; 286 typename Iterable::const_iterator end = iterator.end();287 288 for (typename Iterable::const_iterator iter = iterator.begin(); iter != end; ++iter)286 typename Vector<T>::const_iterator end = iterator.end(); 287 288 for (typename Vector<T>::const_iterator iter = iterator.begin(); iter != end; ++iter) 289 289 list.append(toJS(exec, globalObject, WTF::getPtr(*iter))); 290 290 291 291 return JSC::constructArray(exec, globalObject, list); 292 } 293 294 template<> 295 inline JSC::JSValue jsArray(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, const Vector<String>& iterator) 296 { 297 JSC::MarkedArgumentBuffer array; 298 Vector<String>::const_iterator end = iterator.end(); 299 300 for (Vector<String>::const_iterator it = iterator.begin(); it != end; ++it) 301 array.append(jsString(exec, stringToUString(*it))); 302 303 return JSC::constructArray(exec, globalObject, array); 292 304 } 293 305 -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r112036 r112506 2938 2938 AddToImplIncludes("Event.h", $conditional) if $type eq "Event"; 2939 2939 2940 if ($codeGenerator->GetArrayType($type)) { 2941 return "toNativeArray(exec, $value)"; 2940 my $arrayType = $codeGenerator->GetArrayType($type); 2941 if ($arrayType) { 2942 return "toNativeArray<$arrayType>(exec, $value)"; 2942 2943 } 2943 2944 … … 3003 3004 my $arrayType = $codeGenerator->GetArrayType($type); 3004 3005 if ($arrayType) { 3006 if ($arrayType ne "String") { 3007 AddToImplIncludes("JS$arrayType.h", $conditional); 3008 AddToImplIncludes("$arrayType.h", $conditional); 3009 } 3005 3010 AddToImplIncludes("<runtime/JSArray.h>", $conditional); 3006 AddToImplIncludes("JS$arrayType.h", $conditional);3007 AddToImplIncludes("$arrayType.h", $conditional);3008 3011 return "jsArray(exec, $thisValue->globalObject(), $value)"; 3009 3012 } -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm
r112318 r112506 3550 3550 } 3551 3551 3552 if ($codeGenerator->GetArrayType($type)) { 3553 return "toNativeArray($value)"; 3552 my $arrayType = $codeGenerator->GetArrayType($type); 3553 if ($arrayType) { 3554 return "toNativeArray<$arrayType>($value)"; 3554 3555 } 3555 3556 … … 3769 3770 my $arrayType = $codeGenerator->GetArrayType($type); 3770 3771 if ($arrayType) { 3771 AddToImplIncludes("V8$arrayType.h"); 3772 AddToImplIncludes("$arrayType.h"); 3772 if ($arrayType ne "String") { 3773 AddToImplIncludes("V8$arrayType.h"); 3774 AddToImplIncludes("$arrayType.h"); 3775 } 3773 3776 return "v8Array($value)"; 3774 3777 } -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r111865 r112506 985 985 JSTestObj* castedThis = static_cast<JSTestObj*>(thisObject); 986 986 TestObj* impl = static_cast<TestObj*>(castedThis->impl()); 987 impl->setSequenceAttr(toNativeArray (exec, value));987 impl->setSequenceAttr(toNativeArray<ScriptProfile>(exec, value)); 988 988 } 989 989 -
trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
r112318 r112506 232 232 INC_STATS("DOM.TestObj.sequenceAttr._set"); 233 233 TestObj* imp = V8TestObj::toNative(info.Holder()); 234 Vector<ScriptProfile> v = toNativeArray (value);234 Vector<ScriptProfile> v = toNativeArray<ScriptProfile>(value); 235 235 imp->setSequenceAttr(v); 236 236 return; -
trunk/Source/WebCore/bindings/v8/V8Binding.h
r111416 r112506 287 287 } 288 288 289 template<typename Iterable>290 v8::Handle<v8::Value> v8Array(const Iterable& iterator)289 template<typename T> 290 v8::Handle<v8::Value> v8Array(const Vector<T>& iterator) 291 291 { 292 292 v8::Local<v8::Array> result = v8::Array::New(iterator.size()); 293 293 int index = 0; 294 typename Iterable::const_iterator end = iterator.end();295 for (typename Iterable::const_iterator iter = iterator.begin(); iter != end; ++iter)294 typename Vector<T>::const_iterator end = iterator.end(); 295 for (typename Vector<T>::const_iterator iter = iterator.begin(); iter != end; ++iter) 296 296 result->Set(v8::Integer::New(index++), toV8(WTF::getPtr(*iter))); 297 297 return result; 298 } 299 300 template<> 301 inline v8::Handle<v8::Value> v8Array(const Vector<String>& iterator) 302 { 303 v8::Local<v8::Array> array = v8::Array::New(iterator.size()); 304 Vector<String>::const_iterator end = iterator.end(); 305 int index = 0; 306 for (Vector<String>::const_iterator iter = iterator.begin(); iter != end; ++iter) 307 array->Set(v8::Integer::New(index++), v8String(*iter)); 308 return array; 298 309 } 299 310 … … 310 321 311 322 for (size_t i = 0; i < length; ++i) { 312 String indexedValue = v8StringToWebCoreString(array->Get(i)); 313 result.append(indexedValue); 323 result.append(v8ValueToWebCoreString(array->Get(i))); 314 324 } 315 325 return result; -
trunk/Source/WebCore/testing/Internals.idl
r112055 r112506 108 108 #endif 109 109 110 attribute [Custom] ArrayuserPreferredLanguages;110 attribute sequence<String> userPreferredLanguages; 111 111 112 112 unsigned long wheelEventHandlerCount(in Document document) raises (DOMException); -
trunk/Tools/ChangeLog
r112486 r112506 1 2012-03-29 Vineet Chaudhary <rgf748@motorola.com> 2 3 Remove custom bindings form Internals.idl of attribute type Array. 4 https://bugs.webkit.org/show_bug.cgi?id=82319 5 6 Reviewed by Kentaro Hara. 7 8 Remove JSInternalsCustom.cpp and V8InternalsCustom.cpp as no longer required. 9 10 * GNUmakefile.am: 11 1 12 2012-03-28 Mark Rowe <mrowe@apple.com> 2 13 -
trunk/Tools/GNUmakefile.am
r111340 r112506 46 46 Source/WebCore/testing/InternalSettings.cpp \ 47 47 Source/WebCore/testing/InternalSettings.h \ 48 Source/WebCore/testing/js/JSInternalsCustom.cpp \49 48 Source/WebCore/testing/js/WebCoreTestSupport.cpp \ 50 49 Source/WebCore/testing/js/WebCoreTestSupport.h
Note: See TracChangeset
for help on using the changeset viewer.