Bug 38615

Summary: [V8] Add V8 bindings for FileReader interface and turn on FileReader support in Chromium
Product: WebKit Reporter: Jian Li <jianli>
Component: WebCore Misc.Assignee: Jian Li <jianli>
Status: RESOLVED INVALID    
Severity: Normal CC: abarth, dglazkov, dimich, eric, jorlow, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 38609    
Bug Blocks:    
Attachments:
Description Flags
Proposed Patch
jianli: commit-queue-
Proposed Patch abarth: review-, jianli: commit-queue-

Description Jian Li 2010-05-05 17:34:21 PDT
Add V8 bindings for FileReader interface and turn on FileReader support in Chromium.
Comment 1 Jian Li 2010-05-05 17:39:02 PDT
Created attachment 55180 [details]
Proposed Patch

The ews queue will be broken since this patch depends on 38609 that has not been landed.
Comment 2 WebKit Review Bot 2010-05-05 17:46:17 PDT
Attachment 55180 [details] did not pass style-queue:

Failed to run "['WebKitTools/Scripts/check-webkit-style', '--no-squash']" exit_code: 1
WebCore/bindings/v8/custom/V8FileReaderCustom.cpp:67:  One space before end of line comments  [whitespace/comments] [5]
Total errors found: 1 in 8 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Jian Li 2010-05-05 17:53:35 PDT
Created attachment 55184 [details]
Proposed Patch

Style fix.
Comment 4 WebKit Review Bot 2010-05-05 19:09:06 PDT
Attachment 55184 [details] did not build on chromium:
Build output: http://webkit-commit-queue.appspot.com/results/2175007
Comment 5 Eric Seidel (no email) 2010-05-05 21:43:38 PDT
Why are custom bindings needed?
Comment 6 Jian Li 2010-05-05 23:12:34 PDT
(In reply to comment #5)
> Why are custom bindings needed?

Because we need to get the ScriptExecutionContext and pass it to the FileReader constructor.
Comment 7 Adam Barth 2010-05-05 23:49:03 PDT
> Because we need to get the ScriptExecutionContext and pass it to the FileReader
> constructor.

Have you tried [CallWith=ScriptExecutionContext] ?
Comment 8 Adam Barth 2010-05-05 23:51:11 PDT
Comment on attachment 55184 [details]
Proposed Patch

Please try this without custom bindings.  You might need to extend [CallWith] to work with constructors.

WebCore/bindings/v8/custom/V8FileReaderCustom.cpp:48
 +          return throwError("DOM object custructor cannot be called as a function.");
Which spec does this text come from?  Is this text localized?  I don't think we should have this random custom text in the bindings.
Comment 9 Jian Li 2010-05-10 17:18:36 PDT
We do not need this bug now since we choose to change the code generator to avoid the custom bindings code.