Changeset 83562 in webkit
- Timestamp:
- Apr 12, 2011 1:13:34 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r83559 r83562 1 2011-04-12 Steve Block <steveblock@google.com> 2 3 Reviewed by Oliver Hunt. 4 5 Callable objects created via JavaScriptCore API cannot be used as Geolocation callbacks 6 https://bugs.webkit.org/show_bug.cgi?id=40012 7 8 Covered by fast/dom/Geolocation/argument-types.html 9 This is a revert of http://trac.webkit.org/changeset/60522 10 11 * fast/dom/Geolocation/argument-types-expected.txt: 12 * fast/dom/Geolocation/script-tests/argument-types.js: 13 1 14 2011-04-12 Andrey Kosyakov <caseq@chromium.org> 2 15 -
trunk/LayoutTests/fast/dom/Geolocation/argument-types-expected.txt
r60522 r83562 10 10 PASS navigator.geolocation.getCurrentPosition(objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 11 11 PASS navigator.geolocation.getCurrentPosition(emptyFunction) did not throw exception. 12 PASS navigator.geolocation.getCurrentPosition(Math.abs) did not throw exception. 13 PASS navigator.geolocation.getCurrentPosition(layoutTestController.setGeolocationPermission) did not throw exception. 12 14 PASS navigator.geolocation.getCurrentPosition(true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 13 15 PASS navigator.geolocation.getCurrentPosition(42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. … … 20 22 PASS navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 21 23 PASS navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction) did not throw exception. 24 PASS navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs) did not throw exception. 25 PASS navigator.geolocation.getCurrentPosition(emptyFunction, layoutTestController.setGeolocationPermission) did not throw exception. 22 26 PASS navigator.geolocation.getCurrentPosition(emptyFunction, true) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. 23 27 PASS navigator.geolocation.getCurrentPosition(emptyFunction, 42) threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17. -
trunk/LayoutTests/fast/dom/Geolocation/script-tests/argument-types.js
r60522 r83562 41 41 test('navigator.geolocation.getCurrentPosition(objectThrowingException)', true); 42 42 test('navigator.geolocation.getCurrentPosition(emptyFunction)', false); 43 //test('navigator.geolocation.getCurrentPosition(Math.abs)', false); 43 test('navigator.geolocation.getCurrentPosition(Math.abs)', false); 44 test('navigator.geolocation.getCurrentPosition(layoutTestController.setGeolocationPermission)', false); 44 45 test('navigator.geolocation.getCurrentPosition(true)', true); 45 46 test('navigator.geolocation.getCurrentPosition(42)', true); … … 53 54 test('navigator.geolocation.getCurrentPosition(emptyFunction, objectThrowingException)', true); 54 55 test('navigator.geolocation.getCurrentPosition(emptyFunction, emptyFunction)', false); 55 //test('navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs)', false); 56 test('navigator.geolocation.getCurrentPosition(emptyFunction, Math.abs)', false); 57 test('navigator.geolocation.getCurrentPosition(emptyFunction, layoutTestController.setGeolocationPermission)', false); 56 58 test('navigator.geolocation.getCurrentPosition(emptyFunction, true)', true); 57 59 test('navigator.geolocation.getCurrentPosition(emptyFunction, 42)', true); -
trunk/Source/WebCore/ChangeLog
r83561 r83562 1 2011-04-12 Steve Block <steveblock@google.com> 2 3 Reviewed by Oliver Hunt. 4 5 Callable objects created via JavaScriptCore API cannot be used as Geolocation callbacks 6 https://bugs.webkit.org/show_bug.cgi?id=40012 7 8 Covered by fast/dom/Geolocation/argument-types.html 9 10 * bindings/js/CallbackFunction.cpp: 11 (WebCore::checkFunctionOnlyCallback): 12 1 13 2011-04-07 Philippe Normand <pnormand@igalia.com> 2 14 -
trunk/Source/WebCore/bindings/js/CallbackFunction.cpp
r83079 r83562 28 28 #include "ExceptionCode.h" 29 29 #include "JSDOMBinding.h" 30 #include <runtime/ JSFunction.h>30 #include <runtime/CallData.h> 31 31 32 32 namespace WebCore { … … 40 40 return false; 41 41 42 // FIXME: disallows callable objects created via JSC API. It's not clear what exactly the specification intends to allow. 43 // https://bugs.webkit.org/show_bug.cgi?id=40012 44 if (!value.inherits(&JSC::JSFunction::s_info)) { 42 JSC::CallData callData; 43 if (getCallData(value, callData) == JSC::CallTypeNone) { 45 44 setDOMException(exec, TYPE_MISMATCH_ERR); 46 45 return false;
Note: See TracChangeset
for help on using the changeset viewer.