service worker: Assume context_ in EmbeddedWorkerInstance::Start.
This is only called by ServiceWorkerVersion::StartInternal, which already assumes the context is alive (since it passes it to ServiceWorkerProviderHost which uses it). The motivation is removing the callback passed to Start. This is currently invoked in only two places: * When context_ was null (removed in this CL) * When a OnScriptEvaluated IPC is received from the renderer. The callback isn't invoked when startup failed before script evaluation, and in success cases it is invoked before startup finishes (OnStarted()). It can even be invoked with failure when startup succeeds, when an uncaught runtime error occurred during script evaluation. I aim to improve the code by first eliminating the callback then adding back one when the implementation is capable of calling it in a more sensible manner. Bug: 859912 Change-Id: I74643f1a64ef6a637ccd9db6bf1f9e889c814b3a Reviewed-on: https://chromium-review.googlesource.com/1124722 Commit-Queue: Matt Falkenhagen <falken@chromium.org> Reviewed-by:Makoto Shimazu <shimazu@chromium.org> Cr-Commit-Position: refs/heads/master@{#572534}
Showing
Please register or sign in to comment