From 47852ff9ccd90ffa4366e306a8bed1d2dd4eeca9 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 5 Jan 2011 15:06:26 +0000 Subject: [PATCH] Merge WebKit at r72805: Cherry-pick WebKit change 72948 This fixes CodeGeneratorV8.pm It is a re-commit of 'Merge WebKit at r72274: Fix CodeGeneratorV8.pm', which was inadvertantly removed as part of the initial merge by Git to r72805. See http://trac.webkit.org/changeset/72948 Note that this is a backwards merge from Chromium release 9.0.600.0 to 9.0.597.0, to align with the Chromium 9 stable release branch. Change-Id: Iaa56a5a503aaaf4d996ebc44d66d557d12838cfa --- WebCore/WebCore.pri | 1 + WebCore/WebCore.pro | 8 ++++++-- WebCore/bindings/scripts/CodeGeneratorV8.pm | 12 +++++++----- WebCore/bindings/v8/ScriptControllerQt.cpp | 2 +- WebCore/bindings/v8/V8GCController.cpp | 2 +- WebCore/inspector/CodeGeneratorInspector.pm | 1 + WebCore/loader/ResourceLoadScheduler.cpp | 1 + WebCore/loader/cache/MemoryCache.cpp | 1 + WebCore/loader/loader.cpp | 1 + 9 files changed, 20 insertions(+), 9 deletions(-) diff --git a/WebCore/WebCore.pri b/WebCore/WebCore.pri index 5043188c5..adcf3dd16 100644 --- a/WebCore/WebCore.pri +++ b/WebCore/WebCore.pri @@ -172,6 +172,7 @@ IDL_BINDINGS += \ fileapi/FileEntry.idl \ fileapi/FileEntrySync.idl \ fileapi/FileError.idl \ + fileapi/FileException.idl \ fileapi/FileList.idl \ fileapi/FileReader.idl \ fileapi/FileSystemCallback.idl \ diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro index 54207b795..560e2be27 100644 --- a/WebCore/WebCore.pro +++ b/WebCore/WebCore.pro @@ -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: { diff --git a/WebCore/bindings/scripts/CodeGeneratorV8.pm b/WebCore/bindings/scripts/CodeGeneratorV8.pm index 922da15fe..5e6cffec0 100644 --- a/WebCore/bindings/scripts/CodeGeneratorV8.pm +++ b/WebCore/bindings/scripts/CodeGeneratorV8.pm @@ -1,4 +1,3 @@ - # Copyright (C) 2005, 2006 Nikolas Zimmermann # Copyright (C) 2006 Anders Carlsson # Copyright (C) 2006 Samuel Weinig @@ -40,6 +39,7 @@ my @implFixedHeader = (); my @implContent = (); my @implContentDecls = (); my %implIncludes = (); +my %headerIncludes = (); my @allParents = (); @@ -205,8 +205,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) { @@ -234,7 +237,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; @@ -250,7 +252,7 @@ sub GenerateHeader push(@headerContent, "#include \n"); push(@headerContent, "#include \n"); - + push(@headerContent, "\nnamespace WebCore {\n"); push(@headerContent, "\ntemplate class SVGPropertyTearOff;\n") if $svgPropertyType; if ($svgNativeType) { diff --git a/WebCore/bindings/v8/ScriptControllerQt.cpp b/WebCore/bindings/v8/ScriptControllerQt.cpp index 246921e4b..11bcb018e 100644 --- a/WebCore/bindings/v8/ScriptControllerQt.cpp +++ b/WebCore/bindings/v8/ScriptControllerQt.cpp @@ -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(); } diff --git a/WebCore/bindings/v8/V8GCController.cpp b/WebCore/bindings/v8/V8GCController.cpp index b26882b8d..3eeacec60 100644 --- a/WebCore/bindings/v8/V8GCController.cpp +++ b/WebCore/bindings/v8/V8GCController.cpp @@ -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. diff --git a/WebCore/inspector/CodeGeneratorInspector.pm b/WebCore/inspector/CodeGeneratorInspector.pm index 8a3654d3c..177ca3b1c 100644 --- a/WebCore/inspector/CodeGeneratorInspector.pm +++ b/WebCore/inspector/CodeGeneratorInspector.pm @@ -669,6 +669,7 @@ sub generateSource push(@sourceContent, "\n#include \"config.h\""); push(@sourceContent, "#include \"$className.h\""); push(@sourceContent, "#include "); + push(@sourceContent, "#include "); push(@sourceContent, ""); push(@sourceContent, "#if ENABLE(INSPECTOR)"); push(@sourceContent, ""); diff --git a/WebCore/loader/ResourceLoadScheduler.cpp b/WebCore/loader/ResourceLoadScheduler.cpp index 65d766bef..7c50dc1ad 100644 --- a/WebCore/loader/ResourceLoadScheduler.cpp +++ b/WebCore/loader/ResourceLoadScheduler.cpp @@ -35,6 +35,7 @@ #include "ResourceLoader.h" #include "ResourceRequest.h" #include "SubresourceLoader.h" +#include #define REQUEST_MANAGEMENT_ENABLED 1 diff --git a/WebCore/loader/cache/MemoryCache.cpp b/WebCore/loader/cache/MemoryCache.cpp index 79dfc03ca..fc6682a47 100644 --- a/WebCore/loader/cache/MemoryCache.cpp +++ b/WebCore/loader/cache/MemoryCache.cpp @@ -39,6 +39,7 @@ #include "SecurityOrigin.h" #include #include +#include using namespace std; diff --git a/WebCore/loader/loader.cpp b/WebCore/loader/loader.cpp index af4d7c731..1f2ced3cb 100644 --- a/WebCore/loader/loader.cpp +++ b/WebCore/loader/loader.cpp @@ -39,6 +39,7 @@ #include "SharedBuffer.h" #include #include +#include namespace WebCore { -- 2.11.0