Title: [97586] trunk/Source/WebCore
Revision
97586
Author
hara...@chromium.org
Date
2011-10-16 23:02:33 -0700 (Sun, 16 Oct 2011)

Log Message

Generate MessageChannel constructor by [Constructor] IDL
https://bugs.webkit.org/show_bug.cgi?id=70214

Reviewed by Adam Barth.

This patch generates an MessageChannel constructor for JSC by [Constructor] IDL,
but V8 is still using a custom constructor since the V8 constructor requires special logic.

Tests: fast/dom/global-constructors.html
       fast/events/message-port.html
       fast/events/message-port-no-wrapper.html
       fast/dom/Window/window-postmessage-args.html

* bindings/js/JSMessageChannelCustom.cpp: Removed the MessageChannel constructor.
* dom/MessageChannel.idl: Generates the MessageChannel constructor for JSC.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (97585 => 97586)


--- trunk/Source/WebCore/ChangeLog	2011-10-17 05:44:50 UTC (rev 97585)
+++ trunk/Source/WebCore/ChangeLog	2011-10-17 06:02:33 UTC (rev 97586)
@@ -1,3 +1,21 @@
+2011-10-16  Kentaro Hara  <hara...@chromium.org>
+
+        Generate MessageChannel constructor by [Constructor] IDL
+        https://bugs.webkit.org/show_bug.cgi?id=70214
+
+        Reviewed by Adam Barth.
+
+        This patch generates an MessageChannel constructor for JSC by [Constructor] IDL,
+        but V8 is still using a custom constructor since the V8 constructor requires special logic.
+
+        Tests: fast/dom/global-constructors.html
+               fast/events/message-port.html
+               fast/events/message-port-no-wrapper.html
+               fast/dom/Window/window-postmessage-args.html
+
+        * bindings/js/JSMessageChannelCustom.cpp: Removed the MessageChannel constructor.
+        * dom/MessageChannel.idl: Generates the MessageChannel constructor for JSC.
+
 2011-10-16  Ryosuke Niwa  <rn...@webkit.org>
 
         [Mac] fontForSelection and styleForSelectionStart should be moved to EditorMac

Modified: trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp (97585 => 97586)


--- trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp	2011-10-17 05:44:50 UTC (rev 97585)
+++ trunk/Source/WebCore/bindings/js/JSMessageChannelCustom.cpp	2011-10-17 06:02:33 UTC (rev 97586)
@@ -48,14 +48,4 @@
         visitor.addOpaqueRoot(port);
 }
 
-EncodedJSValue JSC_HOST_CALL JSMessageChannelConstructor::constructJSMessageChannel(ExecState* exec)
-{
-    JSMessageChannelConstructor* jsConstructor = static_cast<JSMessageChannelConstructor*>(exec->callee());
-    ScriptExecutionContext* context = jsConstructor->scriptExecutionContext();
-    if (!context)
-        return throwVMError(exec, createReferenceError(exec, "MessageChannel constructor associated document is unavailable"));
-
-    return JSValue::encode(asObject(toJS(exec, jsConstructor->globalObject(), MessageChannel::create(context))));
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/dom/MessageChannel.idl (97585 => 97586)


--- trunk/Source/WebCore/dom/MessageChannel.idl	2011-10-17 05:44:50 UTC (rev 97585)
+++ trunk/Source/WebCore/dom/MessageChannel.idl	2011-10-17 06:02:33 UTC (rev 97586)
@@ -28,7 +28,9 @@
 
     interface [
         CanBeConstructed,
-        CustomConstructor,
+        Constructor,
+        CallWith=ScriptExecutionContext,
+        V8CustomConstructor,
         CustomMarkFunction,
         NoStaticTables
     ] MessageChannel {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to