DescriptionRemove 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}
Committed: https://chromium.googlesource.com/chromium/src/+/559b67fbc41fba740506cd5d6f3d20d20f65039b
Patch Set 1 #Patch Set 2 : temp #
Messages
Total messages: 15 (7 generated)
|