Changeset 281756 in webkit
- Timestamp:
- Aug 30, 2021 7:59:41 AM (11 months ago)
- Location:
- trunk
- Files:
-
- 6 added
- 7 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any-expected.txt (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any.js (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any.worker-expected.txt (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any.worker.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/w3c-import.log (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/DOMWindow.cpp (modified) (2 diffs)
-
Source/WebCore/page/DOMWindow.h (modified) (1 diff)
-
Source/WebCore/page/WindowOrWorkerGlobalScope.idl (modified) (1 diff)
-
Source/WebCore/workers/WorkerGlobalScope.cpp (modified) (2 diffs)
-
Source/WebCore/workers/WorkerGlobalScope.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r281701 r281756 1 2021-08-30 Chris Dumez <cdumez@apple.com> 2 3 Implement self.reportError() 4 https://bugs.webkit.org/show_bug.cgi?id=228316 5 <rdar://problem/81446162> 6 7 Reviewed by Sam Weinig. 8 9 Import test coverage from: 10 - https://github.com/web-platform-tests/wpt/pull/29738 11 12 * web-platform-tests/html/webappapis/scripting/reporterror.any-expected.txt: Added. 13 * web-platform-tests/html/webappapis/scripting/reporterror.any.html: Added. 14 * web-platform-tests/html/webappapis/scripting/reporterror.any.js: Added. 15 (undefined.forEach.throwable.test.t.assert_equals): 16 (test): 17 * web-platform-tests/html/webappapis/scripting/reporterror.any.worker-expected.txt: Added. 18 * web-platform-tests/html/webappapis/scripting/reporterror.any.worker.html: Added. 19 * web-platform-tests/html/webappapis/scripting/w3c-import.log: Added. 20 1 21 2021-08-27 Antti Koivisto <antti@apple.com> 2 22 -
trunk/Source/WebCore/ChangeLog
r281754 r281756 1 2021-08-30 Chris Dumez <cdumez@apple.com> 2 3 Implement self.reportError() 4 https://bugs.webkit.org/show_bug.cgi?id=228316 5 <rdar://problem/81446162> 6 7 Reviewed by Sam Weinig. 8 9 Implement self.reportError() as per: 10 - https://github.com/whatwg/html/pull/1196 11 12 Firefox already shipped this and Chrome will do so soon too. 13 14 Tests: imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any.html 15 imported/w3c/web-platform-tests/html/webappapis/scripting/reporterror.any.worker.html 16 17 * page/DOMWindow.cpp: 18 (WebCore::DOMWindow::reportError): 19 * page/DOMWindow.h: 20 * page/WindowOrWorkerGlobalScope.idl: 21 * workers/WorkerGlobalScope.cpp: 22 (WebCore::WorkerGlobalScope::reportError): 23 * workers/WorkerGlobalScope.h: 24 1 25 2021-08-30 Alan Bujtas <zalan@apple.com> 2 26 -
trunk/Source/WebCore/page/DOMWindow.cpp
r281147 r281756 73 73 #include "IdleRequestOptions.h" 74 74 #include "InspectorInstrumentation.h" 75 #include "JSDOMExceptionHandling.h" 75 76 #include "JSDOMPromiseDeferred.h" 76 77 #include "JSDOMWindowBase.h" … … 1802 1803 } 1803 1804 1805 void DOMWindow::reportError(JSC::JSGlobalObject& globalObject, JSC::JSValue error) 1806 { 1807 auto& vm = globalObject.vm(); 1808 RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock()); 1809 auto* exception = JSC::jsDynamicCast<JSC::Exception*>(vm, error); 1810 if (!exception) 1811 exception = JSC::Exception::create(vm, error); 1812 1813 reportException(&globalObject, exception); 1814 } 1815 1804 1816 ExceptionOr<int> DOMWindow::setTimeout(JSC::JSGlobalObject& state, std::unique_ptr<ScheduledAction> action, int timeout, Vector<JSC::Strong<JSC::Unknown>>&& arguments) 1805 1817 { -
trunk/Source/WebCore/page/DOMWindow.h
r280504 r281756 387 387 #endif 388 388 389 void reportError(JSC::JSGlobalObject&, JSC::JSValue); 390 389 391 // FIXME: When this DOMWindow is no longer the active DOMWindow (i.e., 390 392 // when its document is no longer the document that is displayed in its -
trunk/Source/WebCore/page/WindowOrWorkerGlobalScope.idl
r280968 r281756 49 49 50 50 [EnabledBySetting=CrossOriginOpenerPolicy] readonly attribute boolean crossOriginIsolated; 51 51 52 [CallWith=GlobalObject] undefined reportError(any error); 53 52 54 // Base64 utility methods. 53 55 DOMString atob(DOMString string); -
trunk/Source/WebCore/workers/WorkerGlobalScope.cpp
r280953 r281756 40 40 #include "ImageBitmapOptions.h" 41 41 #include "InspectorInstrumentation.h" 42 #include "JSDOMExceptionHandling.h" 42 43 #include "Performance.h" 43 44 #include "RuntimeEnabledFeatures.h" … … 548 549 } 549 550 551 void WorkerGlobalScope::reportError(JSC::JSGlobalObject& globalObject, JSC::JSValue error) 552 { 553 auto& vm = globalObject.vm(); 554 RELEASE_ASSERT(vm.currentThreadIsHoldingAPILock()); 555 auto* exception = JSC::jsDynamicCast<JSC::Exception*>(vm, error); 556 if (!exception) 557 exception = JSC::Exception::create(vm, error); 558 559 WebCore::reportException(&globalObject, exception); 560 } 561 550 562 void WorkerGlobalScope::releaseMemoryInWorkers(Synchronous synchronous) 551 563 { -
trunk/Source/WebCore/workers/WorkerGlobalScope.h
r280504 r281756 131 131 void beginLoadingFontSoon(FontLoadRequest&) final; 132 132 133 void reportError(JSC::JSGlobalObject&, JSC::JSValue); 134 133 135 ReferrerPolicy referrerPolicy() const final; 134 136
Note: See TracChangeset
for help on using the changeset viewer.