OSDN Git Service

Merge WebKit at r72274: Fix CodeGeneratorV8.pm
authorRussell Brenner <russellbrenner@google.com>
Tue, 23 Nov 2010 00:58:26 +0000 (16:58 -0800)
committerRussell Brenner <russellbrenner@google.com>
Thu, 2 Dec 2010 21:47:21 +0000 (13:47 -0800)
Some of the script-generation code puts include statements in source files when
they need to be in headers.

Cherry-picked from webkit:
http://trac.webkit.org/changeset/72948

Change-Id: I07d425bcb97abcdda25b5ff2ea7af887a925f489

WebCore/WebCore.pri
WebCore/WebCore.pro
WebCore/bindings/scripts/CodeGeneratorV8.pm
WebCore/bindings/v8/ScriptControllerQt.cpp
WebCore/bindings/v8/V8GCController.cpp
WebCore/inspector/CodeGeneratorInspector.pm
WebCore/loader/ResourceLoadScheduler.cpp
WebCore/loader/cache/MemoryCache.cpp
WebCore/loader/loader.cpp

index ec213d6..e28af84 100644 (file)
@@ -171,6 +171,7 @@ IDL_BINDINGS += \
     fileapi/FileEntry.idl \
     fileapi/FileEntrySync.idl \
     fileapi/FileError.idl \
+    fileapi/FileException.idl \
     fileapi/FileList.idl \
     fileapi/FileReader.idl \
     fileapi/FileSystemCallback.idl \
index 3d0626a..dbabaa1 100644 (file)
@@ -2,15 +2,19 @@
 CONFIG += building-libs
 CONFIG += depend_includepath
 
-v8:exists($$[QT_INSTALL_PREFIX]/src/3rdparty/v8/include/v8.h) {
+V8_DIR = "$$[QT_INSTALL_PREFIX]/src/3rdparty/v8"
+
+v8:exists($${V8_DIR}/include/v8.h) {
     message(Using V8 with QtScript)
     QT += script
-    INCLUDEPATH += $$[QT_INSTALL_PREFIX]/src/3rdparty/v8/include
+    INCLUDEPATH += $${V8_DIR}/include
 
     DEFINES *= V8_BINDING=1
     DEFINES += WTF_CHANGES=1
     DEFINES *= WTF_USE_V8=1
     DEFINES += USING_V8_SHARED
+
+    linux-*:LIBS += -lv8
 }
 
 symbian: {
index 26c1dc7..6f39582 100644 (file)
@@ -1,4 +1,3 @@
-
 # Copyright (C) 2005, 2006 Nikolas Zimmermann <zimmermann@kde.org>
 # Copyright (C) 2006 Anders Carlsson <andersca@mac.com>
 # Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
@@ -39,6 +38,7 @@ my @implFixedHeader = ();
 my @implContent = ();
 my @implContentDecls = ();
 my %implIncludes = ();
+my %headerIncludes = ();
 
 my @allParents = ();
 
@@ -204,8 +204,11 @@ sub GetSVGPropertyTypes
         $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
     } elsif ($svgNativeType =~ /SVGTransformListPropertyTearOff/) {
         $svgListPropertyType = $svgWrappedNativeType;
-        $implIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
-        $implIncludes{"SVGTransformListPropertyTearOff.h"} = 1;
+        $headerIncludes{"SVGAnimatedListPropertyTearOff.h"} = 1;
+        $headerIncludes{"SVGTransformListPropertyTearOff.h"} = 1;
+    } elsif ($svgNativeType =~ /SVGPathSegListPropertyTearOff/) {
+        $svgListPropertyType = $svgWrappedNativeType;
+        $headerIncludes{"SVGPathSegListPropertyTearOff.h"} = 1;
     }
 
     if ($svgPropertyType) {
@@ -233,7 +236,6 @@ sub GenerateHeader
     # - Add default header template
     push(@headerContent, GenerateHeaderContentHeader($dataNode));
 
-    my %headerInclues = ();
     $headerIncludes{"wtf/text/StringHash.h"} = 1;
     $headerIncludes{"WrapperTypeInfo.h"} = 1;
     $headerIncludes{"V8DOMWrapper.h"} = 1;
@@ -249,7 +251,7 @@ sub GenerateHeader
 
     push(@headerContent, "#include <v8.h>\n");
     push(@headerContent, "#include <wtf/HashMap.h>\n");
-    
+
     push(@headerContent, "\nnamespace WebCore {\n");
     push(@headerContent, "\ntemplate<typename PropertyType> class SVGPropertyTearOff;\n") if $svgPropertyType;
     if ($svgNativeType) {
index 246921e..11bcb01 100644 (file)
@@ -40,7 +40,7 @@ QScriptEngine* ScriptController::qtScriptEngine()
         v8::Context::Scope scope(v8Context);
         if (v8Context.IsEmpty())
             return 0;
-        m_qtScriptEngine = new QScriptEngine(QScriptEngine::AdoptCurrentContext);
+        m_qtScriptEngine = new QScriptEngine;
      }
      return m_qtScriptEngine.get();
 }
index b26882b..3eeacec 100644 (file)
@@ -444,7 +444,7 @@ void V8GCController::gcEpilogue()
 
 void V8GCController::checkMemoryUsage()
 {
-#if PLATFORM(CHROMIUM)
+#if PLATFORM(CHROMIUM) || PLATFORM(QT) && !OS(SYMBIAN)
     // These values are appropriate for Chromium only.
     const int lowUsageMB = 256;  // If memory usage is below this threshold, do not bother forcing GC.
     const int highUsageMB = 1024;  // If memory usage is above this threshold, force GC more aggresively.
index f5f2453..550b5b4 100644 (file)
@@ -630,6 +630,7 @@ sub generateSource
     push(@sourceContent, "\n#include \"config.h\"");
     push(@sourceContent, "#include \"$className.h\"");
     push(@sourceContent, "#include <wtf/text/StringConcatenate.h>");
+    push(@sourceContent, "#include <wtf/text/CString.h>");
     push(@sourceContent, "");
     push(@sourceContent, "#if ENABLE(INSPECTOR)");
     push(@sourceContent, "");
index 80bea97..ca85ff4 100644 (file)
@@ -35,6 +35,7 @@
 #include "ResourceLoader.h"
 #include "ResourceRequest.h"
 #include "SubresourceLoader.h"
+#include <wtf/text/CString.h>
 
 #define REQUEST_MANAGEMENT_ENABLED 1
 
index 25af774..bd42e5f 100644 (file)
@@ -39,6 +39,7 @@
 #include "SecurityOrigin.h"
 #include <stdio.h>
 #include <wtf/CurrentTime.h>
+#include <wtf/text/CString.h>
 
 using namespace std;
 
index 1d32f82..e1313d6 100644 (file)
@@ -39,6 +39,7 @@
 #include "SharedBuffer.h"
 #include <wtf/Assertions.h>
 #include <wtf/Vector.h>
+#include <wtf/text/CString.h>
 
 namespace WebCore {