• nhiroki's avatar
    Worker: Introduce WorkerReportingProxy::willEvaluateWorkerScript() · 97f2c905
    nhiroki authored
    This introduces WorkerReportingProxy::willEvaluateWorkerScript() and removes
    WorkerReportingProxy::didLoadWorkerScript().
    
    Before this CL, didLoadWorkerScript() was called during WorkerThread
    initialization. This timing was late, but it was intended because one of
    observers (ServiceWorker) wanted to access WorkerGlobalScope in the notification
    that is created during WorkerThread initialization in order to record size of
    worker scripts.
    
    After this CL, recording the size is done in willEvaluateWorkerScript() that
    would be more appropriate timing for the operation. willEvaluateWorkerScript()
    is also useful for unit tests. It enables them to wait until the timing that
    they really wait for.
    
    BUG=640843
    
    Review-Url: https://codereview.chromium.org/2355723005
    Cr-Commit-Position: refs/heads/master@{#420546}
    97f2c905
ServiceWorkerGlobalScopeProxy.h 5.98 KB