binding: Removes Document::wrap that must be equivalent to Node::wrap. (2nd try)
Removes unnecessary Document::wrap and associateWithWrapper.
The special code in these functions were made in order to keep
WindowProxy::m_document updated and consistent with toV8(document).
But we no longer rely on the hack, and we can remove the dead code.
WindowProxy::m_document is used to support named properties on the
document, and only used in WindowProxy::namedItem{Added,Removed}.
These functions are only called from ScriptController::namedItem
{Added,Removed} and ScriptController already guarantees that the
WindowProxy is initialized at once. So, there is no need for
Document::wrap to call WindowProxy::updateDocumentProperty.
Plus, this CL removes WindowProxy::m_document. Given that we knew
it's the main world, we should be able to retrieve the wrapper
object of the document in almost the same speed as before. The
new code to retrieve the wrapper object should be almost equivalent
to
ScriptWrappable::mainWorldWrapper(isolate)
and it's almost the same as
m_document.newLocal(isolate)
The first attempt was: http://crrev.com/2525313004
BUG=
Review-Url: https://codereview.chromium.org/2542123002
Cr-Commit-Position: refs/heads/master@{#436243}
Showing
Please register or sign in to comment