Title: [94375] trunk/Source/WebCore
- Revision
- 94375
- Author
- [email protected]
- Date
- 2011-09-01 17:49:28 -0700 (Thu, 01 Sep 2011)
Log Message
Generate a FileReader constructor of V8 using the IDL 'Constructor' extended attribute
https://bugs.webkit.org/show_bug.cgi?id=67412
Patch by Kentaro Hara <[email protected]> on 2011-09-01
Reviewed by Adam Barth.
Test: fast/files/blob-slice-test.html
fast/files/file-reader-abort.html
* bindings/v8/custom/V8FileReaderCustom.cpp: Removed constructorCallback().
* fileapi/FileReader.idl: Added the 'Constructor' extended attribute.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (94374 => 94375)
--- trunk/Source/WebCore/ChangeLog 2011-09-02 00:42:50 UTC (rev 94374)
+++ trunk/Source/WebCore/ChangeLog 2011-09-02 00:49:28 UTC (rev 94375)
@@ -1,3 +1,16 @@
+2011-09-01 Kentaro Hara <[email protected]>
+
+ Generate a FileReader constructor of V8 using the IDL 'Constructor' extended attribute
+ https://bugs.webkit.org/show_bug.cgi?id=67412
+
+ Reviewed by Adam Barth.
+
+ Test: fast/files/blob-slice-test.html
+ fast/files/file-reader-abort.html
+
+ * bindings/v8/custom/V8FileReaderCustom.cpp: Removed constructorCallback().
+ * fileapi/FileReader.idl: Added the 'Constructor' extended attribute.
+
2011-09-01 Robert Kroeger <[email protected]>
[chromium] Code cleanup FIXME in Chromium recognizer
Modified: trunk/Source/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp (94374 => 94375)
--- trunk/Source/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp 2011-09-02 00:42:50 UTC (rev 94374)
+++ trunk/Source/WebCore/bindings/v8/custom/V8FileReaderCustom.cpp 2011-09-02 00:49:28 UTC (rev 94375)
@@ -40,27 +40,6 @@
namespace WebCore {
-v8::Handle<v8::Value> V8FileReader::constructorCallback(const v8::Arguments& args)
-{
- INC_STATS("DOM.FileReader.Constructor");
-
- if (!args.IsConstructCall())
- return throwError("DOM object constructor cannot be called as a function.", V8Proxy::TypeError);
-
- // Expect no parameters.
- // Allocate a FileReader object as its internal field.
- ScriptExecutionContext* context = getScriptExecutionContext();
- if (!context)
- return throwError("FileReader constructor's associated context is not available", V8Proxy::ReferenceError);
- RefPtr<FileReader> fileReader = FileReader::create(context);
- V8DOMWrapper::setDOMWrapper(args.Holder(), &info, fileReader.get());
-
- // Add object to the wrapper map.
- fileReader->ref();
- V8DOMWrapper::setJSWrapperForActiveDOMObject(fileReader.get(), v8::Persistent<v8::Object>::New(args.Holder()));
- return args.Holder();
-}
-
v8::Handle<v8::Value> V8FileReader::resultAccessorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
{
INC_STATS("DOM.FileReader.result._get");
Modified: trunk/Source/WebCore/fileapi/FileReader.idl (94374 => 94375)
--- trunk/Source/WebCore/fileapi/FileReader.idl 2011-09-02 00:42:50 UTC (rev 94374)
+++ trunk/Source/WebCore/fileapi/FileReader.idl 2011-09-02 00:49:28 UTC (rev 94375)
@@ -37,7 +37,9 @@
CallWith=ScriptExecutionContext,
EventTarget,
NoStaticTables,
- V8CustomConstructor
+ Constructor,
+ ConstructorWith=ScriptExecutionContext,
+ V8ConstructorSetsActiveDOMWrapper
] FileReader {
// ready states
const unsigned short EMPTY = 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes