Summary: | [WebIDL] Add support for Promise<> attributes | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||||||||||||||||||
Component: | New Bugs | Assignee: | Sam Weinig <sam> | ||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||
Severity: | Normal | CC: | buildbot, cdumez, darin, rniwa, webkit-bug-importer, ysuzuki | ||||||||||||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||
Hardware: | Unspecified | ||||||||||||||||||||||
OS: | Unspecified | ||||||||||||||||||||||
Attachments: |
|
Description
Sam Weinig
2017-08-06 10:32:33 PDT
Created attachment 317366 [details]
Patch
Attachment 317366 [details] did not pass style-queue:
ERROR: Source/WebCore/bindings/js/DOMPromiseProxy.h:91: Extra space before ( in function call [whitespace/parens] [4]
Total errors found: 1 in 29 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 317366 [details] Patch Attachment 317366 [details] did not pass bindings-ews (mac): Output: http://webkit-queues.webkit.org/results/4265240 New failing tests: (JS) JSTestPromiseRejectionEvent.cpp Comment on attachment 317366 [details] Patch Attachment 317366 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/4265450 New failing tests: security/contentSecurityPolicy/font-loading-block-all.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html fast/text/font-face-set-ready-fire.html imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1.html fast/text/font-face-set-document.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4.html imported/mathml-in-html5/mathml/relations/css-styling/displaystyle-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html fast/text/font-face-set-cssom.html fast/text/font-face-javascript.html fast/text/css-font-loading-arraybuffer.html imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1.html fast/text/font-loading-local.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1.html fast/text/font-face-set-javascript.html Created attachment 317376 [details]
Archive of layout-test-results from ews103 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317366 [details] Patch Attachment 317366 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/4265379 New failing tests: security/contentSecurityPolicy/font-loading-block-all.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html fast/text/font-face-set-ready-fire.html imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1.html fast/text/font-face-set-document.html fast/dom/Window/property-access-on-cached-window-after-frame-removed.html imported/mathml-in-html5/mathml/relations/css-styling/displaystyle-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html fast/text/font-face-set-cssom.html fast/text/font-face-javascript.html fast/text/font-face-set-javascript.html fast/text/css-font-loading-arraybuffer.html imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4.html imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1.html fast/text/font-loading-local.html Created attachment 317377 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2
The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Comment on attachment 317366 [details] Patch Attachment 317366 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/4265456 New failing tests: security/contentSecurityPolicy/font-loading-block-all.html fast/text/font-face-set-ready-fire.html imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1.html fast/text/font-face-set-document.html fast/dom/Window/property-access-on-cached-window-after-frame-removed.html imported/mathml-in-html5/mathml/relations/css-styling/displaystyle-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html fast/text/css-font-loading-arraybuffer.html fast/text/font-face-javascript.html fast/text/font-face-set-javascript.html imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html fast/text/font-face-set-cssom.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4.html fast/text/font-loading-local.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3.html imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2.html Created attachment 317379 [details]
Archive of layout-test-results from ews106 for mac-elcapitan-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 317366 [details] Patch Attachment 317366 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4265465 New failing tests: security/contentSecurityPolicy/font-loading-block-all.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html fast/text/font-face-set-ready-fire.html imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1.html fast/text/font-face-set-document.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4.html imported/mathml-in-html5/mathml/relations/css-styling/displaystyle-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html fast/text/font-face-set-cssom.html fast/text/font-face-javascript.html fast/text/css-font-loading-arraybuffer.html imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1.html fast/text/font-loading-local.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1.html fast/text/font-face-set-javascript.html Created attachment 317381 [details]
Archive of layout-test-results from ews116 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 317366 [details] Patch Attachment 317366 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4265868 New failing tests: security/contentSecurityPolicy/font-loading-block-all.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-1.html fast/text/font-face-set-ready-fire.html imported/mathml-in-html5/mathml/presentation-markup/scripts/subsup-parameters-1.html fast/text/font-face-set-document.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-4.html imported/mathml-in-html5/mathml/relations/css-styling/displaystyle-1.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/operators/mo-axis-height-1.html fast/text/font-face-set-cssom.html fast/text/font-face-javascript.html fast/text/css-font-loading-arraybuffer.html imported/mathml-in-html5/mathml/presentation-markup/tables/table-axis-height.html imported/mathml-in-html5/mathml/presentation-markup/fractions/frac-parameters-2.html imported/mathml-in-html5/mathml/presentation-markup/radicals/root-parameters-1.html fast/text/font-loading-local.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-3.html imported/mathml-in-html5/mathml/presentation-markup/scripts/underover-parameters-1.html fast/text/font-face-set-javascript.html Created attachment 317383 [details]
Archive of layout-test-results from ews112 for mac-elcapitan
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Created attachment 317387 [details]
Patch
Attachment 317387 [details] did not pass style-queue:
ERROR: Source/WebCore/bindings/js/DOMPromiseProxy.h:91: Extra space before ( in function call [whitespace/parens] [4]
Total errors found: 1 in 32 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 317391 [details]
Patch
Attachment 317391 [details] did not pass style-queue:
ERROR: Source/WebCore/bindings/js/DOMPromiseProxy.h:93: Extra space before ( in function call [whitespace/parens] [4]
Total errors found: 1 in 32 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 317392 [details]
Patch
Attachment 317392 [details] did not pass style-queue:
ERROR: Source/WebCore/bindings/js/DOMPromiseProxy.h:93: Extra space before ( in function call [whitespace/parens] [4]
Total errors found: 1 in 32 files
If any of these errors are false positives, please file a bug against check-webkit-style.
One thing to note, I'm not super thrilled with adding yet another promise related type. But I think I should be able merge something, probably DeferredPromise, into this one once I have converted more over to it. Also, I feel DOMPromiseProxy is a pretty good name, despite using the horrid anti-word 'proxy', as it is a proxy for the real JS promise objects. But, I am open to other names. Comment on attachment 317392 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=317392&action=review r=me > Source/WebCore/ChangeLog:70 > + cycles when the resolved value is the owner such as is the case with FontFace and FontFaceSet. OK, nice. I think noting this in DOMPromiseProxyWithResolveCallback code is nice. > Source/WebCore/bindings/js/DOMPromiseProxy.h:42 > + using ValueOrException = Variant<Value, Exception>; How about using WTF::Expected<Value, Exception> instead? > Source/WebCore/bindings/js/DOMPromiseProxy.h:66 > + using ValueOrException = Variant<Value, Exception>; Ditto. > Source/WebCore/bindings/js/DOMPromiseProxy.h:89 > + using ValueOrException = Variant<Value, Exception>; Ditto. > Source/WebCore/bindings/js/DOMPromiseProxy.h:129 > + // DeferredPromise can fail construction during worker abrupt termination. > + auto deferredPromise = DeferredPromise::create(state, globalObject, DeferredPromise::Mode::RetainPromiseOnResolve); Great! I think we need to review the other DeferredPromise construction (JSPromiseDeferred::create use) as well (in a separate patch). > Source/WebCore/bindings/js/DOMPromiseProxy.h:146 > +inline void DOMPromiseProxy<IDLType>::reset() If it does not take any argument, I think the name `clear` is better for that. When using `reset`, I expect that `reset` method takes an argument to be set. > Source/WebCore/bindings/js/DOMPromiseProxy.h:215 > +inline void DOMPromiseProxy<IDLVoid>::reset() Ditto. > Source/WebCore/bindings/js/DOMPromiseProxy.h:283 > +inline void DOMPromiseProxyWithResolveCallback<IDLType>::reset() Ditto. Committed r220433: <http://trac.webkit.org/changeset/220433> Additional changes landed in r220440. |