WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-78489-20120213230003.patch (text/plain), 18.07 KB, created by
Kentaro Hara
on 2012-02-13 06:00:04 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kentaro Hara
Created:
2012-02-13 06:00:04 PST
Size:
18.07 KB
patch
obsolete
>Subversion Revision: 107562 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 4cc7e6241cbee405e9691d6b92819ecf79add0e7..cf5dc56818dd06bbc5e83a46a653b08a287c8bc3 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,49 @@ >+2012-02-13 Kentaro Hara <haraken@chromium.org> >+ >+ Add [CustomToJSObject] to interfaces which have custom toJS() and toV8() >+ https://bugs.webkit.org/show_bug.cgi?id=78489 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ This is the final step to remove hard-coding from HasCustomToV8Implementation() >+ in CodeGeneratorV8.pm. This patch replaces [JSCustomToJS] with [CustomToJSObject] >+ for interfaces which have custom toJS() and custom toV8(). >+ >+ No tests. No change in behavior. >+ >+ * bindings/scripts/CodeGeneratorJS.pm: >+ (GenerateHeader): >+ (GenerateImplementation): >+ * bindings/scripts/CodeGeneratorV8.pm: >+ (GenerateHeader): >+ >+ * bindings/scripts/test/TestTypedArray.idl: >+ * css/CSSRule.idl: >+ * css/CSSValue.idl: >+ * css/StyleSheet.idl: >+ * dom/Document.idl: >+ * dom/Event.idl: >+ * dom/Node.idl: >+ * fileapi/Blob.idl: >+ * fileapi/Entry.idl: >+ * fileapi/EntrySync.idl: >+ * html/HTMLCollection.idl: >+ * html/ImageData.idl: >+ * html/canvas/ArrayBufferView.idl: >+ * html/canvas/DataView.idl: >+ * html/canvas/Float32Array.idl: >+ * html/canvas/Float64Array.idl: >+ * html/canvas/Int16Array.idl: >+ * html/canvas/Int32Array.idl: >+ * html/canvas/Int8Array.idl: >+ * html/canvas/Uint16Array.idl: >+ * html/canvas/Uint32Array.idl: >+ * html/canvas/Uint8Array.idl: >+ * html/canvas/Uint8ClampedArray.idl: >+ * storage/IDBAny.idl: >+ * storage/IDBKey.idl: >+ * svg/SVGPathSeg.idl: >+ > 2012-02-06 Raphael Kubo da Costa <kubo@profusion.mobi> > > [EFL] Drop support for the Curl network backend. >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >index 3d819c1f1e9a2d8039bc9928e20aa2e4e588712d..3786b9e75f3c8c55d17d4a180a2f0eae5e6c2784 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm >@@ -1003,7 +1003,7 @@ sub GenerateHeader > push(@headerContent, "\n"); > } > >- if (!$hasParent || $dataNode->extendedAttributes->{"JSGenerateToJS"} || ($dataNode->extendedAttributes->{"JSCustomToJS"} || $dataNode->extendedAttributes->{"JSCustomToJSObject"})) { >+ if (!$hasParent || $dataNode->extendedAttributes->{"JSGenerateToJS"} || ($dataNode->extendedAttributes->{"CustomToJSObject"} || $dataNode->extendedAttributes->{"JSCustomToJSObject"})) { > push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n"); > } > if (!$hasParent || $dataNode->extendedAttributes->{"JSGenerateToNativeObject"}) { >@@ -2310,7 +2310,7 @@ sub GenerateImplementation > push(@implContent, "}\n\n"); > } > >- if ((!$hasParent or $dataNode->extendedAttributes->{"JSGenerateToJS"}) and !($dataNode->extendedAttributes->{"JSCustomToJS"} or $dataNode->extendedAttributes->{"JSCustomToJSObject"})) { >+ if ((!$hasParent or $dataNode->extendedAttributes->{"JSGenerateToJS"}) and !($dataNode->extendedAttributes->{"CustomToJSObject"} or $dataNode->extendedAttributes->{"JSCustomToJSObject"})) { > push(@implContent, "JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType* impl)\n"); > push(@implContent, "{\n"); > if ($svgPropertyType) { >diff --git a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm >index 02b852e6b73d10cee39c1a1db1a8a304a0507059..b014f9e2c0806c8578209a2873918c00569b0cf7 100644 >--- a/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm >+++ b/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm >@@ -447,7 +447,7 @@ END > } > END > >- if (!HasCustomToV8Implementation($dataNode, $interfaceName)) { >+ if (!($dataNode->extendedAttributes->{"CustomToJSObject"} or $dataNode->extendedAttributes->{"V8CustomToJSObject"})) { > push(@headerContent, <<END); > > inline v8::Handle<v8::Value> toV8(${nativeType}* impl${forceNewObjectParameter}) >@@ -3101,17 +3101,6 @@ END > END > } > >-sub HasCustomToV8Implementation { >- # FIXME: This subroutine is lame. Probably should be an .idl attribute (CustomToV8)? >- my $dataNode = shift; >- my $interfaceName = shift; >- >- return 1 if $dataNode->extendedAttributes->{"V8CustomToJSObject"}; >- >- # For everything else, do what JSC does. >- return $dataNode->extendedAttributes->{"JSCustomToJS"}; >-} >- > sub GetDomMapFunction > { > my $dataNode = shift; >diff --git a/Source/WebCore/bindings/scripts/test/TestTypedArray.idl b/Source/WebCore/bindings/scripts/test/TestTypedArray.idl >index 4ea69e59892c70324415d6fd2e5e1ce060ddc931..cf5306d42d6d929343608e504d1491c769a99bc0 100644 >--- a/Source/WebCore/bindings/scripts/test/TestTypedArray.idl >+++ b/Source/WebCore/bindings/scripts/test/TestTypedArray.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Float64Array : ArrayBufferView { > Int32Array foo(in Float32Array array); >diff --git a/Source/WebCore/css/CSSRule.idl b/Source/WebCore/css/CSSRule.idl >index 7907f54553b7b9a4b2d3a5a947e6bdef599741b5..dc65688d7cb36ccb84cfc1d5f7699ae53226f3cd 100644 >--- a/Source/WebCore/css/CSSRule.idl >+++ b/Source/WebCore/css/CSSRule.idl >@@ -24,7 +24,7 @@ module css { > interface [ > JSCustomMarkFunction, > JSGenerateIsReachable, >- JSCustomToJS, >+ CustomToJSObject, > ObjCPolymorphic, > V8DependentLifetime > ] CSSRule { >diff --git a/Source/WebCore/css/CSSValue.idl b/Source/WebCore/css/CSSValue.idl >index f7522d64f5e46b69b0dec07783f65e9d670821f3..2b0ceb31f705d319654e5196bd8a3ef47633c7a4 100644 >--- a/Source/WebCore/css/CSSValue.idl >+++ b/Source/WebCore/css/CSSValue.idl >@@ -21,7 +21,7 @@ > module css { > > interface [ >- JSCustomToJS, >+ CustomToJSObject, > JSCustomIsReachable, > JSCustomFinalize, > ObjCPolymorphic, >diff --git a/Source/WebCore/css/StyleSheet.idl b/Source/WebCore/css/StyleSheet.idl >index d6ec19b64bdb4a703478f767eadb13665ff43710..9e20d84acc3b0e421c71b1e369e20a21333b7723 100644 >--- a/Source/WebCore/css/StyleSheet.idl >+++ b/Source/WebCore/css/StyleSheet.idl >@@ -24,7 +24,7 @@ module stylesheets { > interface [ > JSCustomMarkFunction, > JSGenerateIsReachable, >- JSCustomToJS, >+ CustomToJSObject, > ObjCPolymorphic, > V8DependentLifetime > ] StyleSheet { >diff --git a/Source/WebCore/dom/Document.idl b/Source/WebCore/dom/Document.idl >index 03411c620da70108fed14e9021fc7d7d5cc612c0..b3e0aa3a0ba292888442fe550c4dd1539dd7d26e 100644 >--- a/Source/WebCore/dom/Document.idl >+++ b/Source/WebCore/dom/Document.idl >@@ -21,7 +21,7 @@ > module core { > > interface [ >- JSCustomToJS, >+ CustomToJSObject, > JSGenerateToNativeObject, > JSInlineGetOwnPropertySlot > ] Document : Node { >diff --git a/Source/WebCore/dom/Event.idl b/Source/WebCore/dom/Event.idl >index 5acae8da1441a5a4e1e9178681d73968034292b7..2abd5a95013520b6b95c9b14473e293031dcf9b9 100644 >--- a/Source/WebCore/dom/Event.idl >+++ b/Source/WebCore/dom/Event.idl >@@ -22,7 +22,7 @@ module events { > > // Introduced in DOM Level 2: > interface [ >- JSCustomToJS, >+ CustomToJSObject, > ConstructorTemplate=Event, > JSNoStaticTables, > ObjCPolymorphic >diff --git a/Source/WebCore/dom/Node.idl b/Source/WebCore/dom/Node.idl >index 8dfd916d8c90e27ae2febfda36d77f0690afaa5c..e27a215cabaa8d91a18c82fa875fd09845116934 100644 >--- a/Source/WebCore/dom/Node.idl >+++ b/Source/WebCore/dom/Node.idl >@@ -26,7 +26,7 @@ module core { > JSCustomPushEventHandlerScope, > JSCustomIsReachable, > JSCustomFinalize, >- JSCustomToJS, >+ CustomToJSObject, > EventTarget, > JSGenerateToNativeObject, > JSInlineGetOwnPropertySlot, >diff --git a/Source/WebCore/fileapi/Blob.idl b/Source/WebCore/fileapi/Blob.idl >index 1400dc1b3c347292c452f0983b72bf97612048f1..29c5141d26c43b0014a58c4c8b07f1d532e6cea3 100644 >--- a/Source/WebCore/fileapi/Blob.idl >+++ b/Source/WebCore/fileapi/Blob.idl >@@ -32,7 +32,7 @@ module html { > > interface [ > JSGenerateIsReachable=Impl, >- JSCustomToJS, >+ CustomToJSObject, > JSNoStaticTables > ] Blob { > readonly attribute unsigned long long size; >diff --git a/Source/WebCore/fileapi/Entry.idl b/Source/WebCore/fileapi/Entry.idl >index 4be6c8b75d4bde3bbe675ff0d7f66eb390c08091..c6cdba5bd8b0cbeecedeb48748e474ff14acf879 100644 >--- a/Source/WebCore/fileapi/Entry.idl >+++ b/Source/WebCore/fileapi/Entry.idl >@@ -31,7 +31,7 @@ > module storage { > interface [ > Conditional=FILE_SYSTEM, >- JSCustomToJS, >+ CustomToJSObject, > JSNoStaticTables > ] Entry { > readonly attribute boolean isFile; >diff --git a/Source/WebCore/fileapi/EntrySync.idl b/Source/WebCore/fileapi/EntrySync.idl >index 2db476d33561ffd27db103942dc6bef2ded2c08c..cd4bae7de69c4df732e7633556cf601ce144b686 100644 >--- a/Source/WebCore/fileapi/EntrySync.idl >+++ b/Source/WebCore/fileapi/EntrySync.idl >@@ -31,7 +31,7 @@ > module storage { > interface [ > Conditional=FILE_SYSTEM, >- JSCustomToJS, >+ CustomToJSObject, > JSNoStaticTables > ] EntrySync { > readonly attribute boolean isFile; >diff --git a/Source/WebCore/html/HTMLCollection.idl b/Source/WebCore/html/HTMLCollection.idl >index 6915e3e7f3d4af5bc2a1d9bf1c6a9a5bb782c797..77837762657bcc11a417bb5146fc8841ad4f0fe2 100644 >--- a/Source/WebCore/html/HTMLCollection.idl >+++ b/Source/WebCore/html/HTMLCollection.idl >@@ -23,7 +23,7 @@ module html { > interface [ > IndexedGetter, > NamedGetter, >- JSCustomToJS, >+ CustomToJSObject, > JSGenerateIsReachable, > ObjCPolymorphic > ] HTMLCollection { >diff --git a/Source/WebCore/html/ImageData.idl b/Source/WebCore/html/ImageData.idl >index bbfa460a39c3eafb4297298bbc94cd8e12e1c0fe..c859454174c37c518b0aa06b972585f147f6f6c7 100644 >--- a/Source/WebCore/html/ImageData.idl >+++ b/Source/WebCore/html/ImageData.idl >@@ -29,7 +29,7 @@ > module html { > > interface [ >- JSCustomToJS >+ CustomToJSObject > ] ImageData { > readonly attribute long width; > readonly attribute long height; >diff --git a/Source/WebCore/html/canvas/ArrayBufferView.idl b/Source/WebCore/html/canvas/ArrayBufferView.idl >index ed158bfaee5b383f5a4e278a121b1532168b801a..0e934e6cb481b566a2651f6962dd5485132c62f6 100644 >--- a/Source/WebCore/html/canvas/ArrayBufferView.idl >+++ b/Source/WebCore/html/canvas/ArrayBufferView.idl >@@ -25,7 +25,7 @@ > > module html { > interface [ >- JSCustomToJS, >+ CustomToJSObject, > JSNoStaticTables, > OmitConstructor > ] ArrayBufferView { >diff --git a/Source/WebCore/html/canvas/DataView.idl b/Source/WebCore/html/canvas/DataView.idl >index 9530220dcad52f0e059b7103388a3f704f68c4a1..27bad0e47034989f0eaea0a0d755727520b9e47f 100755 >--- a/Source/WebCore/html/canvas/DataView.idl >+++ b/Source/WebCore/html/canvas/DataView.idl >@@ -27,7 +27,7 @@ module html { > > interface [ > CustomConstructor, >- JSCustomToJS, >+ CustomToJSObject, > JSNoStaticTables > ] DataView : ArrayBufferView { > // All these methods raise an exception if they would read or write beyond the end of the view. >diff --git a/Source/WebCore/html/canvas/Float32Array.idl b/Source/WebCore/html/canvas/Float32Array.idl >index a353e61c0f975398a7aa3bcfba3057ca4f6ddc2d..5e619a7ea4da2be29b6d06e7f93c1a6096d4a5ad 100644 >--- a/Source/WebCore/html/canvas/Float32Array.idl >+++ b/Source/WebCore/html/canvas/Float32Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Float32Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 4; >diff --git a/Source/WebCore/html/canvas/Float64Array.idl b/Source/WebCore/html/canvas/Float64Array.idl >index 45303fb6fa1ca613d5a61ce1b85e9071133052d2..f4c448a45f8e0abb1b7f985334f0885df509cd9d 100644 >--- a/Source/WebCore/html/canvas/Float64Array.idl >+++ b/Source/WebCore/html/canvas/Float64Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Float64Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 8; >diff --git a/Source/WebCore/html/canvas/Int16Array.idl b/Source/WebCore/html/canvas/Int16Array.idl >index 17b13f12b95ff9eb0536eb254ba39df1fb107b90..b7ddc1e7cf1daabe7b88da2b76b5b5d8bd69e10d 100644 >--- a/Source/WebCore/html/canvas/Int16Array.idl >+++ b/Source/WebCore/html/canvas/Int16Array.idl >@@ -30,7 +30,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Int16Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 2; >diff --git a/Source/WebCore/html/canvas/Int32Array.idl b/Source/WebCore/html/canvas/Int32Array.idl >index b5c6e790f16b7984596154bc3373f3f888375bac..950437aec9f516298e450bc3729fca1069e9c5fa 100644 >--- a/Source/WebCore/html/canvas/Int32Array.idl >+++ b/Source/WebCore/html/canvas/Int32Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Int32Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 4; >diff --git a/Source/WebCore/html/canvas/Int8Array.idl b/Source/WebCore/html/canvas/Int8Array.idl >index bf7228181eb43eb19eb9ee99c8dc38072609e4c4..da0c8f16635b994c0f34f4fc1c208ca9de902076 100644 >--- a/Source/WebCore/html/canvas/Int8Array.idl >+++ b/Source/WebCore/html/canvas/Int8Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Int8Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 1; >diff --git a/Source/WebCore/html/canvas/Uint16Array.idl b/Source/WebCore/html/canvas/Uint16Array.idl >index 39bd212fe1def30536dd79f39a393470ac9415e7..33627bfce4a8201c1a3d992fe3cdcf9a65f048cd 100644 >--- a/Source/WebCore/html/canvas/Uint16Array.idl >+++ b/Source/WebCore/html/canvas/Uint16Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Uint16Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 2; >diff --git a/Source/WebCore/html/canvas/Uint32Array.idl b/Source/WebCore/html/canvas/Uint32Array.idl >index b0e12e555a914290e0e8a805bff201c1bac1ceb2..7bb4ca39b7abf1de12dcb23ea7fe9f0f23acfa82 100644 >--- a/Source/WebCore/html/canvas/Uint32Array.idl >+++ b/Source/WebCore/html/canvas/Uint32Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Uint32Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 4; >diff --git a/Source/WebCore/html/canvas/Uint8Array.idl b/Source/WebCore/html/canvas/Uint8Array.idl >index 0198e6c86a1ce1a8d793af3dfa7995520295daf2..fbbafc320256ddbef5686995f06c0546fe8debd3 100644 >--- a/Source/WebCore/html/canvas/Uint8Array.idl >+++ b/Source/WebCore/html/canvas/Uint8Array.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Uint8Array : ArrayBufferView { > const unsigned int BYTES_PER_ELEMENT = 1; >diff --git a/Source/WebCore/html/canvas/Uint8ClampedArray.idl b/Source/WebCore/html/canvas/Uint8ClampedArray.idl >index 04b2ebe596dc798180476c910541109e3bf8ddb0..fd006e455c01820e8cef5022af6fa6be6f17ad26 100644 >--- a/Source/WebCore/html/canvas/Uint8ClampedArray.idl >+++ b/Source/WebCore/html/canvas/Uint8ClampedArray.idl >@@ -31,7 +31,7 @@ module html { > CustomIndexedSetter, > JSGenerateToNativeObject, > JSNoStaticTables, >- JSCustomToJS, >+ CustomToJSObject, > DoNotCheckConstants > ] Uint8ClampedArray : Uint8Array { > const unsigned int BYTES_PER_ELEMENT = 1; >diff --git a/Source/WebCore/storage/IDBAny.idl b/Source/WebCore/storage/IDBAny.idl >index 66a5c204201094b224e4a67234e75072a449b405..dd51c4daac66d69903555daf70094537aef5359f 100644 >--- a/Source/WebCore/storage/IDBAny.idl >+++ b/Source/WebCore/storage/IDBAny.idl >@@ -27,7 +27,7 @@ module storage { > > interface [ > Conditional=INDEXED_DATABASE, >- JSCustomToJS >+ CustomToJSObject > ] IDBAny { > // This space is intentionally left blank. > }; >diff --git a/Source/WebCore/storage/IDBKey.idl b/Source/WebCore/storage/IDBKey.idl >index a213d721a722ef6052a2836b0d0d896b4082452a..1464d9f73d122b400f02d95091eb7531a4c70543 100644 >--- a/Source/WebCore/storage/IDBKey.idl >+++ b/Source/WebCore/storage/IDBKey.idl >@@ -27,7 +27,7 @@ module storage { > > interface [ > Conditional=INDEXED_DATABASE, >- JSCustomToJS >+ CustomToJSObject > ] IDBKey { > // This space is intentionally left blank. > }; >diff --git a/Source/WebCore/svg/SVGPathSeg.idl b/Source/WebCore/svg/SVGPathSeg.idl >index 5b967c2c9be061df8b10b0f02a22ddc8892cdb3a..e7ad75a8b95c4c5f47f825396e38127f609232d6 100644 >--- a/Source/WebCore/svg/SVGPathSeg.idl >+++ b/Source/WebCore/svg/SVGPathSeg.idl >@@ -28,7 +28,7 @@ module svg { > > interface [ > Conditional=SVG, >- JSCustomToJS, >+ CustomToJSObject, > ObjCPolymorphic > ] SVGPathSeg { > // Path Segment Types
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 78489
: 126762