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

Side by Side Diff: Source/bindings/v8/ScriptController.cpp

Issue 117493002: Invert the owning relationship between WebFrame and Frame. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 : m_frame(frame) 90 : m_frame(frame)
91 , m_sourceURL(0) 91 , m_sourceURL(0)
92 , m_isolate(v8::Isolate::GetCurrent()) 92 , m_isolate(v8::Isolate::GetCurrent())
93 , m_windowShell(V8WindowShell::create(frame, mainThreadNormalWorld(), m_isol ate)) 93 , m_windowShell(V8WindowShell::create(frame, mainThreadNormalWorld(), m_isol ate))
94 , m_windowScriptNPObject(0) 94 , m_windowScriptNPObject(0)
95 { 95 {
96 } 96 }
97 97
98 ScriptController::~ScriptController() 98 ScriptController::~ScriptController()
99 { 99 {
100 clearForClose(true); 100 // V8WindowShell::clearForClose() must be invoked before destruction starts.
101 ASSERT(!m_windowShell->isContextInitialized());
101 } 102 }
102 103
103 void ScriptController::clearScriptObjects() 104 void ScriptController::clearScriptObjects()
104 { 105 {
105 PluginObjectMap::iterator it = m_pluginObjects.begin(); 106 PluginObjectMap::iterator it = m_pluginObjects.begin();
106 for (; it != m_pluginObjects.end(); ++it) { 107 for (; it != m_pluginObjects.end(); ++it) {
107 _NPN_UnregisterObject(it->value); 108 _NPN_UnregisterObject(it->value);
108 _NPN_ReleaseObject(it->value); 109 _NPN_ReleaseObject(it->value);
109 } 110 }
110 m_pluginObjects.clear(); 111 m_pluginObjects.clear();
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 v8Results = evaluateHandleScope.Escape(resultArray); 692 v8Results = evaluateHandleScope.Escape(resultArray);
692 } 693 }
693 694
694 if (results && !v8Results.IsEmpty()) { 695 if (results && !v8Results.IsEmpty()) {
695 for (size_t i = 0; i < v8Results->Length(); ++i) 696 for (size_t i = 0; i < v8Results->Length(); ++i)
696 results->append(ScriptValue(v8Results->Get(i), m_isolate)); 697 results->append(ScriptValue(v8Results->Get(i), m_isolate));
697 } 698 }
698 } 699 }
699 700
700 } // namespace WebCore 701 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698