Changeset 197748 in webkit
- Timestamp:
- Mar 8, 2016 1:46:27 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 63 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r197738 r197748 1 2016-03-08 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [Fetch API] Implement fetch skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=155111 5 6 Reviewed by Darin Adler. 7 8 * TestExpectations: Marking some tests as flaky. 9 1 10 2016-03-08 Nikos Andronikos <nikos.andronikos-webkit@cisra.canon.com.au> 2 11 -
trunk/LayoutTests/TestExpectations
r197724 r197748 317 317 imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-non-cors.htm [ Skip ] 318 318 319 # Tests that are flaky as failing assertions print a new token generated for each test run. 320 imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html [ Failure ] 321 imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html [ Failure ] 319 322 320 323 # New W3C ref tests that are failing. -
trunk/LayoutTests/imported/w3c/ChangeLog
r197727 r197748 1 2016-03-08 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [Fetch API] Implement fetch skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=155111 5 6 Reviewed by Darin Adler. 7 8 Importing basic fetch api tests. 9 10 * resources/ImportExpectations: Activating fetch/api/basic import. 11 * web-platform-tests/fetch/api/basic/accept-header-expected.txt: Added. 12 * web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt: Added. 13 * web-platform-tests/fetch/api/basic/accept-header-worker.html: Added. 14 * web-platform-tests/fetch/api/basic/accept-header.html: Added. 15 * web-platform-tests/fetch/api/basic/accept-header.js: Added. 16 (promise_test): 17 * web-platform-tests/fetch/api/basic/integrity-expected.txt: Added. 18 * web-platform-tests/fetch/api/basic/integrity-worker-expected.txt: Added. 19 * web-platform-tests/fetch/api/basic/integrity-worker.html: Added. 20 * web-platform-tests/fetch/api/basic/integrity.html: Added. 21 * web-platform-tests/fetch/api/basic/integrity.js: Added. 22 (integrity): 23 * web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Added. 24 * web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Added. 25 * web-platform-tests/fetch/api/basic/mode-no-cors-worker.html: Added. 26 * web-platform-tests/fetch/api/basic/mode-no-cors.html: Added. 27 * web-platform-tests/fetch/api/basic/mode-no-cors.js: Added. 28 (fetchNoCors): 29 * web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt: Added. 30 * web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt: Added. 31 * web-platform-tests/fetch/api/basic/mode-same-origin-worker.html: Added. 32 * web-platform-tests/fetch/api/basic/mode-same-origin.html: Added. 33 * web-platform-tests/fetch/api/basic/mode-same-origin.js: Added. 34 (fetchSameOrigin): 35 * web-platform-tests/fetch/api/basic/request-forbidden-headers-expected.txt: Added. 36 * web-platform-tests/fetch/api/basic/request-forbidden-headers-worker-expected.txt: Added. 37 * web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html: Added. 38 * web-platform-tests/fetch/api/basic/request-forbidden-headers.html: Added. 39 * web-platform-tests/fetch/api/basic/request-forbidden-headers.js: Added. 40 (requestForbiddenHeaders): 41 * web-platform-tests/fetch/api/basic/request-headers-expected.txt: Added. 42 * web-platform-tests/fetch/api/basic/request-headers-worker-expected.txt: Added. 43 * web-platform-tests/fetch/api/basic/request-headers-worker.html: Added. 44 * web-platform-tests/fetch/api/basic/request-headers.html: Added. 45 * web-platform-tests/fetch/api/basic/request-headers.js: Added. 46 (requestHeaders): 47 * web-platform-tests/fetch/api/basic/scheme-about-expected.txt: Added. 48 * web-platform-tests/fetch/api/basic/scheme-about-worker-expected.txt: Added. 49 * web-platform-tests/fetch/api/basic/scheme-about-worker.html: Added. 50 * web-platform-tests/fetch/api/basic/scheme-about.html: Added. 51 * web-platform-tests/fetch/api/basic/scheme-about.js: Added. 52 (checkFetchResponse): 53 (checkKoUrl): 54 * web-platform-tests/fetch/api/basic/scheme-blob-expected.txt: Added. 55 * web-platform-tests/fetch/api/basic/scheme-blob-worker-expected.txt: Added. 56 * web-platform-tests/fetch/api/basic/scheme-blob-worker.html: Added. 57 * web-platform-tests/fetch/api/basic/scheme-blob.html: Added. 58 * web-platform-tests/fetch/api/basic/scheme-blob.js: Added. 59 (checkFetchResponse): 60 (checkKoUrl): 61 * web-platform-tests/fetch/api/basic/scheme-data-expected.txt: Added. 62 * web-platform-tests/fetch/api/basic/scheme-data-worker-expected.txt: Added. 63 * web-platform-tests/fetch/api/basic/scheme-data-worker.html: Added. 64 * web-platform-tests/fetch/api/basic/scheme-data.html: Added. 65 * web-platform-tests/fetch/api/basic/scheme-data.js: Added. 66 (checkFetchResponse): 67 (checkKoUrl): 68 * web-platform-tests/fetch/api/basic/scheme-others-expected.txt: Added. 69 * web-platform-tests/fetch/api/basic/scheme-others-worker-expected.txt: Added. 70 * web-platform-tests/fetch/api/basic/scheme-others-worker.html: Added. 71 * web-platform-tests/fetch/api/basic/scheme-others.html: Added. 72 * web-platform-tests/fetch/api/basic/scheme-others.js: Added. 73 (checkKoUrl): 74 * web-platform-tests/fetch/api/basic/stream-response-expected.txt: Added. 75 * web-platform-tests/fetch/api/basic/stream-response-worker-expected.txt: Added. 76 * web-platform-tests/fetch/api/basic/stream-response-worker.html: Added. 77 * web-platform-tests/fetch/api/basic/stream-response.html: Added. 78 * web-platform-tests/fetch/api/basic/stream-response.js: Added. 79 (streamBody): 80 (promise_test.): 81 (promise_test): 82 * web-platform-tests/fetch/api/basic/w3c-import.log: Added. 83 1 84 2016-03-07 Chris Dumez <cdumez@apple.com> 2 85 -
trunk/LayoutTests/imported/w3c/resources/ImportExpectations
r197162 r197748 121 121 web-platform-tests/ext-xhtml-pubid [ Skip ] 122 122 #web-platform-tests/fetch [ Import ] 123 web-platform-tests/fetch/api/basic [ Skip ]124 123 web-platform-tests/fetch/api/cors [ Skip ] 125 124 web-platform-tests/fetch/api/credentials [ Skip ] -
trunk/Source/WebCore/CMakeLists.txt
r197702 r197748 166 166 Modules/battery/NavigatorBattery.idl 167 167 168 Modules/fetch/DOMWindowFetch.idl 168 169 Modules/fetch/FetchBody.idl 169 170 Modules/fetch/FetchHeaders.idl 170 171 Modules/fetch/FetchRequest.idl 171 172 Modules/fetch/FetchResponse.idl 173 Modules/fetch/WorkerGlobalScopeFetch.idl 172 174 173 175 Modules/geolocation/Coordinates.idl … … 813 815 Modules/battery/NavigatorBattery.cpp 814 816 817 Modules/fetch/DOMWindowFetch.cpp 815 818 Modules/fetch/FetchBody.cpp 816 819 Modules/fetch/FetchHeaders.cpp 817 820 Modules/fetch/FetchRequest.cpp 818 821 Modules/fetch/FetchResponse.cpp 822 Modules/fetch/WorkerGlobalScopeFetch.cpp 819 823 820 824 Modules/geolocation/Coordinates.cpp -
trunk/Source/WebCore/ChangeLog
r197744 r197748 1 2016-03-08 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 3 [Fetch API] Implement fetch skeleton 4 https://bugs.webkit.org/show_bug.cgi?id=155111 5 6 Reviewed by Darin Adler. 7 8 Adding skeleton code to call fetch API from normal and worker scopes. 9 Fetch API implementation is limited to reject the promise. 10 11 Updating the binding generator to fix the case of overloaded promise-returning functions. 12 Made overloaded utility functions "static inline". 13 14 Tests: imported/w3c/web-platform-tests/fetch/api/basic/accept-header-worker.html 15 imported/w3c/web-platform-tests/fetch/api/basic/accept-header.html 16 imported/w3c/web-platform-tests/fetch/api/basic/integrity-worker.html 17 imported/w3c/web-platform-tests/fetch/api/basic/integrity.html 18 imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors-worker.html 19 imported/w3c/web-platform-tests/fetch/api/basic/mode-no-cors.html 20 imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin-worker.html 21 imported/w3c/web-platform-tests/fetch/api/basic/mode-same-origin.html 22 imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers-worker.html 23 imported/w3c/web-platform-tests/fetch/api/basic/request-forbidden-headers.html 24 imported/w3c/web-platform-tests/fetch/api/basic/request-headers-worker.html 25 imported/w3c/web-platform-tests/fetch/api/basic/request-headers.html 26 imported/w3c/web-platform-tests/fetch/api/basic/scheme-about-worker.html 27 imported/w3c/web-platform-tests/fetch/api/basic/scheme-about.html 28 imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob-worker.html 29 imported/w3c/web-platform-tests/fetch/api/basic/scheme-blob.html 30 imported/w3c/web-platform-tests/fetch/api/basic/scheme-data-worker.html 31 imported/w3c/web-platform-tests/fetch/api/basic/scheme-data.html 32 imported/w3c/web-platform-tests/fetch/api/basic/scheme-others-worker.html 33 imported/w3c/web-platform-tests/fetch/api/basic/scheme-others.html 34 imported/w3c/web-platform-tests/fetch/api/basic/stream-response-worker.html 35 imported/w3c/web-platform-tests/fetch/api/basic/stream-response.html 36 37 * CMakeLists.txt: 38 * DerivedSources.make: 39 * Modules/fetch/DOMWindowFetch.cpp: Added. 40 (WebCore::DOMWindowFetch::fetch): 41 * Modules/fetch/DOMWindowFetch.h: Added. 42 * Modules/fetch/DOMWindowFetch.idl: Added. 43 * Modules/fetch/WorkerGlobalScopeFetch.cpp: Added. 44 (WebCore::WorkerGlobalScopeFetch::fetch): 45 * Modules/fetch/WorkerGlobalScopeFetch.h: Added. 46 * Modules/fetch/WorkerGlobalScopeFetch.idl: Added. 47 * WebCore.xcodeproj/project.pbxproj: 48 * bindings/scripts/CodeGeneratorJS.pm: 49 (GenerateImplementation): Fixing the case of overloaded promise-returning functions. 50 * bindings/scripts/test/JS/JSTestObj.cpp: 51 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1): 52 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2): 53 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3): 54 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4): 55 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5): 56 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6): 57 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7): 58 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8): 59 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9): 60 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10): 61 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11): 62 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod12): 63 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1): 64 (WebCore::jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2): 65 (WebCore::jsTestObjConstructorFunctionOverloadedMethod11): 66 (WebCore::jsTestObjConstructorFunctionOverloadedMethod12): 67 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1): 68 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise): 69 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2): 70 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise): 71 (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction): 72 (WebCore::jsTestObjPrototypeFunctionOverloadedMethod): Deleted. 73 (WebCore::jsTestObjConstructorFunctionClassMethod2): Deleted. 74 (WebCore::jsTestObjPrototypeFunctionAny): Deleted. 75 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise): Deleted. 76 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise): Deleted. 77 (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise): Deleted. 78 * bindings/scripts/test/TestObj.idl: 79 1 80 2016-03-08 Youenn Fablet <youenn.fablet@crf.canon.fr> 2 81 -
trunk/Source/WebCore/DerivedSources.make
r197142 r197748 81 81 $(WebCore)/Modules/encryptedmedia/MediaKeySession.idl \ 82 82 $(WebCore)/Modules/encryptedmedia/MediaKeys.idl \ 83 $(WebCore)/Modules/fetch/DOMWindowFetch.idl \ 83 84 $(WebCore)/Modules/fetch/FetchBody.idl \ 84 85 $(WebCore)/Modules/fetch/FetchHeaders.idl \ 85 86 $(WebCore)/Modules/fetch/FetchRequest.idl \ 86 87 $(WebCore)/Modules/fetch/FetchResponse.idl \ 88 $(WebCore)/Modules/fetch/WorkerGlobalScopeFetch.idl \ 87 89 $(WebCore)/Modules/gamepad/Gamepad.idl \ 88 90 $(WebCore)/Modules/gamepad/GamepadButton.idl \ -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r197702 r197748 1554 1554 418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 418A06CE133C04D500CD379C /* EventDispatcher.h */; }; 1555 1555 418A06D1133C04D500CD379C /* EventDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418A06CF133C04D500CD379C /* EventDispatcher.cpp */; }; 1556 418C39561C8DAC7F0051C8A3 /* DOMWindowFetch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C39521C8DAC7B0051C8A3 /* DOMWindowFetch.cpp */; }; 1557 418C395A1C8DD6990051C8A3 /* WorkerGlobalScopeFetch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */; }; 1556 1558 418F88040FF957AE0080F045 /* JSAbstractWorker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */; }; 1557 1559 418F88050FF957AF0080F045 /* JSAbstractWorker.h in Headers */ = {isa = PBXBuildFile; fileRef = 418F88030FF957AE0080F045 /* JSAbstractWorker.h */; }; … … 9030 9032 418A06CE133C04D500CD379C /* EventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcher.h; sourceTree = "<group>"; }; 9031 9033 418A06CF133C04D500CD379C /* EventDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventDispatcher.cpp; sourceTree = "<group>"; }; 9034 418C39521C8DAC7B0051C8A3 /* DOMWindowFetch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowFetch.cpp; sourceTree = "<group>"; }; 9035 418C39531C8DAC7B0051C8A3 /* DOMWindowFetch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowFetch.h; sourceTree = "<group>"; }; 9036 418C39541C8DAC7B0051C8A3 /* DOMWindowFetch.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DOMWindowFetch.idl; sourceTree = "<group>"; }; 9037 418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WorkerGlobalScopeFetch.cpp; sourceTree = "<group>"; }; 9038 418C39581C8DD6960051C8A3 /* WorkerGlobalScopeFetch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WorkerGlobalScopeFetch.h; sourceTree = "<group>"; }; 9039 418C39591C8DD6960051C8A3 /* WorkerGlobalScopeFetch.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WorkerGlobalScopeFetch.idl; sourceTree = "<group>"; }; 9032 9040 418F88020FF957AE0080F045 /* JSAbstractWorker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAbstractWorker.cpp; sourceTree = "<group>"; }; 9033 9041 418F88030FF957AE0080F045 /* JSAbstractWorker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAbstractWorker.h; sourceTree = "<group>"; }; … … 16810 16818 isa = PBXGroup; 16811 16819 children = ( 16820 418C39521C8DAC7B0051C8A3 /* DOMWindowFetch.cpp */, 16821 418C39531C8DAC7B0051C8A3 /* DOMWindowFetch.h */, 16822 418C39541C8DAC7B0051C8A3 /* DOMWindowFetch.idl */, 16812 16823 41F54F7D1C50C4F600338488 /* FetchBody.cpp */, 16813 16824 41F54F7E1C50C4F600338488 /* FetchBody.h */, … … 16825 16836 413015D71C7B570400091C6E /* FetchResponse.idl */, 16826 16837 413015D81C7B570400091C6E /* FetchResponse.js */, 16838 418C39571C8DD6960051C8A3 /* WorkerGlobalScopeFetch.cpp */, 16839 418C39581C8DD6960051C8A3 /* WorkerGlobalScopeFetch.h */, 16840 418C39591C8DD6960051C8A3 /* WorkerGlobalScopeFetch.idl */, 16827 16841 ); 16828 16842 path = fetch; … … 26298 26312 5185FC8B1BB4C4E80012898F /* IDBEventDispatcher.h in Headers */, 26299 26313 5185FC8D1BB4C4E80012898F /* IDBFactory.h in Headers */, 26300 51F41A721BA73B5B002E053B /* IDBFactoryBackendInterface.h in Headers */,26301 26314 69A6CBAD1C6BE42C00B836E9 /* AccessibilitySVGElement.h in Headers */, 26302 26315 510310501BA8CC03003329C0 /* IDBFactoryImpl.h in Headers */, … … 29015 29028 FD31600412B0267600C1A359 /* AudioContext.cpp in Sources */, 29016 29029 CD0EEE0E14743F39003EAFA2 /* AudioDestinationIOS.cpp in Sources */, 29030 418C39561C8DAC7F0051C8A3 /* DOMWindowFetch.cpp in Sources */, 29017 29031 FD3160BC12B0272A00C1A359 /* AudioDestinationMac.cpp in Sources */, 29018 29032 FD31600712B0267600C1A359 /* AudioDestinationNode.cpp in Sources */, … … 29870 29884 A8EA7CAE0A192B9C00A8EF5F /* HTMLHeadingElement.cpp in Sources */, 29871 29885 A8EA7CB30A192B9C00A8EF5F /* HTMLHRElement.cpp in Sources */, 29886 418C395A1C8DD6990051C8A3 /* WorkerGlobalScopeFetch.cpp in Sources */, 29872 29887 A871DE260A152AC800B12A68 /* HTMLHtmlElement.cpp in Sources */, 29873 29888 A871DE240A152AC800B12A68 /* HTMLIFrameElement.cpp in Sources */, -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r197648 r197748 2883 2883 } 2884 2884 2885 2885 my $functionReturn = "EncodedJSValue JSC_HOST_CALL"; 2886 2886 if (!$isCustom && $isOverloaded) { 2887 2887 # Append a number to an overloaded method's name to make it unique: 2888 2888 $functionName = $functionName . $function->{overloadIndex}; 2889 # Make this function static to avoid compiler warnings, since we 2890 # don't generate a prototype for it in the header. 2891 push(@implContent, "static "); 2889 # Make this function static to avoid compiler warnings, since we don't generate a prototype for it in the header. 2890 $functionReturn = "static inline EncodedJSValue"; 2892 2891 } 2893 2892 … … 2897 2896 AddToImplIncludes("JSDOMPromise.h"); 2898 2897 2899 push(@implContent, "static inline EncodedJSValue ${functionName}Promise(ExecState*, JSPromiseDeferred*);\n"); 2900 push(@implContent, "EncodedJSValue JSC_HOST_CALL ${functionName}(ExecState* state)\n"); 2901 push(@implContent, "{\n"); 2902 2903 push(@implContent, " return JSValue::encode(callPromiseFunction(*state, ${functionName}Promise));\n"); 2904 2905 push(@implContent, "}\n"); 2906 push(@implContent, "\nstatic inline EncodedJSValue ${functionName}Promise(ExecState* state, JSPromiseDeferred* promiseDeferred)\n"); 2898 push(@implContent, <<END); 2899 static EncodedJSValue ${functionName}Promise(ExecState*, JSPromiseDeferred*); 2900 ${functionReturn} ${functionName}(ExecState* state) 2901 { 2902 return JSValue::encode(callPromiseFunction(*state, ${functionName}Promise)); 2903 } 2904 2905 static inline EncodedJSValue ${functionName}Promise(ExecState* state, JSPromiseDeferred* promiseDeferred) 2906 END 2907 2907 } 2908 2908 else { 2909 push(@implContent, " EncodedJSValue JSC_HOST_CALL${functionName}(ExecState* state)\n");2909 push(@implContent, "${functionReturn} ${functionName}(ExecState* state)\n"); 2910 2910 } 2911 2911 -
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
r197648 r197748 35 35 #include "JSDocument.h" 36 36 #include "JSEventListener.h" 37 #include "JSFetchRequest.h" 37 38 #include "JSKeyValueIterator.h" 38 39 #include "JSNode.h" … … 187 188 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithException(JSC::ExecState*); 188 189 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument(JSC::ExecState*); 190 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseOverloadedFunction(JSC::ExecState*); 189 191 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack(JSC::ExecState*); 190 192 JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSymbolIterator(JSC::ExecState*); … … 716 718 { "testPromiseFunctionWithException", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithException), (intptr_t) (0) } }, 717 719 { "testPromiseFunctionWithOptionalIntArgument", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument), (intptr_t) (0) } }, 720 { "testPromiseOverloadedFunction", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionTestPromiseOverloadedFunction), (intptr_t) (1) } }, 718 721 { "methodWithNeedsLifecycleProcessingStack", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack), (intptr_t) (0) } }, 719 722 { "entries", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionEntries), (intptr_t) (0) } }, … … 4129 4132 #endif 4130 4133 4131 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod1(ExecState* state)4134 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod1(ExecState* state) 4132 4135 { 4133 4136 JSValue thisValue = state->thisValue(); … … 4149 4152 } 4150 4153 4151 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod2(ExecState* state)4154 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod2(ExecState* state) 4152 4155 { 4153 4156 JSValue thisValue = state->thisValue(); … … 4176 4179 } 4177 4180 4178 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod3(ExecState* state)4181 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod3(ExecState* state) 4179 4182 { 4180 4183 JSValue thisValue = state->thisValue(); … … 4193 4196 } 4194 4197 4195 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod4(ExecState* state)4198 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod4(ExecState* state) 4196 4199 { 4197 4200 JSValue thisValue = state->thisValue(); … … 4210 4213 } 4211 4214 4212 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod5(ExecState* state)4215 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod5(ExecState* state) 4213 4216 { 4214 4217 JSValue thisValue = state->thisValue(); … … 4227 4230 } 4228 4231 4229 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod6(ExecState* state)4232 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod6(ExecState* state) 4230 4233 { 4231 4234 JSValue thisValue = state->thisValue(); … … 4244 4247 } 4245 4248 4246 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod7(ExecState* state)4249 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod7(ExecState* state) 4247 4250 { 4248 4251 JSValue thisValue = state->thisValue(); … … 4261 4264 } 4262 4265 4263 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod8(ExecState* state)4266 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod8(ExecState* state) 4264 4267 { 4265 4268 JSValue thisValue = state->thisValue(); … … 4278 4281 } 4279 4282 4280 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod9(ExecState* state)4283 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod9(ExecState* state) 4281 4284 { 4282 4285 JSValue thisValue = state->thisValue(); … … 4295 4298 } 4296 4299 4297 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod10(ExecState* state)4300 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod10(ExecState* state) 4298 4301 { 4299 4302 JSValue thisValue = state->thisValue(); … … 4312 4315 } 4313 4316 4314 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod11(ExecState* state)4317 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod11(ExecState* state) 4315 4318 { 4316 4319 JSValue thisValue = state->thisValue(); … … 4329 4332 } 4330 4333 4331 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethod12(ExecState* state)4334 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethod12(ExecState* state) 4332 4335 { 4333 4336 JSValue thisValue = state->thisValue(); … … 4381 4384 } 4382 4385 4383 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1(ExecState* state)4386 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter1(ExecState* state) 4384 4387 { 4385 4388 JSValue thisValue = state->thisValue(); … … 4408 4411 } 4409 4412 4410 static EncodedJSValue JSC_HOST_CALLjsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2(ExecState* state)4413 static inline EncodedJSValue jsTestObjPrototypeFunctionOverloadedMethodWithOptionalParameter2(ExecState* state) 4411 4414 { 4412 4415 JSValue thisValue = state->thisValue(); … … 4479 4482 4480 4483 #if ENABLE(Condition1) 4481 static EncodedJSValue JSC_HOST_CALLjsTestObjConstructorFunctionOverloadedMethod11(ExecState* state)4484 static inline EncodedJSValue jsTestObjConstructorFunctionOverloadedMethod11(ExecState* state) 4482 4485 { 4483 4486 if (UNLIKELY(state->argumentCount() < 1)) … … 4493 4496 4494 4497 #if ENABLE(Condition1) 4495 static EncodedJSValue JSC_HOST_CALLjsTestObjConstructorFunctionOverloadedMethod12(ExecState* state)4498 static inline EncodedJSValue jsTestObjConstructorFunctionOverloadedMethod12(ExecState* state) 4496 4499 { 4497 4500 if (UNLIKELY(state->argumentCount() < 1)) … … 4932 4935 } 4933 4936 4934 static inlineEncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState*, JSPromiseDeferred*);4937 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionPromise(ExecState*, JSPromiseDeferred*); 4935 4938 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunction(ExecState* state) 4936 4939 { … … 4950 4953 } 4951 4954 4952 static inlineEncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState*, JSPromiseDeferred*);4955 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise(ExecState*, JSPromiseDeferred*); 4953 4956 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument(ExecState* state) 4954 4957 { … … 4977 4980 } 4978 4981 4979 static inlineEncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState*, JSPromiseDeferred*);4982 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise(ExecState*, JSPromiseDeferred*); 4980 4983 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithException(ExecState* state) 4981 4984 { … … 4997 5000 } 4998 5001 4999 static inlineEncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState*, JSPromiseDeferred*);5002 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgumentPromise(ExecState*, JSPromiseDeferred*); 5000 5003 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument(ExecState* state) 5001 5004 { … … 5023 5026 impl.testPromiseFunctionWithOptionalIntArgument(a, DeferredWrapper(state, castedThis->globalObject(), promiseDeferred)); 5024 5027 return JSValue::encode(jsUndefined()); 5028 } 5029 5030 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise(ExecState*, JSPromiseDeferred*); 5031 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1(ExecState* state) 5032 { 5033 return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise)); 5034 } 5035 5036 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1Promise(ExecState* state, JSPromiseDeferred* promiseDeferred) 5037 { 5038 JSValue thisValue = state->thisValue(); 5039 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5040 if (UNLIKELY(!castedThis)) 5041 return throwThisTypeError(*state, "TestObj", "testPromiseOverloadedFunction"); 5042 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5043 auto& impl = castedThis->wrapped(); 5044 if (UNLIKELY(state->argumentCount() < 1)) 5045 return throwVMError(state, createNotEnoughArgumentsError(state)); 5046 float a = state->argument(0).toFloat(state); 5047 if (UNLIKELY(state->hadException())) 5048 return JSValue::encode(jsUndefined()); 5049 if (!std::isfinite(a)) { 5050 setDOMException(state, TypeError); 5051 return JSValue::encode(jsUndefined()); 5052 } 5053 impl.testPromiseOverloadedFunction(a, DeferredWrapper(state, castedThis->globalObject(), promiseDeferred)); 5054 return JSValue::encode(jsUndefined()); 5055 } 5056 5057 static EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise(ExecState*, JSPromiseDeferred*); 5058 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2(ExecState* state) 5059 { 5060 return JSValue::encode(callPromiseFunction(*state, jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise)); 5061 } 5062 5063 static inline EncodedJSValue jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2Promise(ExecState* state, JSPromiseDeferred* promiseDeferred) 5064 { 5065 JSValue thisValue = state->thisValue(); 5066 auto castedThis = jsDynamicCast<JSTestObj*>(thisValue); 5067 if (UNLIKELY(!castedThis)) 5068 return throwThisTypeError(*state, "TestObj", "testPromiseOverloadedFunction"); 5069 ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info()); 5070 auto& impl = castedThis->wrapped(); 5071 if (UNLIKELY(state->argumentCount() < 1)) 5072 return throwVMError(state, createNotEnoughArgumentsError(state)); 5073 FetchRequest* request = JSFetchRequest::toWrapped(state->argument(0)); 5074 if (UNLIKELY(state->hadException())) 5075 return JSValue::encode(jsUndefined()); 5076 impl.testPromiseOverloadedFunction(request, DeferredWrapper(state, castedThis->globalObject(), promiseDeferred)); 5077 return JSValue::encode(jsUndefined()); 5078 } 5079 5080 EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionTestPromiseOverloadedFunction(ExecState* state) 5081 { 5082 size_t argsCount = std::min<size_t>(1, state->argumentCount()); 5083 if (argsCount == 1) 5084 return jsTestObjPrototypeFunctionTestPromiseOverloadedFunction1(state); 5085 JSValue arg0(state->argument(0)); 5086 if ((argsCount == 1 && ((arg0.isObject() && asObject(arg0)->inherits(JSFetchRequest::info()))))) 5087 return jsTestObjPrototypeFunctionTestPromiseOverloadedFunction2(state); 5088 if (argsCount < 1) 5089 return throwVMError(state, createNotEnoughArgumentsError(state)); 5090 return throwVMTypeError(state); 5025 5091 } 5026 5092 -
trunk/Source/WebCore/bindings/scripts/test/TestObj.idl
r197613 r197748 329 329 [RaisesException] Promise testPromiseFunctionWithException(); 330 330 Promise testPromiseFunctionWithOptionalIntArgument(optional long a); 331 Promise testPromiseOverloadedFunction(float a); 332 Promise testPromiseOverloadedFunction(FetchRequest request); 331 333 332 334 // PutForwards
Note: See TracChangeset
for help on using the changeset viewer.