GuestView container registration is racy |
|||
Issue descriptionChrome Version: 66.0.3341.0 As observed in crbug.com/788914 https://chromium-review.googlesource.com/c/chromium/src/+/857814 and https://chromium-review.googlesource.com/c/chromium/src/+/905521 a guest view container may not have been registered by the time a caller tries to create one. The registration is done in GuestViewContainer.registerElement where we have a readystatechange listener. There is currently a circular dependency ( crbug.com/793935 ) which prevents the registration from being done immediately, but other than that, it's not clear why the registration can't just be done immediately.
,
Aug 15
Even after the circular dependency is fixed, it looks like we still can't register the element immediately. At the time GuestViewContainer.registerElement is called, we may still be on about:blank. It looks like the custom element v0 registration context is document scoped and so the element could be registered for about:blank. Waiting for readystatechange before registering the element avoids this. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/loader/document_loader.cc?rcl=c4ba43ad875387fe19f41a2965724a3c77208899&l=1084 It looks like custom element v1 registration is scoped to the window instead of the document, so perhaps this won't be an issue once we migrate to v1 and then we wouldn't need the readystatechange anymore.
,
Oct 15
|
|||
►
Sign in to add a comment |
|||
Comment 1 by mcnee@chromium.org
, Feb 7 2018