Bug 205151

Summary: Refactor ScriptController's proliferation of ExceptionDetails*
Product: WebKit Reporter: Brady Eidson <beidson>
Component: WebCore Misc.Assignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, berto, calvaris, cdumez, cgarcia, commit-queue, dbates, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gustavo, gyuyoung.kim, hi, japhet, jer.noble, joepeck, kangil.han, philipj, sam, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Brady Eidson
Reported 2019-12-11 18:45:04 PST
Refactor ScriptController's proliferation of ExceptionDetails It's nonsensically everywhere and is getting in the way of upcoming feature work.
Attachments
Patch (31.50 KB, patch)
2019-12-11 22:09 PST, Brady Eidson
no flags
Patch (31.56 KB, patch)
2019-12-11 22:32 PST, Brady Eidson
no flags
Patch (46.41 KB, patch)
2019-12-12 09:58 PST, Brady Eidson
no flags
Patch (47.29 KB, patch)
2019-12-12 10:22 PST, Brady Eidson
no flags
Patch (49.47 KB, patch)
2019-12-12 11:47 PST, Brady Eidson
no flags
Patch (50.19 KB, patch)
2019-12-12 11:57 PST, Brady Eidson
no flags
Patch (51.07 KB, patch)
2019-12-12 12:12 PST, Brady Eidson
no flags
Patch (51.07 KB, patch)
2019-12-12 12:20 PST, Brady Eidson
no flags
Patch (51.07 KB, patch)
2019-12-12 12:25 PST, Brady Eidson
no flags
Patch (52.19 KB, patch)
2019-12-12 12:51 PST, Brady Eidson
no flags
Patch (52.36 KB, patch)
2019-12-12 13:32 PST, Brady Eidson
no flags
Patch (52.85 KB, patch)
2019-12-12 23:59 PST, Brady Eidson
no flags
Patch (52.98 KB, patch)
2019-12-13 15:28 PST, Brady Eidson
no flags
Patch (53.09 KB, patch)
2019-12-13 16:15 PST, Brady Eidson
no flags
Brady Eidson
Comment 1 2019-12-11 22:09:58 PST
Brady Eidson
Comment 2 2019-12-11 22:32:15 PST
Brady Eidson
Comment 3 2019-12-12 09:58:49 PST
Brady Eidson
Comment 4 2019-12-12 10:22:57 PST
Sam Weinig
Comment 5 2019-12-12 10:58:53 PST
Comment on attachment 385510 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=385510&action=review > Source/WebCore/bindings/js/ScriptController.cpp:115 > +ValueAndException ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld& world) It feels like this should return something called ValueOrException (which makes me wonder if the existing ExceptionOr<> class could be used here), since it looks like when an exception is thrown, the value is set to { }. If ExceptionOr<> isn't quite right, adding an ExceptionDetailsOr<> seems ok, or just using Expected<JSC::JSValue, ExceptionDetails>
Brady Eidson
Comment 6 2019-12-12 11:47:03 PST
EWS Watchlist
Comment 7 2019-12-12 11:47:54 PST
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Brady Eidson
Comment 8 2019-12-12 11:57:18 PST
Brady Eidson
Comment 9 2019-12-12 12:12:41 PST
Brady Eidson
Comment 10 2019-12-12 12:20:44 PST
Brady Eidson
Comment 11 2019-12-12 12:25:02 PST
Brady Eidson
Comment 12 2019-12-12 12:51:32 PST
Brady Eidson
Comment 13 2019-12-12 13:31:57 PST
Finally got past other platform build errors. Now uploading with refreshed changelogs
Brady Eidson
Comment 14 2019-12-12 13:32:23 PST
Brady Eidson
Comment 15 2019-12-12 19:40:58 PST
I don't think this caused API tests QuotaDelegateReload and MediaCache to fail. I also can't identify how this patch would've cause the layout test changes the bot is still seeing. Keeping an eye on it...
Brady Eidson
Comment 16 2019-12-12 22:28:55 PST
(In reply to Sam Weinig from comment #5) > Comment on attachment 385510 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=385510&action=review > > > Source/WebCore/bindings/js/ScriptController.cpp:115 > > +ValueAndException ScriptController::evaluateInWorld(const ScriptSourceCode& sourceCode, DOMWrapperWorld& world) > > It feels like this should return something called ValueOrException (which > makes me wonder if the existing ExceptionOr<> class could be used here), > since it looks like when an exception is thrown, the value is set to { }. Sorry I missed this earlier. The context missing from this standalone is that this is a precursor to a much larger patch that engrains ValueAndException(Details) in a callback. > ...or just using Expected<JSC::JSValue, ExceptionDetails> What is this even. Looking it up now.
Brady Eidson
Comment 17 2019-12-12 22:39:02 PST
(In reply to Brady Eidson from comment #16) > (In reply to Sam Weinig from comment #5) > > > ...or just using Expected<JSC::JSValue, ExceptionDetails> > > What is this even. > > Looking it up now. Never seen it before. Can use. 👍
Brady Eidson
Comment 18 2019-12-12 23:59:41 PST
Brady Eidson
Comment 19 2019-12-13 15:28:40 PST
Brady Eidson
Comment 20 2019-12-13 16:15:05 PST
WebKit Commit Bot
Comment 21 2019-12-13 19:12:19 PST
Comment on attachment 385653 [details] Patch Clearing flags on attachment: 385653 Committed r253519: <https://trac.webkit.org/changeset/253519>
WebKit Commit Bot
Comment 22 2019-12-13 19:12:21 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 23 2019-12-13 19:13:24 PST
Note You need to log in before you can comment on or make changes to this bug.