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

Unified Diff: Source/bindings/core/v8/WindowProxy.cpp

Issue 627933002: Oilpan: move ScriptController+WindowProxy to the heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Smaller fixes Created 6 years, 2 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/core/v8/WindowProxy.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index 44baffed81bc8b03d4943d49d24d797c9b1043d0..1d8dd13a5f6cf9cbbb515a4142525b609c75270e 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -74,9 +74,9 @@ static void checkDocumentWrapper(v8::Handle<v8::Object> wrapper, Document* docum
ASSERT(!document->isHTMLDocument() || (V8Document::toImpl(v8::Handle<v8::Object>::Cast(wrapper->GetPrototype())) == document));
}
-PassOwnPtr<WindowProxy> WindowProxy::create(LocalFrame* frame, DOMWrapperWorld& world, v8::Isolate* isolate)
+PassOwnPtrWillBeRawPtr<WindowProxy> WindowProxy::create(LocalFrame* frame, DOMWrapperWorld& world, v8::Isolate* isolate)
{
- return adoptPtr(new WindowProxy(frame, &world, isolate));
+ return adoptPtrWillBeNoop(new WindowProxy(frame, &world, isolate));
}
WindowProxy::WindowProxy(LocalFrame* frame, PassRefPtr<DOMWrapperWorld> world, v8::Isolate* isolate)
@@ -86,6 +86,17 @@ WindowProxy::WindowProxy(LocalFrame* frame, PassRefPtr<DOMWrapperWorld> world, v
{
}
+WindowProxy::~WindowProxy()
+{
+ // clearForClose() or clearForNavigation() must be invoked before destruction starts.
+ ASSERT(!isContextInitialized());
+}
+
+void WindowProxy::trace(Visitor* visitor)
+{
+ visitor->trace(m_frame);
+}
+
void WindowProxy::disposeContext(GlobalDetachmentBehavior behavior)
{
if (!isContextInitialized())
« no previous file with comments | « Source/bindings/core/v8/WindowProxy.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698