Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: Source/bindings/v8/V8WindowShell.cpp

Issue 334283004: Rename DOMWindow to LocalDOMWindow (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8WindowShell.cpp
diff --git a/Source/bindings/v8/V8WindowShell.cpp b/Source/bindings/v8/V8WindowShell.cpp
index 6bdbb0f03a11b7202082ffdd9d7f36ebec7b32a9..8b9e8b2dbfb83228de1fae6806d853aba8a7ee9f 100644
--- a/Source/bindings/v8/V8WindowShell.cpp
+++ b/Source/bindings/v8/V8WindowShell.cpp
@@ -130,8 +130,8 @@ void V8WindowShell::clearForNavigation()
m_document.clear();
// Clear the document wrapper cache before turning on access checks on
- // the old DOMWindow wrapper. This way, access to the document wrapper
- // will be protected by the security checks on the DOMWindow wrapper.
+ // the old LocalDOMWindow wrapper. This way, access to the document wrapper
+ // will be protected by the security checks on the LocalDOMWindow wrapper.
clearDocumentProperty();
v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototypeChain(m_global.newLocal(m_isolate), m_isolate);
@@ -142,16 +142,16 @@ void V8WindowShell::clearForNavigation()
// Create a new environment and setup the global object.
//
-// The global object corresponds to a DOMWindow instance. However, to
-// allow properties of the JS DOMWindow instance to be shadowed, we
-// use a shadow object as the global object and use the JS DOMWindow
-// instance as the prototype for that shadow object. The JS DOMWindow
+// The global object corresponds to a LocalDOMWindow instance. However, to
+// allow properties of the JS LocalDOMWindow instance to be shadowed, we
+// use a shadow object as the global object and use the JS LocalDOMWindow
+// instance as the prototype for that shadow object. The JS LocalDOMWindow
// instance is undetectable from JavaScript code because the __proto__
// accessors skip that object.
//
-// The shadow object and the DOMWindow instance are seen as one object
+// The shadow object and the LocalDOMWindow instance are seen as one object
// from JavaScript. The JavaScript object that corresponds to a
-// DOMWindow instance is the shadow object. When mapping a DOMWindow
+// LocalDOMWindow instance is the shadow object. When mapping a LocalDOMWindow
// instance to a V8 object, we return the shadow object.
//
// To implement split-window, see
@@ -290,7 +290,7 @@ static v8::Handle<v8::Object> toInnerGlobalObject(v8::Handle<v8::Context> contex
bool V8WindowShell::installDOMWindow()
{
- DOMWindow* window = m_frame->domWindow();
+ LocalDOMWindow* window = m_frame->domWindow();
v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(m_isolate, m_scriptState->perContextData()->constructorForType(&V8Window::wrapperTypeInfo));
if (windowWrapper.IsEmpty())
return false;
@@ -304,25 +304,25 @@ bool V8WindowShell::installDOMWindow()
//
// outerGlobalObject (Empty object, remains after navigation)
// -- has prototype --> innerGlobalObject (Holds global variables, changes during navigation)
- // -- has prototype --> DOMWindow instance
+ // -- has prototype --> LocalDOMWindow instance
// -- has prototype --> Window.prototype
// -- has prototype --> Object.prototype
//
// Note: Much of this prototype structure is hidden from web content. The
- // outer, inner, and DOMWindow instance all appear to be the same
+ // outer, inner, and LocalDOMWindow instance all appear to be the same
// JavaScript object.
//
- // Note: With Oilpan, the DOMWindow object is garbage collected.
- // Persistent references to this inner global object view of the DOMWindow
+ // Note: With Oilpan, the LocalDOMWindow object is garbage collected.
+ // Persistent references to this inner global object view of the LocalDOMWindow
// aren't kept, as that would prevent the global object from ever being released.
- // It is safe not to do so, as the wrapper for the DOMWindow being installed here
+ // It is safe not to do so, as the wrapper for the LocalDOMWindow being installed here
// already keeps a persistent reference, and it along with the inner global object
- // views of the DOMWindow will die together once that wrapper clears the persistent
+ // views of the LocalDOMWindow will die together once that wrapper clears the persistent
// reference.
v8::Handle<v8::Object> innerGlobalObject = toInnerGlobalObject(m_scriptState->context());
V8DOMWrapper::setNativeInfoForHiddenWrapper(innerGlobalObject, &V8Window::wrapperTypeInfo, window);
innerGlobalObject->SetPrototype(windowWrapper);
- V8DOMWrapper::associateObjectWithWrapper<V8Window>(PassRefPtrWillBeRawPtr<DOMWindow>(window), &V8Window::wrapperTypeInfo, windowWrapper, m_isolate, WrapperConfiguration::Dependent);
+ V8DOMWrapper::associateObjectWithWrapper<V8Window>(PassRefPtrWillBeRawPtr<LocalDOMWindow>(window), &V8Window::wrapperTypeInfo, windowWrapper, m_isolate, WrapperConfiguration::Dependent);
return true;
}
@@ -346,7 +346,7 @@ void V8WindowShell::updateDocumentProperty()
checkDocumentWrapper(m_document.newLocal(m_isolate), m_frame->document());
// If instantiation of the document wrapper fails, clear the cache
- // and let the DOMWindow accessor handle access to the document.
+ // and let the LocalDOMWindow accessor handle access to the document.
if (documentWrapper.IsEmpty()) {
clearDocumentProperty();
return;
@@ -355,7 +355,7 @@ void V8WindowShell::updateDocumentProperty()
context->Global()->ForceSet(v8AtomicString(m_isolate, "document"), documentWrapper, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
// We also stash a reference to the document on the inner global object so that
- // DOMWindow objects we obtain from JavaScript references are guaranteed to have
+ // LocalDOMWindow objects we obtain from JavaScript references are guaranteed to have
// live Document objects.
V8HiddenValue::setHiddenValue(m_isolate, toInnerGlobalObject(context), V8HiddenValue::document(m_isolate), documentWrapper);
}
« no previous file with comments | « Source/bindings/v8/V8WindowShell.h ('k') | Source/bindings/v8/custom/V8CustomXPathNSResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698