New issue
Advanced search Search tips

Issue 674442 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

EmptyInterfaceProvider is error prone

Project Member Reported by tyoshino@chromium.org, Dec 15 2016

Issue description

LocalFrame::create() gets the singleton instance of EmptyInterfaceProvider by calling InterfaceProvider::getEmptyInterfaceProvider() when it's not given an InterfaceProvider. EmptyInterfaceProvider silently ignores getInterface().

WebSharedWorkerImpl::interfaceProvider() returns Platform::current()->interfaceProvider(). RenderFrameImpl::interfaceProvider() returns its BlinkInterfaceProviderImpl instance. But other WebFrameClient implementations including WebEmbeddedWorkerImpl which is used for service workers doesn't implement this method, and therefore, WebLocalFrameImpl uses nullptr returned by the default implementation of WebFrameClient::interfaceProvider() when creating a LocalFrame instance.

WebSocket got broken because we used the LocalFrame's interfaceProvider if any assuming that we can obtain an effective InterfaceProvider from it (see  bug 671588 ). We get a non-nullptr instance, but it was EmptyInterfaceProvider.

Having no-op implementation may be useful for reducing code for some cases. But for this case, it looks it's better to use nullptr to explicitly tell the users that there's no effective InterfaceProvider available.

The bandaid fix ( https://bugs.chromium.org/p/chromium/issues/detail?id=671588#c29 ) is only for merging. We should be able to determine whether an effective InterfaceProvider is available or not without comparing it with the EmptyInterfaceProvider instance.

 
Cc: kinuko@chromium.org
Project Member

Comment 2 by sheriffbot@chromium.org, Mar 8 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 3 by ricea@chromium.org, Mar 9 2018

Components: -Blink>Network>WebSockets
I'm stripping the WebSocket component as this issue affects WebSockets but isn't caused by them, and hopefully making it more focused will get it triaged.
Cc: oksamyt@chromium.org
Components: -Internals>Mojo Internals>Mojo>Bindings
Labels: -Hotlist-Recharge-Cold
Status: Available (was: Untriaged)
I think this will just end up going away since we're also going to get rid of blink::InterfaceProvder and blink::IterfaceRegistry. Keeping this open for now though.

oksamyt@ maybe this can be tracked as a blocking on the DocumentInterfaceBroker etc work?

Sign in to add a comment