Bug 191064 - iOS simulator does not support WebAssembly
Summary: iOS simulator does not support WebAssembly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: Safari 12
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Miller
URL:
Keywords: InRadar
Depends on: 214681
Blocks:
  Show dependency treegraph
 
Reported: 2018-10-30 05:14 PDT by Ashley Gullen
Modified: 2020-09-23 07:07 PDT (History)
31 users (show)

See Also:


Attachments
Patch (2.05 KB, patch)
2020-07-22 17:29 PDT, Keith Miller
no flags Details | Formatted Diff | Diff
Patch for landing (4.62 KB, patch)
2020-07-22 20:36 PDT, Keith Miller
no flags Details | Formatted Diff | Diff
Patch for landing (13.11 KB, patch)
2020-07-23 12:49 PDT, Keith Miller
no flags Details | Formatted Diff | Diff
Patch for landing (13.48 KB, patch)
2020-07-23 12:53 PDT, Keith Miller
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley Gullen 2018-10-30 05:14:25 PDT
The iOS simulator in Xcode does not appear to support WebAssembly. Content that works on a real device does not work on the simulator, as 'WebAssembly' appears to be undefined.

If you build a Cordova app that depends on WebAssembly, then the simulator is not fit for purpose. This includes all iOS content published by Construct 3 (www.construct.net).
Comment 1 Radar WebKit Bug Importer 2018-10-30 14:46:07 PDT
<rdar://problem/45681669>
Comment 2 Jonathan Beri 2019-08-12 09:17:48 PDT
I can confirm this is still an issue, tested on iOS 12.4. Is anyone looking into enabling WebAssembly in the simulator?
Comment 3 Alexey Proskuryakov 2019-08-12 10:53:01 PDT
Updated Apple internal reference:

rdar://problem/40830087
Comment 4 Sanjay Kumar 2019-08-28 01:31:37 PDT
Please fix. Lack of WebAssembly is a serious hindrance - I cant afford to buy so many iOS devices to test an Web-assembly is basic minimum requirement for my App. Thanks.
Comment 5 Ashley Gullen 2019-12-19 06:40:20 PST
Perhaps the new WebAssembly interpreter could help fix this?: https://bugs.webkit.org/show_bug.cgi?id=194257
Comment 6 Ashley Gullen 2020-04-23 05:58:04 PDT
We still get regular reports of this, since none of our framework's content can work in the iOS simulator due to this bug. Is there any news on it?
Comment 7 Haakon Jack 2020-06-22 08:39:34 PDT
This is still an issue. A fix would be greatly appreciated.
Comment 8 Keith Miller 2020-07-22 17:29:37 PDT
Created attachment 405000 [details]
Patch
Comment 9 Yusuke Suzuki 2020-07-22 17:45:52 PDT
Comment on attachment 405000 [details]
Patch

r=me
Comment 10 Chris Dumez 2020-07-22 18:41:57 PDT
Comment on attachment 405000 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=405000&action=review

> Source/WTF/ChangeLog:8
> +        Now that it seems we can JIT in the Simulator we should enable

A lot of layout tests are skipped in iOS simulator due to lack of WebAssembly. We should unstop them too.
Comment 11 Chris Dumez 2020-07-22 18:42:39 PDT
Comment on attachment 405000 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=405000&action=review

>> Source/WTF/ChangeLog:8
>> +        Now that it seems we can JIT in the Simulator we should enable
> 
> A lot of layout tests are skipped in iOS simulator due to lack of WebAssembly. We should unstop them too.

LayoutTests/platform/ios-simulator/TestExpectations :

# Simulator doesn't support WebAssembly.
http/tests/security/contentSecurityPolicy/WebAssembly-allowed.html [ Failure ]
http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe.html [ Failure ]
http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script.html [ Failure ]
http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html [ Failure ]
http/tests/security/contentSecurityPolicy/WebAssembly-blocked.html [ Failure ]
imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.html [ Failure ]
imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-failure.https.any.serviceworker.html [ Failure ]
imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-agent-formalism/requires-success.any.worker.html [ Failure ]
wasm/iframe-postmessage.html [ Skip ]
wasm/iframe-parent-postmessage.html [ Skip ]
wasm/window-postmessage.html [ Skip ]
imported/w3c/web-platform-tests/encoding/encodeInto.any.html [ Skip ]
imported/w3c/web-platform-tests/encoding/encodeInto.any.worker.html [ Skip ]
imported/w3c/web-platform-tests/encoding/streams/decode-utf8.any.html [ Skip ]
imported/w3c/web-platform-tests/encoding/streams/decode-utf8.any.worker.html [ Skip ]
imported/w3c/web-platform-tests/encoding/textdecoder-copy.any.html [ Skip ]
imported/w3c/web-platform-tests/encoding/textdecoder-copy.any.worker.html [ Skip ]
imported/w3c/web-platform-tests/encoding/textdecoder-streaming.any.html [ Skip ]
imported/w3c/web-platform-tests/encoding/textdecoder-streaming.any.worker.html [ Skip ]
Comment 12 Keith Miller 2020-07-22 20:36:18 PDT
Created attachment 405015 [details]
Patch for landing
Comment 13 Keith Miller 2020-07-22 20:36:45 PDT
(In reply to Chris Dumez from comment #10)
> Comment on attachment 405000 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=405000&action=review
> 
> > Source/WTF/ChangeLog:8
> > +        Now that it seems we can JIT in the Simulator we should enable
> 
> A lot of layout tests are skipped in iOS simulator due to lack of
> WebAssembly. We should unstop them too.

Indeed, I'll unstop.
Comment 14 EWS 2020-07-22 21:20:52 PDT
Committed r264745: <https://trac.webkit.org/changeset/264745>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 405015 [details].
Comment 15 Aakash Jain 2020-07-23 03:52:48 PDT
(In reply to EWS from comment #14)
> Committed r264745: <https://trac.webkit.org/changeset/264745>
This broke following 3 ios-wk2 tests as also indicated by EWS.
- imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
- imported/w3c/web-platform-tests/xhr/send-data-sharedarraybuffer.any.html
- imported/w3c/web-platform-tests/xhr/send-data-sharedarraybuffer.any.worker.html
Comment 16 Yusuke Suzuki 2020-07-23 03:53:57 PDT
Re-opened since this is blocked by bug 214681
Comment 17 Chris Dumez 2020-07-23 08:52:10 PDT
(In reply to Yusuke Suzuki from comment #16)
> Re-opened since this is blocked by bug 214681

imported/w3c/web-platform-tests/webaudio/the-audio-api/the-audiobuffer-interface/audiobuffer-copy-channel.html
imported/w3c/web-platform-tests/xhr/send-data-sharedarraybuffer.any.html
imported/w3c/web-platform-tests/xhr/send-data-sharedarraybuffer.any.worker.html

All 3 were *progressions* and merely needed a rebaseline.
Comment 18 Aakash Jain 2020-07-23 09:06:25 PDT
(In reply to Chris Dumez from comment #17)
> All 3 were *progressions* and merely needed a rebaseline.
It wasn't immediately obvious to me, and these test failures were slowing down ios-wk2 EWS. I didn't want to delay and let patches pileup on ios-wk2 queue.
Comment 19 Chris Dumez 2020-07-23 09:08:04 PDT
(In reply to Aakash Jain from comment #18)
> (In reply to Chris Dumez from comment #17)
> > All 3 were *progressions* and merely needed a rebaseline.
> It wasn't immediately obvious to me, and these test failures were slowing
> down ios-wk2 EWS. I didn't want to delay and let patches pileup on ios-wk2
> queue.

No worries, I guess somebody did not wait for the iOS EWS bubble before landing an iOS-specific patch :P
Comment 20 Keith Miller 2020-07-23 09:36:24 PDT
(In reply to Chris Dumez from comment #19)
> (In reply to Aakash Jain from comment #18)
> > (In reply to Chris Dumez from comment #17)
> > > All 3 were *progressions* and merely needed a rebaseline.
> > It wasn't immediately obvious to me, and these test failures were slowing
> > down ios-wk2 EWS. I didn't want to delay and let patches pileup on ios-wk2
> > queue.
> 
> No worries, I guess somebody did not wait for the iOS EWS bubble before
> landing an iOS-specific patch :P

I maintain my position that commit queue should block on EWS! D:
Comment 21 Keith Miller 2020-07-23 12:49:41 PDT
Created attachment 405068 [details]
Patch for landing
Comment 22 EWS 2020-07-23 12:50:15 PDT
Tools/Scripts/svn-apply failed to apply attachment 405068 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Comment 23 Keith Miller 2020-07-23 12:53:10 PDT
Created attachment 405070 [details]
Patch for landing
Comment 24 EWS 2020-07-23 12:54:00 PDT
ChangeLog entry in LayoutTests/ChangeLog contains OOPS!.
Comment 25 Keith Miller 2020-07-23 15:34:25 PDT
Relanded in r264801.
Comment 26 Ashley Gullen 2020-09-23 07:07:59 PDT
Just tried the iOS simulator in Xcode 12 and it does support WebAssembly! Great stuff, thanks for the fix!