Changeset 102797 in webkit
- Timestamp:
- Dec 14, 2011 10:36:45 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r102743 r102797 1 2011-12-14 Anders Carlsson <andersca@apple.com> 2 3 Add back the callOnMainThread overload that takes a WTF::Function 4 https://bugs.webkit.org/show_bug.cgi?id=74512 5 6 Reviewed by Darin Adler. 7 8 Add back the overload; the changes to WebCore should hopefully keep Windows building. 9 10 * wtf/MainThread.cpp: 11 (WTF::callFunctionObject): 12 (WTF::callOnMainThread): 13 * wtf/MainThread.h: 14 1 15 2011-12-13 Filip Pizlo <fpizlo@apple.com> 2 16 -
trunk/Source/JavaScriptCore/wtf/MainThread.cpp
r102737 r102797 218 218 } 219 219 220 static void callFunctionObject(void* context) 221 { 222 Function<void ()>* function = static_cast<Function<void ()>*>(context); 223 (*function)(); 224 delete function; 225 } 226 227 void callOnMainThread(const Function<void ()>& function) 228 { 229 callOnMainThread(callFunctionObject, new Function<void ()>(function)); 230 } 231 220 232 void setMainThreadCallbacksPaused(bool paused) 221 233 { -
trunk/Source/JavaScriptCore/wtf/MainThread.h
r102737 r102797 47 47 void cancelCallOnMainThread(MainThreadFunction*, void* context); 48 48 49 template<typename> class Function; 50 void callOnMainThread(const Function<void ()>&); 51 49 52 void setMainThreadCallbacksPaused(bool paused); 50 53 -
trunk/Source/WebCore/ChangeLog
r102794 r102797 1 2011-12-14 Anders Carlsson <andersca@apple.com> 2 3 Add back the callOnMainThread overload that takes a WTF::Function 4 https://bugs.webkit.org/show_bug.cgi?id=74512 5 6 Reviewed by Darin Adler. 7 8 Explicitly qualify the Function enum flag, since MSVC2005 is too stupid to disambiguate 9 the Function class template and the enum flag. 10 11 * bindings/js/JSDOMWindowCustom.cpp: 12 (WebCore::JSDOMWindow::getOwnPropertySlot): 13 (WebCore::JSDOMWindow::getOwnPropertyDescriptor): 14 * bindings/js/JSHistoryCustom.cpp: 15 (WebCore::JSHistory::getOwnPropertySlotDelegate): 16 (WebCore::JSHistory::getOwnPropertyDescriptorDelegate): 17 * bindings/js/JSLocationCustom.cpp: 18 (WebCore::JSLocation::getOwnPropertySlotDelegate): 19 (WebCore::JSLocation::getOwnPropertyDescriptorDelegate): 20 1 21 2011-12-14 Kenneth Russell <kbr@google.com> 2 22 -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r102722 r102797 138 138 // It ignores any custom properties that might be set on the DOMWindow (including a custom prototype). 139 139 entry = s_info.propHashTable(exec)->entry(exec, propertyName); 140 if (entry && !(entry->attributes() & Function) && entry->propertyGetter() == jsDOMWindowClosed) {140 if (entry && !(entry->attributes() & JSC::Function) && entry->propertyGetter() == jsDOMWindowClosed) { 141 141 slot.setCustom(thisObject, entry->propertyGetter()); 142 142 return true; 143 143 } 144 144 entry = JSDOMWindowPrototype::s_info.propHashTable(exec)->entry(exec, propertyName); 145 if (entry && (entry->attributes() & Function) && entry->function() == jsDOMWindowPrototypeFunctionClose) {145 if (entry && (entry->attributes() & JSC::Function) && entry->function() == jsDOMWindowPrototypeFunctionClose) { 146 146 slot.setCustom(thisObject, nonCachingStaticFunctionGetter<jsDOMWindowPrototypeFunctionClose, 0>); 147 147 return true; … … 171 171 entry = JSDOMWindowPrototype::s_info.propHashTable(exec)->entry(exec, propertyName); 172 172 if (entry) { 173 if (entry->attributes() & Function) {173 if (entry->attributes() & JSC::Function) { 174 174 if (entry->function() == jsDOMWindowPrototypeFunctionBlur) { 175 175 if (!allowsAccess) { … … 282 282 // It ignores any custom properties that might be set on the DOMWindow (including a custom prototype). 283 283 entry = s_info.propHashTable(exec)->entry(exec, propertyName); 284 if (entry && !(entry->attributes() & Function) && entry->propertyGetter() == jsDOMWindowClosed) {284 if (entry && !(entry->attributes() & JSC::Function) && entry->propertyGetter() == jsDOMWindowClosed) { 285 285 descriptor.setDescriptor(jsBoolean(true), ReadOnly | DontDelete | DontEnum); 286 286 return true; 287 287 } 288 288 entry = JSDOMWindowPrototype::s_info.propHashTable(exec)->entry(exec, propertyName); 289 if (entry && (entry->attributes() & Function) && entry->function() == jsDOMWindowPrototypeFunctionClose) {289 if (entry && (entry->attributes() & JSC::Function) && entry->function() == jsDOMWindowPrototypeFunctionClose) { 290 290 PropertySlot slot; 291 291 slot.setCustom(thisObject, nonCachingStaticFunctionGetter<jsDOMWindowPrototypeFunctionClose, 0>); -
trunk/Source/WebCore/bindings/js/JSHistoryCustom.cpp
r100006 r102797 69 69 if (entry) { 70 70 // Allow access to back(), forward() and go() from any frame. 71 if (entry->attributes() & Function) {71 if (entry->attributes() & JSC::Function) { 72 72 if (entry->function() == jsHistoryPrototypeFunctionBack) { 73 73 slot.setCustom(this, nonCachingStaticBackFunctionGetter); … … 110 110 PropertySlot slot; 111 111 // Allow access to back(), forward() and go() from any frame. 112 if (entry->attributes() & Function) {112 if (entry->attributes() & JSC::Function) { 113 113 if (entry->function() == jsHistoryPrototypeFunctionBack) { 114 114 slot.setCustom(this, nonCachingStaticBackFunctionGetter); -
trunk/Source/WebCore/bindings/js/JSLocationCustom.cpp
r100006 r102797 65 65 // Check for the few functions that we allow, even when called cross-domain. 66 66 const HashEntry* entry = JSLocationPrototype::s_info.propHashTable(exec)->entry(exec, propertyName); 67 if (entry && (entry->attributes() & Function)) {67 if (entry && (entry->attributes() & JSC::Function)) { 68 68 if (entry->function() == jsLocationPrototypeFunctionReplace) { 69 69 slot.setCustom(this, nonCachingStaticReplaceFunctionGetter); … … 102 102 const HashEntry* entry = JSLocationPrototype::s_info.propHashTable(exec)->entry(exec, propertyName); 103 103 PropertySlot slot; 104 if (entry && (entry->attributes() & Function)) {104 if (entry && (entry->attributes() & JSC::Function)) { 105 105 if (entry->function() == jsLocationPrototypeFunctionReplace) { 106 106 slot.setCustom(this, nonCachingStaticReplaceFunctionGetter);
Note: See TracChangeset
for help on using the changeset viewer.