RESOLVED FIXED 174140
[WebIDL] Convert MutationCallback to be a normal generated callback
https://bugs.webkit.org/show_bug.cgi?id=174140
Summary [WebIDL] Convert MutationCallback to be a normal generated callback
Sam Weinig
Reported 2017-07-04 14:17:35 PDT
[WebIDL] Convert MutationCallback to be a normal generate callback
Attachments
Patch (31.87 KB, patch)
2017-07-04 14:27 PDT, Sam Weinig
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (1.03 MB, application/zip)
2017-07-04 15:44 PDT, Build Bot
no flags
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.08 MB, application/zip)
2017-07-04 15:48 PDT, Build Bot
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (6.29 MB, application/zip)
2017-07-04 16:18 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (1.79 MB, application/zip)
2017-07-04 17:39 PDT, Build Bot
no flags
Archive of layout-test-results from ews117 for mac-elcapitan (1.78 MB, application/zip)
2017-07-04 19:40 PDT, Build Bot
no flags
Patch (68.50 KB, patch)
2017-07-05 22:53 PDT, Sam Weinig
no flags
Archive of layout-test-results from ews103 for mac-elcapitan (984.87 KB, application/zip)
2017-07-05 23:59 PDT, Build Bot
no flags
Archive of layout-test-results from ews106 for mac-elcapitan-wk2 (1.14 MB, application/zip)
2017-07-06 00:05 PDT, Build Bot
no flags
Archive of layout-test-results from ews122 for ios-simulator-wk2 (948.22 KB, application/zip)
2017-07-06 00:28 PDT, Build Bot
no flags
Archive of layout-test-results from ews114 for mac-elcapitan (1.83 MB, application/zip)
2017-07-06 01:47 PDT, Build Bot
no flags
Archive of layout-test-results from ews112 for mac-elcapitan (1.78 MB, application/zip)
2017-07-06 03:50 PDT, Build Bot
no flags
Patch (73.15 KB, patch)
2017-07-06 15:22 PDT, Sam Weinig
no flags
Patch (110.46 KB, patch)
2017-08-02 14:58 PDT, Sam Weinig
no flags
Patch (116.87 KB, patch)
2017-08-02 15:54 PDT, Sam Weinig
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (1.10 MB, application/zip)
2017-08-02 17:00 PDT, Build Bot
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (959.74 KB, application/zip)
2017-08-02 17:46 PDT, Build Bot
no flags
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 (1.42 MB, application/zip)
2017-08-02 18:08 PDT, Build Bot
no flags
Archive of layout-test-results from ews117 for mac-elcapitan (1.85 MB, application/zip)
2017-08-02 18:48 PDT, Build Bot
no flags
Patch (113.59 KB, patch)
2017-08-02 20:20 PDT, Sam Weinig
darin: review+
Sam Weinig
Comment 1 2017-07-04 14:27:42 PDT Comment hidden (obsolete)
Build Bot
Comment 2 2017-07-04 15:44:11 PDT Comment hidden (obsolete)
Build Bot
Comment 3 2017-07-04 15:44:12 PDT Comment hidden (obsolete)
Build Bot
Comment 4 2017-07-04 15:48:57 PDT Comment hidden (obsolete)
Build Bot
Comment 5 2017-07-04 15:48:58 PDT Comment hidden (obsolete)
Build Bot
Comment 6 2017-07-04 16:18:09 PDT Comment hidden (obsolete)
Build Bot
Comment 7 2017-07-04 16:18:11 PDT Comment hidden (obsolete)
Build Bot
Comment 8 2017-07-04 17:39:13 PDT Comment hidden (obsolete)
Build Bot
Comment 9 2017-07-04 17:39:14 PDT Comment hidden (obsolete)
Build Bot
Comment 10 2017-07-04 19:40:16 PDT Comment hidden (obsolete)
Build Bot
Comment 11 2017-07-04 19:40:17 PDT Comment hidden (obsolete)
Sam Weinig
Comment 12 2017-07-05 10:46:28 PDT
I need to come up with a way to pass a this object to a callback. I have two ideas. 1) Add a setThisObject(...) function that the callback needs to implement which should be called before handleEvent(). 2) For callbacks that need a this object, pass it as the first argument, and offset the rest of the arguments by one. I think I am leaning toward the second option.
Sam Weinig
Comment 13 2017-07-05 22:53:56 PDT Comment hidden (obsolete)
Build Bot
Comment 14 2017-07-05 23:59:18 PDT Comment hidden (obsolete)
Build Bot
Comment 15 2017-07-05 23:59:19 PDT Comment hidden (obsolete)
Build Bot
Comment 16 2017-07-06 00:05:31 PDT Comment hidden (obsolete)
Build Bot
Comment 17 2017-07-06 00:05:33 PDT Comment hidden (obsolete)
Build Bot
Comment 18 2017-07-06 00:28:07 PDT Comment hidden (obsolete)
Build Bot
Comment 19 2017-07-06 00:28:08 PDT Comment hidden (obsolete)
Build Bot
Comment 20 2017-07-06 01:47:02 PDT Comment hidden (obsolete)
Build Bot
Comment 21 2017-07-06 01:47:04 PDT Comment hidden (obsolete)
Build Bot
Comment 22 2017-07-06 03:50:28 PDT Comment hidden (obsolete)
Build Bot
Comment 23 2017-07-06 03:50:29 PDT Comment hidden (obsolete)
Sam Weinig
Comment 24 2017-07-06 15:22:20 PDT
Chris Dumez
Comment 25 2017-07-09 10:20:28 PDT
Comment on attachment 314762 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=314762&action=review r=me > Source/WebCore/ChangeLog:3 > + [WebIDL] Convert MutationCallback to be a normal generate callback "normal generate callback" ? > Source/WebCore/ChangeLog:9 > + - Added the ability to for non-nullable interfaces in sequences to be passed "to for"?
Sam Weinig
Comment 26 2017-07-11 14:07:11 PDT
WebKit Commit Bot
Comment 27 2017-07-12 13:39:48 PDT
Re-opened since this is blocked by bug 174434
Sam Weinig
Comment 28 2017-08-02 14:58:34 PDT Comment hidden (obsolete)
Build Bot
Comment 29 2017-08-02 15:51:42 PDT Comment hidden (obsolete)
Sam Weinig
Comment 30 2017-08-02 15:54:53 PDT Comment hidden (obsolete)
Build Bot
Comment 31 2017-08-02 17:00:12 PDT Comment hidden (obsolete)
Build Bot
Comment 32 2017-08-02 17:00:14 PDT Comment hidden (obsolete)
Build Bot
Comment 33 2017-08-02 17:46:03 PDT Comment hidden (obsolete)
Build Bot
Comment 34 2017-08-02 17:46:04 PDT Comment hidden (obsolete)
Build Bot
Comment 35 2017-08-02 18:08:19 PDT Comment hidden (obsolete)
Build Bot
Comment 36 2017-08-02 18:08:21 PDT Comment hidden (obsolete)
Build Bot
Comment 37 2017-08-02 18:48:40 PDT Comment hidden (obsolete)
Build Bot
Comment 38 2017-08-02 18:48:41 PDT Comment hidden (obsolete)
Sam Weinig
Comment 39 2017-08-02 20:20:07 PDT
Darin Adler
Comment 40 2017-08-03 09:44:17 PDT
Comment on attachment 317077 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=317077&action=review > Source/WebCore/ChangeLog:3 > + [WebIDL] Convert MutationCallback to be a normal generate callback generated? > Source/WebCore/Modules/geolocation/PositionCallback.h:38 > + using ActiveDOMCallback::ActiveDOMCallback; What does this do? I have never seen this syntax before; it looks like it would make a base class constructor public, but I not know what that means. And also, it seems that since we inherit from ActiveDOMCallback publicly that it would already be public, so what is this for? > Source/WebCore/Modules/geolocation/PositionCallback.h:40 > virtual ~PositionCallback() { } This is no longer needed now that we have a base class that already makes the detstructor virtual. > Source/WebCore/Modules/geolocation/PositionCallback.h:41 > virtual CallbackResult<void> handleEvent(Geoposition*) = 0; Wish this was a reference instead of a pointer. > Source/WebCore/Modules/geolocation/PositionErrorCallback.h:40 > + using ActiveDOMCallback::ActiveDOMCallback; > + > virtual ~PositionErrorCallback() { } Ditto. Same for all the other classes.
Sam Weinig
Comment 41 2017-08-03 09:57:55 PDT
(In reply to Darin Adler from comment #40) > Comment on attachment 317077 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=317077&action=review > > > Source/WebCore/ChangeLog:3 > > + [WebIDL] Convert MutationCallback to be a normal generate callback > > generated? Yep. Will fix. > > > Source/WebCore/Modules/geolocation/PositionCallback.h:38 > > + using ActiveDOMCallback::ActiveDOMCallback; > > What does this do? I have never seen this syntax before; it looks like it > would make a base class constructor public, but I not know what that means. > And also, it seems that since we inherit from ActiveDOMCallback publicly > that it would already be public, so what is this for? It adds all the constructors from ActiveDOMCallback to, in this case, PositionCallback. I found the section called "Inheriting constructors" in http://en.cppreference.com/w/cpp/language/using_declaration useful and interesting. > > > Source/WebCore/Modules/geolocation/PositionCallback.h:40 > > virtual ~PositionCallback() { } > > This is no longer needed now that we have a base class that already makes > the detstructor virtual. Good point, will remove. > > > Source/WebCore/Modules/geolocation/PositionCallback.h:41 > > virtual CallbackResult<void> handleEvent(Geoposition*) = 0; > > Wish this was a reference instead of a pointer. Me too. :(.
Sam Weinig
Comment 42 2017-08-03 10:51:24 PDT
Radar WebKit Bug Importer
Comment 43 2017-08-03 10:52:26 PDT
Chris Dumez
Comment 44 2017-08-24 16:19:59 PDT
The changes to MutationObserver / MutationCallback may have caused crashes (rdar://problem/34062022).
Note You need to log in before you can comment on or make changes to this bug.