Remove an isContextInitialized() check from ScriptController::windowProxy()
WindowProxy::initializeIfNeeded() is no-op when isContextInitialized() returns true. So we can remove the check from ScriptController::windowProxy() and unconditionally call WindowProxy::initializeIfNeeded(). This CL will cause a subtle change: Before this CL, dispatchDidClearWindowObjectInMainWorld was not called if WindowProxy gets initialized via WindowProxy::setGlobal. After this CL, dispatchDidClearWindowObjectInMainWorld will be called always when WindowProxy gets initialized. I don't think the difference matters (and I guess the new behavior will be more correct). BUG=677253 Review-Url: https://codereview.chromium.org/2613893002 Cr-Commit-Position: refs/heads/master@{#441908}
Showing
Please register or sign in to comment