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.
Comment 1 by tyoshino@chromium.org
, Feb 23 2017