2006-04-28 Steve Falkenburg <sfalken@apple.com>
authorsfalken <sfalken@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Apr 2006 00:17:31 +0000 (00:17 +0000)
committersfalken <sfalken@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Apr 2006 00:17:31 +0000 (00:17 +0000)
        Reviewed by eric.

        Turned off C++ exceptions, fixed memory leaks

        * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
        * Spinneret/Spinneret.sln:
        * Spinneret/Spinneret/Spinneret.cpp:
        (_tWinMain):
        * Spinneret/Spinneret/Spinneret.vcproj:
        * Spinneret/Spinneret/WebFrame.cpp:
        (WebKit::WebFrame::WebFramePrivate::~WebFramePrivate):
        (WebKit::WebFrame::WebFrame):
        (WebKit::WebFrame::~WebFrame):
        (WebKit::WebFrame::impl):
        * Spinneret/Spinneret/WebFrame.h:
        * Spinneret/Spinneret/WebView.cpp:
        * Spinneret/Spinneret/stdafx.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14117 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj
WebKitTools/Spinneret/Spinneret.sln
WebKitTools/Spinneret/Spinneret/Spinneret.cpp
WebKitTools/Spinneret/Spinneret/Spinneret.vcproj
WebKitTools/Spinneret/Spinneret/WebFrame.cpp
WebKitTools/Spinneret/Spinneret/WebFrame.h
WebKitTools/Spinneret/Spinneret/WebView.cpp
WebKitTools/Spinneret/Spinneret/stdafx.h

index 82b1257..7ca93e6 100644 (file)
@@ -1,3 +1,23 @@
+2006-04-28  Steve Falkenburg  <sfalken@apple.com>
+
+        Reviewed by eric.
+        
+        Turned off C++ exceptions, fixed memory leaks
+
+        * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/DumpRenderTree.vcproj:
+        * Spinneret/Spinneret.sln:
+        * Spinneret/Spinneret/Spinneret.cpp:
+        (_tWinMain):
+        * Spinneret/Spinneret/Spinneret.vcproj:
+        * Spinneret/Spinneret/WebFrame.cpp:
+        (WebKit::WebFrame::WebFramePrivate::~WebFramePrivate):
+        (WebKit::WebFrame::WebFrame):
+        (WebKit::WebFrame::~WebFrame):
+        (WebKit::WebFrame::impl):
+        * Spinneret/Spinneret/WebFrame.h:
+        * Spinneret/Spinneret/WebView.cpp:
+        * Spinneret/Spinneret/stdafx.h:
+
 2006-04-28  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Darin.
index fbfb2ec..65a6175 100644 (file)
@@ -40,7 +40,7 @@
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\..\WebCore&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\loader&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\dom&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\ecma&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\html&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\css&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\misc&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\platform&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\bridge\win&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\page&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\bridge&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\platform\win&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\rendering&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\editing&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\dom&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\xml&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\kwq&quot;;&quot;$(SolutionDir)\..\..\..\iconv&quot;;&quot;$(SolutionDir)\..\..\..\libxml2&quot;;&quot;$(SolutionDir)\..\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\ForwardingHeaders&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\..\..\WebCore&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\loader&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\dom&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\ecma&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\html&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\css&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\misc&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\platform&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\bridge\win&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\page&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\bridge&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\platform\win&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\rendering&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\editing&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\dom&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\xml&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\kwq&quot;;&quot;$(ProjectDir)\..\..\..\..\iconv&quot;;&quot;$(ProjectDir)\..\..\..\..\libxml2&quot;;&quot;$(ProjectDir)\..\..\..\..\icu\include&quot;;&quot;$(ProjectDir)\..\..\..\..\JavaScriptCore&quot;;&quot;$(ProjectDir)\..\..\..\..\JavaScriptCore\os-win32&quot;;&quot;$(ProjectDir)\..\..\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\ForwardingHeaders&quot;"\r
                                PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
                                MinimalRebuild="true"\r
                                BasicRuntimeChecks="3"\r
@@ -61,7 +61,7 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\icu\lib\icuuc.lib&quot;"\r
+                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\icu\lib\icuuc.lib&quot;"\r
                                LinkIncremental="2"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="1"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\..\WebCore&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\loader&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\dom&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\ecma&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\html&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\css&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\khtml\misc&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\platform&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\bridge\win&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\page&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\bridge&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\platform\win&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\rendering&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\editing&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\dom&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\xml&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\kwq&quot;;&quot;$(SolutionDir)\..\..\..\iconv&quot;;&quot;$(SolutionDir)\..\..\..\libxml2&quot;;&quot;$(SolutionDir)\..\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(SolutionDir)\..\..\..\WebCore\ForwardingHeaders&quot;"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\..\..\WebCore&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\loader&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\dom&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\ecma&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\html&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\css&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\khtml\misc&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\platform&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\bridge\win&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\page&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\bridge&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\platform\win&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\rendering&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\editing&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\dom&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\xml&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\kwq&quot;;&quot;$(ProjectDir)\..\..\..\..\iconv&quot;;&quot;$(ProjectDir)\..\..\..\..\libxml2&quot;;&quot;$(ProjectDir)\..\..\..\..\icu\include&quot;;&quot;$(ProjectDir)\..\..\..\..\JavaScriptCore&quot;;&quot;$(ProjectDir)\..\..\..\..\JavaScriptCore\os-win32&quot;;&quot;$(ProjectDir)\..\..\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(ProjectDir)\..\..\..\..\WebCore\ForwardingHeaders&quot;"\r
                                PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
                                RuntimeLibrary="2"\r
                                UsePrecompiledHeader="0"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\..\icu\lib\icuuc.lib&quot;"\r
+                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\..\icu\lib\icuuc.lib&quot;"\r
                                LinkIncremental="1"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="1"\r
index 583e917..1732349 100755 (executable)
@@ -2,6 +2,14 @@
 Microsoft Visual Studio Solution File, Format Version 9.00\r
 # Visual Studio 2005\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spinneret", "Spinneret\Spinneret.vcproj", "{114FCA11-216B-4C8C-957E-30A75AE80443}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6} = {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5} = {011D10F1-B656-4A1B-A0C3-3842F02122C5}\r
+       EndProjectSection\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JavaScriptCore", "..\..\JavaScriptCore\JavaScriptCore.vcproj\JavaScriptCore\JavaScriptCore.vcproj", "{011D10F1-B656-4A1B-A0C3-3842F02122C5}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebCore", "..\..\WebCore\WebCore.vcproj\WebCore\WebCore.vcproj", "{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}"\r
 EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
@@ -13,6 +21,14 @@ Global
                {114FCA11-216B-4C8C-957E-30A75AE80443}.Debug|Win32.Build.0 = Debug|Win32\r
                {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32\r
                {114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug|Win32.Build.0 = Debug|Win32\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32\r
+               {011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug|Win32.Build.0 = Debug|Win32\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32\r
+               {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index e0edf4b..5a393ed 100755 (executable)
@@ -27,6 +27,7 @@
 #include "Spinneret.h"
 #include "WebView.h"
 #include "WebFrame.h"
+#include "unicode/uclean.h"
 
 #include <commctrl.h>
 
@@ -69,6 +70,11 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
                      LPTSTR    lpCmdLine,
                      int       nCmdShow)
 {
+#ifdef _CRTDBG_MAP_ALLOC
+    _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+    _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+#endif
+
     UNREFERENCED_PARAMETER(hPrevInstance);
     UNREFERENCED_PARAMETER(lpCmdLine);
 
@@ -119,6 +125,12 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
         }
     }
 
+    delete gWebView;
+#ifdef _CRTDBG_MAP_ALLOC
+    u_cleanup();
+    _CrtDumpMemoryLeaks();
+#endif
+
     return (int) msg.wParam;
 }
 
index e4ef8ba..15f5ecc 100755 (executable)
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\WebCore&quot;;&quot;$(SolutionDir)\..\..\WebCore\loader&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\ecma&quot;;&quot;$(SolutionDir)\..\..\WebCore\html&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml&quot;;&quot;$(SolutionDir)\..\..\WebCore\css&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\misc&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\page&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform\cairo\cairo\src&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\rendering&quot;;&quot;$(SolutionDir)\..\..\WebCore\editing&quot;;&quot;$(SolutionDir)\..\..\WebCore\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\xml&quot;;&quot;$(SolutionDir)\..\..\WebCore\kwq&quot;;&quot;$(SolutionDir)\..\..\iconv&quot;;&quot;$(SolutionDir)\..\..\libxml2&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(SolutionDir)\..\..\WebCore\ForwardingHeaders&quot;"\r
-                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\..\WebCore&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\loader&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml\dom&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml\ecma&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\html&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\css&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml\misc&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\platform&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\bridge\win&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\page&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\bridge&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\platform\win&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\rendering&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\editing&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\dom&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\xml&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\kwq&quot;;&quot;$(ProjectDir)\..\..\..\iconv&quot;;&quot;$(ProjectDir)\..\..\..\libxml2&quot;;&quot;$(ProjectDir)\..\..\..\icu\include&quot;;&quot;$(ProjectDir)\..\..\..\JavaScriptCore&quot;;&quot;$(ProjectDir)\..\..\..\JavaScriptCore\os-win32&quot;;&quot;$(ProjectDir)\..\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\ForwardingHeaders&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"\r
                                MinimalRebuild="true"\r
+                               ExceptionHandling="0"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="3"\r
+                               RuntimeTypeInfo="false"\r
                                UsePrecompiledHeader="2"\r
                                WarningLevel="1"\r
                                Detect64BitPortabilityProblems="false"\r
@@ -61,8 +63,9 @@
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\icu\lib\icuuc.lib&quot;&#x0D;&#x0A;comctl32.lib&#x0D;&#x0A;wininet.lib"\r
+                               AdditionalDependencies="comctl32.lib wininet.lib &quot;$(ProjectDir)\..\..\..\iconv\lib\iconv.lib&quot; &quot;$(ProjectDir)\..\..\..\libxml\lib\libxml2.lib&quot; &quot;$(ProjectDir)\..\..\..\libxslt\lib\libxslt.lib&quot; &quot;$(ProjectDir)\..\..\..\icu\lib\icuuc.lib&quot;"\r
                                LinkIncremental="2"\r
+                               AdditionalLibraryDirectories=""\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                TargetMachine="1"\r
                        />\r
                        <Tool\r
                                Name="VCCLCompilerTool"\r
-                               AdditionalIncludeDirectories="&quot;$(SolutionDir)\..\..\WebCore&quot;;&quot;$(SolutionDir)\..\..\WebCore\loader&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\ecma&quot;;&quot;$(SolutionDir)\..\..\WebCore\html&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml&quot;;&quot;$(SolutionDir)\..\..\WebCore\css&quot;;&quot;$(SolutionDir)\..\..\WebCore\khtml\misc&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\page&quot;;&quot;$(SolutionDir)\..\..\WebCore\bridge&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform\cairo\cairo\src&quot;;&quot;$(SolutionDir)\..\..\WebCore\platform\win&quot;;&quot;$(SolutionDir)\..\..\WebCore\rendering&quot;;&quot;$(SolutionDir)\..\..\WebCore\editing&quot;;&quot;$(SolutionDir)\..\..\WebCore\dom&quot;;&quot;$(SolutionDir)\..\..\WebCore\xml&quot;;&quot;$(SolutionDir)\..\..\WebCore\kwq&quot;;&quot;$(SolutionDir)\..\..\iconv&quot;;&quot;$(SolutionDir)\..\..\libxml2&quot;;&quot;$(SolutionDir)\..\..\icu\include&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\os-win32&quot;;&quot;$(SolutionDir)\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(SolutionDir)\..\..\WebCore\ForwardingHeaders&quot;"\r
-                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"\r
+                               AdditionalIncludeDirectories="&quot;$(ProjectDir)\..\..\..\WebCore&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\loader&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml\dom&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml\ecma&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\html&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\css&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\khtml\misc&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\platform&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\bridge\win&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\page&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\bridge&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\platform\cairo\cairo\src&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\platform\win&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\rendering&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\editing&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\dom&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\xml&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\kwq&quot;;&quot;$(ProjectDir)\..\..\..\iconv&quot;;&quot;$(ProjectDir)\..\..\..\libxml2&quot;;&quot;$(ProjectDir)\..\..\..\icu\include&quot;;&quot;$(ProjectDir)\..\..\..\JavaScriptCore&quot;;&quot;$(ProjectDir)\..\..\..\JavaScriptCore\os-win32&quot;;&quot;$(ProjectDir)\..\..\..\JavaScriptCore\kxmlcore&quot;;&quot;$(ProjectDir)\..\..\..\WebCore\ForwardingHeaders&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE"\r
+                               ExceptionHandling="0"\r
                                RuntimeLibrary="2"\r
+                               RuntimeTypeInfo="false"\r
                                UsePrecompiledHeader="2"\r
                                WarningLevel="1"\r
                                Detect64BitPortabilityProblems="false"\r
                        />\r
                        <Tool\r
                                Name="VCLinkerTool"\r
-                               AdditionalOptions="&quot;$(WebKitOutputDir)\WebCore.intermediate\$(ConfigurationName)\WebCore.intermediate\WebCore.lib&quot;&#x0D;&#x0A;&quot;$(WebKitOutputDir)\JavaScriptCore.intermediate\$(ConfigurationName)\JavaScriptCore.intermediate\JavaScriptCore.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(SolutionDir)\..\..\icu\lib\icuuc.lib&quot;&#x0D;&#x0A;comctl32.lib&#x0D;&#x0A;wininet.lib"\r
+                               AdditionalOptions="&quot;$(ProjectDir)\..\..\..\iconv\lib\iconv.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\libxml\lib\libxml2.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\libxslt\lib\libxslt.lib&quot;&#x0D;&#x0A;&quot;$(ProjectDir)\..\..\..\icu\lib\icuuc.lib&quot;&#x0D;&#x0A;"\r
+                               AdditionalDependencies="comctl32.lib wininet.lib &quot;$(ProjectDir)\..\..\..\iconv\lib\iconv.lib&quot; &quot;$(ProjectDir)\..\..\..\libxml\lib\libxml2.lib&quot; &quot;$(ProjectDir)\..\..\..\libxslt\lib\libxslt.lib&quot; &quot;$(ProjectDir)\..\..\..\icu\lib\icuuc.lib&quot;"\r
                                LinkIncremental="1"\r
+                               AdditionalLibraryDirectories="&quot;$(ProjectDir)\..\..\..\&quot;"\r
                                GenerateDebugInformation="true"\r
                                SubSystem="2"\r
                                OptimizeReferences="2"\r
index cc41034..b923566 100755 (executable)
@@ -53,8 +53,8 @@ public:
     WebFramePrivate() { }
     ~WebFramePrivate() { }
 
-    Frame* frame;
-    FrameView* frameView;
+    RefPtr<Frame> frame;
+    RefPtr<FrameView> frameView;
     WebView* webView;
 };
 
@@ -62,14 +62,24 @@ WebFrame::WebFrame(char* name, WebView* view)
 : d(new WebFrame::WebFramePrivate)
 {
     d->webView = view;
-    Page *page = new Page();
-    d->frame = new FrameWin(page, 0, this);
-    page->setMainFrame(d->frame);
-    d->frameView = new FrameView(d->frame);
-    d->frame->setView(d->frameView);
+    Page* page = new Page();
+    Frame* frame = new FrameWin(page, 0, this);
+    d->frame = frame;
+    frame->deref(); // Frames are created with a refcount of 1.  Release this ref, since we've assigned it to a RefPtr
+    page->setMainFrame(frame);
+    FrameView* frameView = new FrameView(frame);
+    d->frameView = frameView;
+    frameView->deref(); // FrameViews are created with a refcount of 1.  Release this ref, since we've assigned it to a RefPtr
+    d->frame->setView(frameView);
     d->frameView->setWindowHandle(view->windowHandle());
 }
 
+WebFrame::~WebFrame()
+{
+    delete d->frame->page();
+    delete d;
+}
+
 void WebFrame::loadFilePath(char* path)
 {
     char URL[2048];
@@ -182,7 +192,7 @@ void WebFrame::paint()
 
 WebCore::Frame* WebFrame::impl()
 {
-    return d->frame;
+    return d->frame.get();
 }
 
 }
index ad4de76..ea8543a 100755 (executable)
@@ -44,6 +44,7 @@ namespace WebKit {
     class WebFrame : public WebCore::TransferJobClient, public WebCore::FrameWinClient {
     public:
     WebFrame(char* name, WebView*);
+    ~WebFrame();
 
     void loadFilePath(char*);
     void loadHTMLString(char* html, char* baseURL = 0);
index b36becc..778c45e 100755 (executable)
@@ -317,5 +317,4 @@ LRESULT CALLBACK WebViewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
     return 0;
 }
 
-
 };
index 5861348..86f76cc 100755 (executable)
 #include <memory.h>
 #include <tchar.h>
 
-
-// TODO: reference additional headers your program requires here
+#if 0
+// Visual Studio Leak Detection
+// <http://msdn2.microsoft.com/en-US/library/e5ewb1h3.aspx>
+#if defined(_MSC_VER) && defined(_DEBUG)
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+#endif
+#endif