| Summary: | ASSERTION FAILED: isCell() under WebCore::JSDOMConstructor seen with webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryan Haddad <ryanhaddad> | ||||||
| Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, mark.lam, rniwa, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf, ysuzuki | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Ryan Haddad
2020-06-02 12:30:47 PDT
Created attachment 400895 [details]
Patch
Created attachment 400896 [details]
Patch
I'll update binding tests results. Comment on attachment 400896 [details]
Patch
r=me. Please rebase the bindings test results.
imported/w3c/web-platform-tests/service-workers/service-worker/fetch-request-no-freshness-headers.https.html is failing on iOS without this. https://results.webkit.org/?suite=layout-tests&test=imported%2Fw3c%2Fweb-platform-tests%2Fservice-workers%2Fservice-worker%2Ffetch-request-no-freshness-headers.https.html Committed r262479: <https://trac.webkit.org/changeset/262479> Comment on attachment 400896 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=400896&action=review > Source/WebCore/ChangeLog:8 > + Some DOM constructor can return jsNull. For example, AudioContext constructor can return jsNull when it exceeds # of hardware audio contexts. This looks like a bug in the AudioContext implementation. This is not the specified behavior: https://www.w3.org/TR/webaudio/#AudioContext-constructors "If the AudioContext is not allowed to start, abort these steps." So we're supposed to construct an AudioContext but it is not supposed to start playing. I can understand if you don't want to fix the WebAudio implementation. But then why not simply add a new WebIDL attribute like [ConstructorMayReturnNull], and then the bindings generator would use toJS() instead of toJSNewlyCreated() in this case? > Source/WebCore/ChangeLog:9 > + However CodeGeneratorJS assumes that DOM constructor always returns an object, or throws an exception. Yes, this was the whole idea behind toJSNewlyCreated() vs toJS(). This was an optimization to avoid the null check when the object was just constructed. It seems like this change is reverting the optimization. |