Title: [144563] trunk/Source/WebCore
Revision
144563
Author
[email protected]
Date
2013-03-03 00:52:17 -0800 (Sun, 03 Mar 2013)

Log Message

[V8] Remove TranslateParameter() from CodeGeneratorV8.pm
https://bugs.webkit.org/show_bug.cgi?id=111218

Reviewed by Adam Barth.

TranslateParameter() does nothing. It tries to convert TimeoutHandler to DOMString,
but there is no non-custom method that uses TimeoutHandler.

The only place where TimeoutHandler is used in the WebKit IDL is setTimeout() and setInterval().
However, the latest spec uses 'any' instead of TimeoutHandler.
http://dev.w3.org/html5/spec-LC/timers.html
Thus, this patch updates the IDL declarations of setTimeout() and setInterval()
according to the spec. By this change, TimeoutHandler is gone away from the WebKit IDL.
(Anyway this IDL change has no effect, because setTimeout() and setInterval() are written
in custom bindings.)

No tests. No change in behavior.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateParametersCheck):
* page/DOMWindow.idl:
* workers/WorkerContext.idl:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144562 => 144563)


--- trunk/Source/WebCore/ChangeLog	2013-03-03 08:46:03 UTC (rev 144562)
+++ trunk/Source/WebCore/ChangeLog	2013-03-03 08:52:17 UTC (rev 144563)
@@ -1,3 +1,28 @@
+2013-03-03  Kentaro Hara  <[email protected]>
+
+        [V8] Remove TranslateParameter() from CodeGeneratorV8.pm
+        https://bugs.webkit.org/show_bug.cgi?id=111218
+
+        Reviewed by Adam Barth.
+
+        TranslateParameter() does nothing. It tries to convert TimeoutHandler to DOMString,
+        but there is no non-custom method that uses TimeoutHandler.
+
+        The only place where TimeoutHandler is used in the WebKit IDL is setTimeout() and setInterval().
+        However, the latest spec uses 'any' instead of TimeoutHandler.
+        http://dev.w3.org/html5/spec-LC/timers.html
+        Thus, this patch updates the IDL declarations of setTimeout() and setInterval()
+        according to the spec. By this change, TimeoutHandler is gone away from the WebKit IDL.
+        (Anyway this IDL change has no effect, because setTimeout() and setInterval() are written
+        in custom bindings.)
+
+        No tests. No change in behavior.
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateParametersCheck):
+        * page/DOMWindow.idl:
+        * workers/WorkerContext.idl:
+
 2013-03-03  James Weatherall  <[email protected]>
 
         keydown and keyup events have zero keycode for some numeric pad keys under Chromium on Linux

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (144562 => 144563)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2013-03-03 08:46:03 UTC (rev 144562)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2013-03-03 08:52:17 UTC (rev 144563)
@@ -1762,7 +1762,6 @@
     my %replacements = ();
 
     foreach my $parameter (@{$function->parameters}) {
-        TranslateParameter($parameter);
         my $nativeType = GetNativeTypeFromSignature($parameter, $paramIndex);
 
         # Optional arguments with [Optional] should generate an early call with fewer arguments.
@@ -3935,16 +3934,6 @@
     return GetNativeType($type, 1);
 }
 
-sub TranslateParameter
-{
-    my $signature = shift;
-
-    # The IDL uses some pseudo-types which don't really exist.
-    if ($signature->type eq "TimeoutHandler") {
-        $signature->type("DOMString");
-    }
-}
-
 sub TypeCanFailConversion
 {
     my $signature = shift;

Modified: trunk/Source/WebCore/page/DOMWindow.idl (144562 => 144563)


--- trunk/Source/WebCore/page/DOMWindow.idl	2013-03-03 08:46:03 UTC (rev 144562)
+++ trunk/Source/WebCore/page/DOMWindow.idl	2013-03-03 08:52:17 UTC (rev 144563)
@@ -194,14 +194,9 @@
 #endif
 
     // Timers
-    [Custom] long setTimeout(in [Optional=DefaultIsUndefined] TimeoutHandler handler, 
-                             in [Optional=DefaultIsUndefined] long timeout);
-    // [Custom] long setTimeout(in TimeoutHandler handler, in long timeout, arguments...);
-    // [Custom] long setTimeout(in DOMString code, in long timeout);
+    [Custom] long setTimeout(in any handler, in [Optional=DefaultIsUndefined] long timeout);
     void clearTimeout(in [Optional=DefaultIsUndefined] long handle);
-    [Custom] long setInterval(in TimeoutHandler handler, in long timeout);
-    // [Custom] long setInterval(in TimeoutHandler handler, in long timeout, arguments...);
-    // [Custom] long setInterval(in DOMString code, in long timeout);
+    [Custom] long setInterval(in any handler, in [Optional=DefaultIsUndefined] long timeout);
     void clearInterval(in [Optional=DefaultIsUndefined] long handle);
 
 #if defined(ENABLE_REQUEST_ANIMATION_FRAME) && ENABLE_REQUEST_ANIMATION_FRAME

Modified: trunk/Source/WebCore/workers/WorkerContext.idl (144562 => 144563)


--- trunk/Source/WebCore/workers/WorkerContext.idl	2013-03-03 08:46:03 UTC (rev 144562)
+++ trunk/Source/WebCore/workers/WorkerContext.idl	2013-03-03 08:52:17 UTC (rev 144563)
@@ -51,11 +51,9 @@
              [Replaceable] readonly attribute WorkerNavigator navigator;
 
     // Timers
-    [Custom] long setTimeout(in TimeoutHandler handler, in long timeout);
-    // [Custom] long setTimeout(in DOMString code, in long timeout);
+    [Custom] long setTimeout(in any handler, in [Optional=DefaultIsUndefined] long timeout);
     void clearTimeout(in [Optional=DefaultIsUndefined] long handle);
-    [Custom] long setInterval(in TimeoutHandler handler, in long timeout);
-    // [Custom] long setInterval(in DOMString code, in long timeout);
+    [Custom] long setInterval(in any handler, in [Optional=DefaultIsUndefined] long timeout);
     void clearInterval(in [Optional=DefaultIsUndefined] long handle);
 
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to