Changeset 250385 in webkit
- Timestamp:
- Sep 26, 2019 10:43:24 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r250347 r250385 1 2019-09-26 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Non-callable "handleEvent" property is silently ignored 4 https://bugs.webkit.org/show_bug.cgi?id=200066 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt: 9 * web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt: 10 * web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt: 11 * web-platform-tests/dom/events/EventListener-handleEvent-expected.txt: 12 1 13 2019-09-25 Alexey Shvayka <shvaikalesh@gmail.com> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception-expected.txt
r250347 r250385 4 4 PASS Exception in error event listener on request 5 5 PASS Exception in error event listener ("handleEvent" lookup) on request 6 FAIL Exception in error event listener (non-callable "handleEvent") on request assert_equals: expected "AbortError" but got "ConstraintError" 6 PASS Exception in error event listener (non-callable "handleEvent") on request 7 7 PASS Exception in second error event listener on request 8 8 PASS Exception in first error event listener on request, transaction active in second -
trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception-expected.txt
r250347 r250385 3 3 PASS Exception in success event listener on request 4 4 PASS Exception in success event listener ("handleEvent" lookup) on request 5 FAIL Exception in success event listener (non-callable "handleEvent") on request assert_unreached: transaction should abort Reached unreachable code 5 PASS Exception in success event listener (non-callable "handleEvent") on request 6 6 PASS Exception in second success event listener on request 7 7 PASS Exception in first success event listener, tx active in second -
trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception-expected.txt
r250347 r250385 2 2 CONSOLE MESSAGE: line 37: Error 3 3 CONSOLE MESSAGE: line 44: Error 4 CONSOLE MESSAGE: TypeError: 'handleEvent' property of event listener should be callable 4 5 CONSOLE MESSAGE: line 62: Error 5 6 CONSOLE MESSAGE: line 70: Error … … 8 9 PASS Exception in upgradeneeded listener 9 10 PASS Exception in upgradeneeded "handleEvent" lookup 10 FAIL Exception in upgradeneeded due to non-callable "handleEvent" assert_unreached: open should fail Reached unreachable code 11 PASS Exception in upgradeneeded due to non-callable "handleEvent" 11 12 PASS Exception in second upgradeneeded listener 12 13 PASS Exception in first upgradeneeded listener, tx active in second -
trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent-expected.txt
r248647 r250385 1 1 CONSOLE MESSAGE: line 46: [object Object] 2 CONSOLE MESSAGE: line 101: TypeError: 'handleEvent' property of event listener should be callable 3 CONSOLE MESSAGE: line 122: TypeError: 'handleEvent' property of event listener should be callable 2 4 3 5 PASS calls `handleEvent` method of `EventListener` … … 5 7 PASS performs `Get` every time event is dispatched 6 8 PASS doesn't call `handleEvent` method on callable `EventListener` 7 FAIL throws if `handleEvent` is falsy and not callable assert_true: expected true got false 8 FAIL throws if `handleEvent` is thruthy and not callable assert_true: expected true got false 9 PASS throws if `handleEvent` is falsy and not callable 10 PASS throws if `handleEvent` is thruthy and not callable 9 11 -
trunk/Source/WebCore/ChangeLog
r250384 r250385 1 2019-09-26 Alexey Shvayka <shvaikalesh@gmail.com> 2 3 Non-callable "handleEvent" property is silently ignored 4 https://bugs.webkit.org/show_bug.cgi?id=200066 5 6 Reviewed by Darin Adler. 7 8 Tests: imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html 9 imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html 10 imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html 11 imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html 12 13 * bindings/js/JSEventListener.cpp: 14 (WebCore::JSEventListener::handleEvent): Report TypeError if "handleEvent" is not callable. 15 1 16 2019-09-26 Zalan Bujtas <zalan@apple.com> 2 17 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r249175 r250385 149 149 } 150 150 callType = getCallData(vm, handleEventFunction, callData); 151 } 152 153 if (callType == CallType::None) 154 return; 151 if (callType == CallType::None) { 152 event.target()->uncaughtExceptionInEventHandler(); 153 reportException(exec, createTypeError(exec, "'handleEvent' property of event listener should be callable"_s)); 154 return; 155 } 156 } 155 157 156 158 Ref<JSEventListener> protectedThis(*this);
Note: See TracChangeset
for help on using the changeset viewer.