RESOLVED FIXED 191792
globalFuncImportModule() should return a promise when it clears exceptions.
https://bugs.webkit.org/show_bug.cgi?id=191792
Summary globalFuncImportModule() should return a promise when it clears exceptions.
Mark Lam
Reported 2018-11-16 16:26:32 PST
Attachments
proposed patch. (6.12 KB, patch)
2018-11-16 16:38 PST, Mark Lam
fpizlo: review+
ews-watchlist: commit-queue-
proposed patch w/ test failure fixes. (20.33 KB, patch)
2018-11-18 00:12 PST, Mark Lam
ews-watchlist: commit-queue-
Archive of layout-test-results from ews102 for mac-sierra (2.45 MB, application/zip)
2018-11-18 01:15 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews105 for mac-sierra-wk2 (3.00 MB, application/zip)
2018-11-18 01:24 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews117 for mac-sierra (2.20 MB, application/zip)
2018-11-18 02:05 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews206 for win-future (12.82 MB, application/zip)
2018-11-18 02:07 PST, EWS Watchlist
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (2.46 MB, application/zip)
2018-11-18 02:20 PST, EWS Watchlist
no flags
proposed patch w/ test failure fixes. (20.32 KB, patch)
2018-11-19 13:11 PST, Mark Lam
msaboff: review+
Mark Lam
Comment 1 2018-11-16 16:38:33 PST
Created attachment 355161 [details] proposed patch.
Keith Miller
Comment 2 2018-11-16 16:44:43 PST
Comment on attachment 355161 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=355161&action=review > Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:813 > + if (Exception* exception = catchScope.exception()) { > + catchScope.clearException(); > + promise->reject(exec, exception->value()); > + CLEAR_AND_RETURN_IF_EXCEPTION(catchScope, JSValue::encode(promise->promise())); > + } nit: You could make this a lambda so you don't duplicate the code.
Mark Lam
Comment 3 2018-11-16 16:48:23 PST
Comment on attachment 355161 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=355161&action=review Thanks for the reviews. >> Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp:813 >> + } > > nit: You could make this a lambda so you don't duplicate the code. It's only replicated once, and I'm not sure the lambda overhead is necessarily cheaper. So, I'll keep this as is.
EWS Watchlist
Comment 4 2018-11-16 19:04:19 PST
Comment on attachment 355161 [details] proposed patch. Attachment 355161 [details] did not pass jsc-ews (mac): Output: https://webkit-queues.webkit.org/results/10027602 New failing tests: stress/global-import-function-should-return-a-promise-when-clearing-exceptions.js.default stress/global-import-function-should-return-a-promise-when-clearing-exceptions.js.dfg-maximal-flush-validate-no-cjit stress/global-import-function-should-return-a-promise-when-clearing-exceptions.js.ftl-no-cjit-small-pool stress/global-import-function-should-return-a-promise-when-clearing-exceptions.js.no-ftl apiTests
Mark Lam
Comment 5 2018-11-18 00:12:39 PST
Created attachment 355231 [details] proposed patch w/ test failure fixes. Let's test this on the EWS before I get another review.
EWS Watchlist
Comment 6 2018-11-18 01:15:38 PST
Comment on attachment 355231 [details] proposed patch w/ test failure fixes. Attachment 355231 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/10055642 New failing tests: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html js/dom/modules/module-incorrect-relative-specifier.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html
EWS Watchlist
Comment 7 2018-11-18 01:15:39 PST
Created attachment 355233 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 8 2018-11-18 01:24:35 PST
Comment on attachment 355231 [details] proposed patch w/ test failure fixes. Attachment 355231 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/10055664 New failing tests: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html js/dom/modules/module-incorrect-relative-specifier.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html
EWS Watchlist
Comment 9 2018-11-18 01:24:37 PST
Created attachment 355235 [details] Archive of layout-test-results from ews105 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 10 2018-11-18 02:05:13 PST
Comment on attachment 355231 [details] proposed patch w/ test failure fixes. Attachment 355231 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/10055835 New failing tests: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html js/dom/modules/module-incorrect-relative-specifier.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html
EWS Watchlist
Comment 11 2018-11-18 02:05:15 PST
Created attachment 355236 [details] Archive of layout-test-results from ews117 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-sierra Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 12 2018-11-18 02:07:16 PST
Comment on attachment 355231 [details] proposed patch w/ test failure fixes. Attachment 355231 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/10056137 New failing tests: js/dom/modules/module-incorrect-relative-specifier.html
EWS Watchlist
Comment 13 2018-11-18 02:07:29 PST
Created attachment 355237 [details] Archive of layout-test-results from ews206 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews206 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
EWS Watchlist
Comment 14 2018-11-18 02:20:10 PST
Comment on attachment 355231 [details] proposed patch w/ test failure fixes. Attachment 355231 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10055922 New failing tests: imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/specifier-error.html js/dom/modules/module-incorrect-relative-specifier.html imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/dynamic-import/dynamic-imports-script-error.html
EWS Watchlist
Comment 15 2018-11-18 02:20:12 PST
Created attachment 355238 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Mark Lam
Comment 16 2018-11-19 13:11:24 PST
Created attachment 355290 [details] proposed patch w/ test failure fixes.
Michael Saboff
Comment 17 2018-11-19 21:05:20 PST
Comment on attachment 355290 [details] proposed patch w/ test failure fixes. View in context: https://bugs.webkit.org/attachment.cgi?id=355290&action=review r=me > Source/JavaScriptCore/ChangeLog:11 > + be return the empty JSValue in this case: instead, we should return a Promise as Wording, delete "be".
Mark Lam
Comment 18 2018-11-19 23:10:39 PST
Thanks for the review. Landed in r238391: <http://trac.webkit.org/r238391>.
Note You need to log in before you can comment on or make changes to this bug.