RESOLVED FIXED 67447
Generate a Worker constructor of V8 using the IDL 'Constructor' extended attribute
https://bugs.webkit.org/show_bug.cgi?id=67447
Summary Generate a Worker constructor of V8 using the IDL 'Constructor' extended attr...
Kentaro Hara
Reported 2011-09-01 15:20:30 PDT
Currently, the Worker constructor is written manually as a custom constructor. We should replace this with automatically generated code by the IDL 'Constructor' extended attribute.
Attachments
Patch (3.44 KB, patch)
2011-09-01 15:23 PDT, Kentaro Hara
no flags
Patch (3.53 KB, patch)
2011-09-01 18:04 PDT, Kentaro Hara
no flags
Kentaro Hara
Comment 1 2011-09-01 15:23:20 PDT
Dimitri Glazkov (Google)
Comment 2 2011-09-01 15:55:22 PDT
Comment on attachment 106047 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=106047&action=review > Source/WebCore/workers/Worker.idl:37 > + ConstructorRaisesException, shouldn't this be Constructor(in DOMString scriptUrl) raises (DOMException)? Or is this still coming?
WebKit Review Bot
Comment 3 2011-09-01 16:06:57 PDT
Comment on attachment 106047 [details] Patch Rejecting attachment 106047 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: " exit_code: 1 Parsed 3 diffs from patch file(s). patching file Source/WebCore/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/WebCore/bindings/v8/custom/V8WorkerCustom.cpp Hunk #1 FAILED at 47. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebCore/bindings/v8/custom/V8WorkerCustom.cpp.rej patching file Source/WebCore/workers/Worker.idl Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--reviewer', u'Dimitri Glazkov', u'--..." exit_code: 1 Full output: http://queues.webkit.org/results/9578572
Kentaro Hara
Comment 4 2011-09-01 16:20:14 PDT
(In reply to comment #2) > (From update of attachment 106047 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=106047&action=review > > > Source/WebCore/workers/Worker.idl:37 > > + ConstructorRaisesException, > > shouldn't this be Constructor(in DOMString scriptUrl) raises (DOMException)? Dimitri: Thank you very much for the review. The spec of the 'Constructor' extended attribute does not allow the "Constructor(...) raises (...)" format (http://www.w3.org/TR/WebIDL/#Constructor). For example, the spec says that the IDL of a Worker constructor should be "Constructor(DOMString scriptURL)" (http://dev.w3.org/html5/workers/#dedicated-workers-and-the-worker-interface). On the other hand, the spec of the Worker constructor says that it can throw SYNTAX_ERR (http://dev.w3.org/html5/workers/#dom-worker). Therefore, I think that the possible approaches for us are as follows: Appraoch1: Change the spec of constructors, so that it can allow the "Constructor(...) raises (...)" format. Approach2: We introduce a special extended attribute for WebKit (as we have done so far), 'ConstructorRaisesException'. For now, this patch takes Approach2.
Kentaro Hara
Comment 5 2011-09-01 18:04:37 PDT
Kentaro Hara
Comment 6 2011-09-01 18:07:16 PDT
Dimitri: I rebased the patch with the latest repository. Would you please try to commit it again? Thanks.
WebKit Review Bot
Comment 7 2011-09-01 18:37:00 PDT
Comment on attachment 106073 [details] Patch Clearing flags on attachment: 106073 Committed r94381: <http://trac.webkit.org/changeset/94381>
WebKit Review Bot
Comment 8 2011-09-01 18:37:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.