[shared storage] Validate context (frame attached) for createWorklet()
Problem: CheckBrowsingContextIsValid()
is done in all places except
within createWorklet(). This could cause nullptr dereference error when
attempting to GetSharedStorageDocumentService().
This CL adds/moves the check to AddModuleHelper() to cover
createWorklet().
Bug: 368139440
Change-Id: Ied6fdbc0011f156229c3dc02a5e6bde244d508f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5893856
Commit-Queue: Yao Xiao yaoxia@chromium.org
Reviewed-by: Cammie Smith Barnes cammie@chromium.org
Cr-Commit-Position: refs/heads/main@{#1361896}