Title: [148505] trunk/Source/WebCore
Revision
148505
Author
m...@apple.com
Date
2013-04-16 02:29:37 -0700 (Tue, 16 Apr 2013)

Log Message

Remove more traces of the now-obsolete support for V8
https://bugs.webkit.org/show_bug.cgi?id=114657

Reviewed by Ryosuke Niwa.

In addition to passing existing tests, I verified that the ElementFactory
and ElementWrapperFactory files were all textually identical before and after.

* dom/CustomEvent.cpp:
(WebCore): Remove Use(V8) bock.
* dom/CustomEvent.h:
(CustomEvent): ditto
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent): ditto
(WebCore::MessageEvent::initMessageEvent): ditto
* dom/Node.h:
(Node): ditto
* dom/make_event_factory.pl:
(generateImplementation): Remove V8 support.
* dom/make_names.pl: Remove gobs of V8 support and simplify.
(printJSElementIncludes): 
(printConditionalElementIncludes):
(printFactoryCppFile):
(printWrapperFunctions):
(printWrapperFactoryCppFile):
(printWrapperFactoryHeaderFile):
* inspector/InjectedScriptCanvasModuleSource.js: Remove V8 stack
trace code.
* platform/qt/PlatformSupport.h: Remove a macro only used for V8 
bindings.
* svg/SVGZoomAndPan.h:
(SVGZoomAndPan): Remove mention of V8 from comment.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (148504 => 148505)


--- trunk/Source/WebCore/ChangeLog	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/ChangeLog	2013-04-16 09:29:37 UTC (rev 148505)
@@ -1,3 +1,38 @@
+2013-04-15  Maciej Stachowiak  <m...@apple.com>
+
+        Remove more traces of the now-obsolete support for V8
+        https://bugs.webkit.org/show_bug.cgi?id=114657
+
+        Reviewed by Ryosuke Niwa.
+
+        In addition to passing existing tests, I verified that the ElementFactory
+        and ElementWrapperFactory files were all textually identical before and after.
+
+        * dom/CustomEvent.cpp:
+        (WebCore): Remove Use(V8) bock.
+        * dom/CustomEvent.h:
+        (CustomEvent): ditto
+        * dom/MessageEvent.cpp:
+        (WebCore::MessageEvent::MessageEvent): ditto
+        (WebCore::MessageEvent::initMessageEvent): ditto
+        * dom/Node.h:
+        (Node): ditto
+        * dom/make_event_factory.pl:
+        (generateImplementation): Remove V8 support.
+        * dom/make_names.pl: Remove gobs of V8 support and simplify.
+        (printJSElementIncludes): 
+        (printConditionalElementIncludes):
+        (printFactoryCppFile):
+        (printWrapperFunctions):
+        (printWrapperFactoryCppFile):
+        (printWrapperFactoryHeaderFile):
+        * inspector/InjectedScriptCanvasModuleSource.js: Remove V8 stack
+        trace code.
+        * platform/qt/PlatformSupport.h: Remove a macro only used for V8 
+        bindings.
+        * svg/SVGZoomAndPan.h:
+        (SVGZoomAndPan): Remove mention of V8 from comment.
+
 2013-04-15  Ryosuke Niwa  <rn...@webkit.org>
 
         Potential use after free in ApplyStyleCommand::splitAncestorsWithUnicodeBidi

Modified: trunk/Source/WebCore/dom/CustomEvent.cpp (148504 => 148505)


--- trunk/Source/WebCore/dom/CustomEvent.cpp	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/dom/CustomEvent.cpp	2013-04-16 09:29:37 UTC (rev 148505)
@@ -59,19 +59,6 @@
     m_detail = detail;
 }
 
-#if USE(V8)
-void CustomEvent::initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> serializedScriptValue)
-{
-    ASSERT(m_detail.hasNoValue());
-    if (dispatched())
-        return;
-
-    initEvent(type, canBubble, cancelable);
-
-    m_serializedScriptValue = serializedScriptValue;
-}
-#endif // USE(V8)
-
 const AtomicString& CustomEvent::interfaceName() const
 {
     return eventNames().interfaceForCustomEvent;

Modified: trunk/Source/WebCore/dom/CustomEvent.h (148504 => 148505)


--- trunk/Source/WebCore/dom/CustomEvent.h	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/dom/CustomEvent.h	2013-04-16 09:29:37 UTC (rev 148505)
@@ -53,9 +53,6 @@
     }
 
     void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& detail);
-#if USE(V8)
-    void initCustomEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue>);
-#endif
 
     virtual const AtomicString& interfaceName() const;
 

Modified: trunk/Source/WebCore/dom/MessageEvent.cpp (148504 => 148505)


--- trunk/Source/WebCore/dom/MessageEvent.cpp	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/dom/MessageEvent.cpp	2013-04-16 09:29:37 UTC (rev 148505)
@@ -73,10 +73,6 @@
     , m_source(source)
     , m_ports(ports)
 {
-#if USE(V8)
-    if (m_dataAsSerializedScriptValue)
-        m_dataAsSerializedScriptValue->registerMemoryAllocatedWithCurrentScriptContext();
-#endif
 }
 
 MessageEvent::MessageEvent(const String& data, const String& origin)
@@ -138,11 +134,6 @@
     m_lastEventId = lastEventId;
     m_source = source;
     m_ports = ports;
-
-#if USE(V8)
-    if (m_dataAsSerializedScriptValue)
-        m_dataAsSerializedScriptValue->registerMemoryAllocatedWithCurrentScriptContext();
-#endif
 }
 
 // FIXME: Remove this when we have custom ObjC binding support.

Modified: trunk/Source/WebCore/dom/Node.h (148504 => 148505)


--- trunk/Source/WebCore/dom/Node.h	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/dom/Node.h	2013-04-16 09:29:37 UTC (rev 148505)
@@ -388,11 +388,6 @@
     bool hasEventTargetData() const { return getFlag(HasEventTargetDataFlag); }
     void setHasEventTargetData(bool flag) { setFlag(flag, HasEventTargetDataFlag); }
 
-#if USE(V8)
-    bool isV8CollectableDuringMinorGC() const { return getFlag(V8CollectableDuringMinorGCFlag); }
-    void setV8CollectableDuringMinorGC(bool flag) { setFlag(flag, V8CollectableDuringMinorGCFlag); }
-#endif
-
     enum ShouldSetAttached {
         SetAttached,
         DoNotSetAttached
@@ -728,9 +723,6 @@
         HasCustomStyleCallbacksFlag = 1 << 21,
         HasScopedHTMLStyleChildFlag = 1 << 22,
         HasEventTargetDataFlag = 1 << 23,
-#if USE(V8)
-        V8CollectableDuringMinorGCFlag = 1 << 24,
-#endif
         NeedsShadowTreeWalkerFlag = 1 << 25,
         IsInShadowTreeFlag = 1 << 26,
 

Modified: trunk/Source/WebCore/dom/make_event_factory.pl (148504 => 148505)


--- trunk/Source/WebCore/dom/make_event_factory.pl	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/dom/make_event_factory.pl	2013-04-16 09:29:37 UTC (rev 148505)
@@ -86,9 +86,6 @@
     print F "#include \"${namespace}Factory.h\"\n";
     print F "\n";
     print F "#include \"${namespace}Headers.h\"\n";
-    print F "#if USE(V8)\n";
-    print F "#include \"RuntimeEnabledFeatures.h\"\n";
-    print F "#endif\n";
     print F "\n";
     print F "namespace WebCore {\n";
     print F "\n";
@@ -101,16 +98,9 @@
         my $interfaceName = $InCompiler->interfaceForItem($eventName);
 
         print F "#if ENABLE($conditional)\n" if $conditional;
-        if ($runtimeConditional) {
-            print F "    #if USE(V8)\n";
-            print F "    // FIXME: JSC should support RuntimeEnabledFeatures as well.\n";
-            print F "    if (type == \"$eventName\" && RuntimeEnabledFeatures::$runtimeConditional())\n";
-            print F "        return ${interfaceName}::create();\n";
-            print F "    #else\n";
-        }
+        # FIXEME JSC should support RuntimeEnabledFeatures
         print F "    if (type == \"$eventName\")\n";
         print F "        return ${interfaceName}::create();\n";
-        print F "#endif // USE(V8)\n" if $runtimeConditional;
         print F "#endif\n" if $conditional;
     }
 

Modified: trunk/Source/WebCore/dom/make_names.pl (148504 => 148505)


--- trunk/Source/WebCore/dom/make_names.pl	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/dom/make_names.pl	2013-04-16 09:29:37 UTC (rev 148505)
@@ -44,7 +44,6 @@
 
 my $printFactory = 0; 
 my $printWrapperFactory = 0; 
-my $printWrapperFactoryV8 = 0; 
 my $fontNamesIn = "";
 my $tagsFile = "";
 my $attrsFile = "";
@@ -81,7 +80,6 @@
     'extraDefines=s' => \$extraDefines,
     'preprocessor=s' => \$preprocessor,
     'wrapperFactory' => \$printWrapperFactory,
-    'wrapperFactoryV8' => \$printWrapperFactoryV8,
     'fonts=s' => \$fontNamesIn
 );
 
@@ -168,19 +166,11 @@
     printFactoryHeaderFile("$factoryBasePath.h");
 }
 
-die "You cannot specify both --wrapperFactory and --wrapperFactoryV8" if $printWrapperFactory && $printWrapperFactoryV8;
-my $wrapperFactoryType = "";
 if ($printWrapperFactory) {
-    $wrapperFactoryType = "JS";
-} elsif ($printWrapperFactoryV8) {
-    $wrapperFactoryType = "V8";
+    printWrapperFactoryCppFile($outputDir, $wrapperFactoryFileName);
+    printWrapperFactoryHeaderFile($outputDir, $wrapperFactoryFileName);
 }
 
-if ($wrapperFactoryType) {
-    printWrapperFactoryCppFile($outputDir, $wrapperFactoryType, $wrapperFactoryFileName);
-    printWrapperFactoryHeaderFile($outputDir, $wrapperFactoryType, $wrapperFactoryFileName);
-}
-
 ### Hash initialization
 
 sub defaultTagPropertyHash
@@ -728,7 +718,6 @@
 sub printJSElementIncludes
 {
     my $F = shift;
-    my $wrapperFactoryType = shift;
 
     my %tagsSeen;
     for my $tagName (sort keys %enabledTags) {
@@ -740,9 +729,9 @@
         }
         $tagsSeen{$JSInterfaceName} = 1;
 
-        print F "#include \"${wrapperFactoryType}${JSInterfaceName}.h\"\n";
+        print F "#include \"JS${JSInterfaceName}.h\"\n";
     }
-    print F "#include \"${wrapperFactoryType}$parameters{fallbackInterfaceName}.h\"\n";
+    print F "#include \"JS$parameters{fallbackInterfaceName}.h\"\n";
 }
 
 sub printElementIncludes
@@ -766,7 +755,7 @@
 
 sub printConditionalElementIncludes
 {
-    my ($F, $wrapperFactoryType) = @_;
+    my ($F, $wrapperIncludes) = @_;
 
     my %conditionals;
     my %unconditionalElementIncludes;
@@ -792,10 +781,10 @@
             next if $unconditionalElementIncludes{$interfaceName};
             print F "#include \"$interfaceName.h\"\n";
         }
-        if ($wrapperFactoryType) {
+        if ($wrapperIncludes) {
             for my $JSInterfaceName (sort keys %{$conditionals{$conditional}{JSInterfaceNames}}) {
                 next if $unconditionalJSElementIncludes{$JSInterfaceName};
-                print F "#include \"$wrapperFactoryType$JSInterfaceName.h\"\n";
+                print F "#include \"JS$JSInterfaceName.h\"\n";
             }
         }
         print F "#endif\n";
@@ -849,7 +838,7 @@
 
 print F "\n#include <wtf/HashMap.h>\n";
 
-printConditionalElementIncludes($F);
+printConditionalElementIncludes($F, 0);
 
 print F <<END
 
@@ -1039,7 +1028,6 @@
 sub printWrapperFunctions
 {
     my $F = shift;
-    my $wrapperFactoryType = shift;
 
     my %tagsSeen;
     for my $tagName (sort keys %enabledTags) {
@@ -1054,11 +1042,10 @@
             print F "#if ${conditionalString}\n\n";
         }
 
-        if ($wrapperFactoryType eq "JS") {
-            # Hack for the media tags
-            # FIXME: This should have been done via a CustomWrapper attribute and a separate *Custom file.
-            if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) {
-                print F <<END
+        # Hack for the media tags
+        # FIXME: This should have been done via a CustomWrapper attribute and a separate *Custom file.
+        if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) {
+            print F <<END
 static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
 {
     Settings* settings = element->document()->settings();
@@ -1068,10 +1055,10 @@
 }
 
 END
-;
-            } elsif ($enabledTags{$tagName}{contextConditional}) {
-                my $contextConditional = $enabledTags{$tagName}{contextConditional};
-                print F <<END
+    ;
+        } elsif ($enabledTags{$tagName}{contextConditional}) {
+            my $contextConditional = $enabledTags{$tagName}{contextConditional};
+            print F <<END
 static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
 {
     if (!ContextFeatures::${contextConditional}Enabled(element->document())) {
@@ -1082,10 +1069,10 @@
     return CREATE_DOM_WRAPPER(exec, globalObject, ${JSInterfaceName}, element.get());
 }
 END
-;
-            } elsif ($enabledTags{$tagName}{runtimeConditional}) {
-                my $runtimeConditional = $enabledTags{$tagName}{runtimeConditional};
-                print F <<END
+    ;
+        } elsif ($enabledTags{$tagName}{runtimeConditional}) {
+            my $runtimeConditional = $enabledTags{$tagName}{runtimeConditional};
+            print F <<END
 static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
 {
     if (!RuntimeEnabledFeatures::${runtimeConditional}Enabled()) {
@@ -1096,73 +1083,16 @@
     return CREATE_DOM_WRAPPER(exec, globalObject, ${JSInterfaceName}, element.get());
 }
 END
-;
-            } else {
-                print F <<END
+    ;
+        } else {
+            print F <<END
 static JSDOMWrapper* create${JSInterfaceName}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
 {
     return CREATE_DOM_WRAPPER(exec, globalObject, ${JSInterfaceName}, element.get());
 }
 
 END
-;
-            }
-        } elsif ($wrapperFactoryType eq "V8") {
-            if ($enabledTags{$tagName}{wrapperOnlyIfMediaIsAvailable}) {
-                print F <<END
-static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
-    Settings* settings = element->document()->settings();
-    if (!MediaPlayer::isAvailable() || (settings && !settings->mediaEnabled()))
-        return createV8$parameters{namespace}DirectWrapper(element, creationContext, isolate);
-    return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isolate);
-}
-
-END
-;
-            } elsif ($enabledTags{$tagName}{contextConditional}) {
-                my $contextConditional = $enabledTags{$tagName}{contextConditional};
-                print F <<END
-static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
-    if (!ContextFeatures::${contextConditional}Enabled(element->document()))
-        return createV8$parameters{namespace}FallbackWrapper(to$parameters{fallbackInterfaceName}(element), creationContext, isolate);
-    return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isolate);
-}
-END
-;
-            } elsif ($enabledTags{$tagName}{runtimeConditional}) {
-                my $runtimeConditional = $enabledTags{$tagName}{runtimeConditional};
-                print F <<END
-static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
-    if (!RuntimeEnabledFeatures::${runtimeConditional}Enabled())
-        return createV8$parameters{namespace}FallbackWrapper(to$parameters{fallbackInterfaceName}(element), creationContext, isolate);
-    return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isolate);
-}
-END
-;
-            } elsif (${JSInterfaceName} eq "HTMLElement") {
-                print F <<END
-static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
-    ASSERT_NOT_REACHED();
-    return v8::Handle<v8::Object>();
-}
-
-END
-;
-             } else {
-            print F <<END
-static v8::Handle<v8::Object> create${JSInterfaceName}Wrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
-    return wrap(static_cast<${JSInterfaceName}*>(element), creationContext, isolate);
-}
-
-
-END
-;
-            }
+    ;
         }
 
         if ($conditional) {
@@ -1174,19 +1104,18 @@
 sub printWrapperFactoryCppFile
 {
     my $outputDir = shift;
-    my $wrapperFactoryType = shift;
     my $wrapperFactoryFileName = shift;
     my $F;
-    open F, ">" . $outputDir . "/" . $wrapperFactoryType . $wrapperFactoryFileName . ".cpp";
+    open F, ">" . $outputDir . "/JS" . $wrapperFactoryFileName . ".cpp";
 
     printLicenseHeader($F);
 
     print F "#include \"config.h\"\n";
-    print F "#include \"$wrapperFactoryType$parameters{namespace}ElementWrapperFactory.h\"\n";
+    print F "#include \"JS$parameters{namespace}ElementWrapperFactory.h\"\n";
 
     print F "\n#if $parameters{guardFactoryWith}\n\n" if $parameters{guardFactoryWith};
 
-    printJSElementIncludes($F, $wrapperFactoryType);
+    printJSElementIncludes($F);
 
     print F "\n#include \"$parameters{namespace}Names.h\"\n\n";
 
@@ -1194,7 +1123,7 @@
 
     print F "\n#include <wtf/StdLibExtras.h>\n";
 
-    printConditionalElementIncludes($F, $wrapperFactoryType);
+    printConditionalElementIncludes($F, 1);
 
     print F <<END
 
@@ -1209,24 +1138,11 @@
 END
 ;
 
-    if ($wrapperFactoryType eq "JS") {    
-        print F <<END
+    print F <<END
 using namespace JSC;
 END
 ;
-    } elsif ($wrapperFactoryType eq "V8") {
-        print F <<END
-#include "V8$parameters{namespace}Element.h"
 
-#if ENABLE(CUSTOM_ELEMENTS)
-#include "CustomElementHelpers.h"
-#endif
-
-#include <v8.h>
-END
-;
-    }
-
     print F <<END
 
 namespace WebCore {
@@ -1235,24 +1151,15 @@
 
 END
 ;
-    if ($wrapperFactoryType eq "JS") {
-        print F <<END
+print F <<END
 typedef JSDOMWrapper* (*Create$parameters{namespace}ElementWrapperFunction)(ExecState*, JSDOMGlobalObject*, PassRefPtr<$parameters{namespace}Element>);
 
 END
 ;
-    } elsif ($wrapperFactoryType eq "V8") {
-        print F <<END
-typedef v8::Handle<v8::Object> (*Create$parameters{namespace}ElementWrapperFunction)($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
 
-END
-;
-    }
+    printWrapperFunctions($F);
 
-    printWrapperFunctions($F, $wrapperFactoryType);
-
-    if ($wrapperFactoryType eq "JS") {
-        print F <<END
+print F <<END
 JSDOMWrapper* createJS$parameters{namespace}Wrapper(ExecState* exec, JSDOMGlobalObject* globalObject, PassRefPtr<$parameters{namespace}Element> element)
 {
     typedef HashMap<WTF::AtomicStringImpl*, Create$parameters{namespace}ElementWrapperFunction> FunctionMap;
@@ -1260,16 +1167,6 @@
     if (map.isEmpty()) {
 END
 ;
-    } elsif ($wrapperFactoryType eq "V8") {
-        print F <<END
-v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-{
-    typedef HashMap<WTF::AtomicStringImpl*, Create$parameters{namespace}ElementWrapperFunction> FunctionMap;
-    DEFINE_STATIC_LOCAL(FunctionMap, map, ());
-    if (map.isEmpty()) {
-END
-;
-    }
 
     for my $tag (sort keys %enabledTags) {
         # Do not add the name to the map if it does not have a JS wrapper constructor or uses the default wrapper.
@@ -1293,98 +1190,22 @@
     }
 END
 ;
-    if ($wrapperFactoryType eq "V8") {
-        print F <<END
-#if ENABLE(CUSTOM_ELEMENTS)
-    if (PassRefPtr<CustomElementConstructor> constructor = CustomElementHelpers::constructorOf(element))
-        return CustomElementHelpers::wrap(element, creationContext, constructor, isolate);
-#endif
-END
-;
-    }
 
     print F <<END
     Create$parameters{namespace}ElementWrapperFunction createWrapperFunction = map.get(element->localName().impl());
     if (createWrapperFunction)
 END
 ;
-    if ($wrapperFactoryType eq "JS") {
-        print F <<END
+    print F <<END
         return createWrapperFunction(exec, globalObject, element);
     return CREATE_DOM_WRAPPER(exec, globalObject, $parameters{fallbackInterfaceName}, element.get());
 END
 ;
-    } elsif ($wrapperFactoryType eq "V8") {
-        print F <<END
-    {
-END
-;
-        if ($parameters{namespace} eq "HTML") {
-            print F <<END
-        if (createWrapperFunction == createHTMLElementWrapper)
-           return V8HTMLElement::createWrapper(element, creationContext, isolate);
-END
-        }
-        print F <<END
-        return createWrapperFunction(element, creationContext, isolate);
-    }
-END
-;
-        if ($parameters{namespace} eq "SVG") {
-            print F <<END
-    return V8SVGElement::createWrapper(element, creationContext, isolate);
-END
-;
-        } else {
-            print F <<END
-    return wrap(to$parameters{fallbackInterfaceName}(element), creationContext, isolate);
-END
-;
-        }
-    }
     print F <<END
 }
 END
 ;
 
-    if ($wrapperFactoryType eq "V8") {
-        print F <<END
-
-const QualifiedName* find$parameters{namespace}TagNameOfV8Type(const WrapperTypeInfo* type)
-{
-    typedef HashMap<const WrapperTypeInfo*, const QualifiedName*> TypeNameMap;
-    DEFINE_STATIC_LOCAL(TypeNameMap, map, ());
-    if (map.isEmpty()) {
-END
-;
-
-        for my $tagName (sort keys %enabledTags) {
-            if (!usesDefaultJSWrapper($tagName)) {
-                my $conditional = $enabledTags{$tagName}{conditional};
-                if ($conditional) {
-                    my $conditionalString = "ENABLE(" . join(") && ENABLE(", split(/&/, $conditional)) . ")";
-                    print F "#if ${conditionalString}\n";
-                }
-
-                my $JSInterfaceName = $enabledTags{$tagName}{JSInterfaceName};
-                print F "       map.set(WrapperTypeTraits<${JSInterfaceName}>::info(), &${tagName}Tag);\n";
-
-                if ($conditional) {
-                    print F "#endif\n";
-                }
-            }
-        }
-
-        print F <<END
-    }
-
-    return map.get(type);
-}
-
-END
-;
-    }
-
     print F "}\n\n";
     print F "#endif\n" if $parameters{guardFactoryWith};
 
@@ -1394,20 +1215,18 @@
 sub printWrapperFactoryHeaderFile
 {
     my $outputDir = shift;
-    my $wrapperFactoryType = shift;
     my $wrapperFactoryFileName = shift;
     my $F;
-    open F, ">" . $outputDir . "/" . $wrapperFactoryType . $wrapperFactoryFileName . ".h";
+    open F, ">" . $outputDir . "/JS" . $wrapperFactoryFileName . ".h";
 
     printLicenseHeader($F);
 
-    print F "#ifndef $wrapperFactoryType$parameters{namespace}ElementWrapperFactory_h\n";
-    print F "#define $wrapperFactoryType$parameters{namespace}ElementWrapperFactory_h\n\n";
+    print F "#ifndef JS$parameters{namespace}ElementWrapperFactory_h\n";
+    print F "#define JS$parameters{namespace}ElementWrapperFactory_h\n\n";
 
     print F "#if $parameters{guardFactoryWith}\n" if $parameters{guardFactoryWith};
 
-    if ($wrapperFactoryType eq "JS") {
-        print F <<END
+    print F <<END
 #include <wtf/Forward.h>
 
 namespace JSC {
@@ -1425,35 +1244,11 @@
 }
  
 END
-;
-    } elsif ($wrapperFactoryType eq "V8") {
-        print F <<END
-#include <V8$parameters{namespace}Element.h>
-#include <V8$parameters{fallbackInterfaceName}.h>
-#include <v8.h>
+    ;
 
-namespace WebCore {
-
-    class $parameters{namespace}Element;
-
-    const QualifiedName* find$parameters{namespace}TagNameOfV8Type(const WrapperTypeInfo*);
-    v8::Handle<v8::Object> createV8$parameters{namespace}Wrapper($parameters{namespace}Element*, v8::Handle<v8::Object> creationContext, v8::Isolate*);
-    inline v8::Handle<v8::Object> createV8$parameters{namespace}DirectWrapper($parameters{namespace}Element* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-    {
-        return V8$parameters{namespace}Element::createWrapper(element, creationContext, isolate);
-    }
-    inline v8::Handle<v8::Object> createV8$parameters{namespace}FallbackWrapper($parameters{fallbackInterfaceName}* element, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
-    {
-        return V8$parameters{fallbackInterfaceName}::createWrapper(element, creationContext, isolate);
-    }
-}
-END
-;
-    }
-
     print F "#endif // $parameters{guardFactoryWith}\n\n" if $parameters{guardFactoryWith};
 
-    print F "#endif // $wrapperFactoryType$parameters{namespace}ElementWrapperFactory_h\n";
+    print F "#endif // JS$parameters{namespace}ElementWrapperFactory_h\n";
 
     close F;
 }

Modified: trunk/Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js (148504 => 148505)


--- trunk/Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/inspector/InjectedScriptCanvasModuleSource.js	2013-04-16 09:29:37 UTC (rev 148505)
@@ -206,69 +206,13 @@
  */
 StackTrace.create = function(stackTraceLimit, topMostFunctionToIgnore)
 {
-    if (typeof Error.captureStackTrace === "function")
-        return new StackTraceV8(stackTraceLimit, topMostFunctionToIgnore || arguments.callee);
     // FIXME: Support JSC, and maybe other browsers.
     return null;
 }
 
 /**
  * @constructor
- * @implements {StackTrace}
- * @param {number=} stackTraceLimit
- * @param {Function=} topMostFunctionToIgnore
- * @see http://code.google.com/p/v8/wiki/_javascript_StackTraceApi
  */
-function StackTraceV8(stackTraceLimit, topMostFunctionToIgnore)
-{
-    StackTrace.call(this);
-
-    var oldPrepareStackTrace = Error.prepareStackTrace;
-    var oldStackTraceLimit = Error.stackTraceLimit;
-    if (typeof stackTraceLimit === "number")
-        Error.stackTraceLimit = stackTraceLimit;
-
-    /**
-     * @param {Object} error
-     * @param {Array.<CallSite>} structuredStackTrace
-     * @return {Array.<{sourceURL: string, lineNumber: number, columnNumber: number}>}
-     */
-    Error.prepareStackTrace = function(error, structuredStackTrace)
-    {
-        return structuredStackTrace.map(function(callSite) {
-            return {
-                sourceURL: callSite.getFileName(),
-                lineNumber: callSite.getLineNumber(),
-                columnNumber: callSite.getColumnNumber()
-            };
-        });
-    }
-
-    var holder = /** @type {{stack: Array.<{sourceURL: string, lineNumber: number, columnNumber: number}>}} */ ({});
-    Error.captureStackTrace(holder, topMostFunctionToIgnore || arguments.callee);
-    this._stackTrace = holder.stack;
-
-    Error.stackTraceLimit = oldStackTraceLimit;
-    Error.prepareStackTrace = oldPrepareStackTrace;
-}
-
-StackTraceV8.prototype = {
-    /**
-     * @override
-     * @param {number} index
-     * @return {{sourceURL: string, lineNumber: number, columnNumber: number}|undefined}
-     */
-    callFrame: function(index)
-    {
-        return this._stackTrace[index];
-    },
-
-    __proto__: StackTrace.prototype
-}
-
-/**
- * @constructor
- */
 function Cache()
 {
     this.reset();
@@ -2274,7 +2218,6 @@
     "textAlign",
     "textBaseline",
     "lineDashOffset",
-    // FIXME: Temporary properties implemented in JSC, but not in V8.
     "webkitLineDash",
     "webkitLineDashOffset"
 ];

Modified: trunk/Source/WebCore/platform/qt/PlatformSupport.h (148504 => 148505)


--- trunk/Source/WebCore/platform/qt/PlatformSupport.h	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/platform/qt/PlatformSupport.h	2013-04-16 09:29:37 UTC (rev 148505)
@@ -31,51 +31,6 @@
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
 
-// V8 bindings use the ARRAYSIZE_UNSAFE macro. This macro was copied
-// from http://src.chromium.org/viewvc/chrome/trunk/src/base/basictypes.h
-//
-// ARRAYSIZE_UNSAFE performs essentially the same calculation as arraysize,
-// but can be used on anonymous types or types defined inside
-// functions. It's less safe than arraysize as it accepts some
-// (although not all) pointers. Therefore, you should use arraysize
-// whenever possible.
-//
-// The _expression_ ARRAYSIZE_UNSAFE(a) is a compile-time constant of type
-// size_t.
-//
-// ARRAYSIZE_UNSAFE catches a few type errors. If you see a compiler error
-//
-//   "warning: division by zero in ..."
-//
-// when using ARRAYSIZE_UNSAFE, you are (wrongfully) giving it a pointer.
-// You should only use ARRAYSIZE_UNSAFE on statically allocated arrays.
-//
-// The following comments are on the implementation details, and can
-// be ignored by the users.
-//
-// ARRAYSIZE_UNSAFE(arr) works by inspecting sizeof(arr) (the # of bytes in
-// the array) and sizeof(*(arr)) (the # of bytes in one array
-// element). If the former is divisible by the latter, perhaps arr is
-// indeed an array, in which case the division result is the # of
-// elements in the array. Otherwise, arr cannot possibly be an array,
-// and we generate a compiler error to prevent the code from
-// compiling.
-//
-// Since the size of bool is implementation-defined, we need to cast
-// !(sizeof(a) & sizeof(*(a))) to size_t in order to ensure the final
-// result has type size_t.
-//
-// This macro is not perfect as it wrongfully accepts certain
-// pointers, namely where the pointer size is divisible by the pointee
-// size. Since all our code has to go through a 32-bit compiler,
-// where a pointer is 4 bytes, this means all pointers to a type whose
-// size is 3 or greater than 4 will be (righteously) rejected.
-
-#define ARRAYSIZE_UNSAFE(a) \
-  ((sizeof(a) / sizeof(*(a))) / \
-   static_cast<size_t>(!(sizeof(a) % sizeof(*(a)))))
-
-
 typedef struct NPObject NPObject;
 typedef struct _NPP NPP_t;
 typedef NPP_t* NPP;

Modified: trunk/Source/WebCore/svg/SVGZoomAndPan.h (148504 => 148505)


--- trunk/Source/WebCore/svg/SVGZoomAndPan.h	2013-04-16 09:26:10 UTC (rev 148504)
+++ trunk/Source/WebCore/svg/SVGZoomAndPan.h	2013-04-16 09:29:37 UTC (rev 148505)
@@ -77,7 +77,7 @@
 
     SVGZoomAndPanType zoomAndPan() const { return SVGZoomAndPanUnknown; }
 
-    // These methods only exist to allow us to compile V8/JSSVGZoomAndPan.*.
+    // These methods only exist to allow us to compile JSSVGZoomAndPan.*.
     // These are never called, and thus ASSERT_NOT_REACHED.
     void ref();
     void deref();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to