Bug 206537 - DLLLauncherMain print to console instead of opening window on fatal error
Summary: DLLLauncherMain print to console instead of opening window on fatal error
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-21 08:30 PST by me
Modified: 2020-04-05 23:03 PDT (History)
12 users (show)

See Also:


Attachments
Patch (4.39 KB, patch)
2020-01-21 08:30 PST, me
no flags Details | Formatted Diff | Diff
Patch (1.44 KB, patch)
2020-01-21 08:37 PST, me
no flags Details | Formatted Diff | Diff
Patch (1.44 KB, patch)
2020-01-21 08:40 PST, me
no flags Details | Formatted Diff | Diff
Patch (1.64 KB, patch)
2020-01-21 08:48 PST, me
no flags Details | Formatted Diff | Diff
Patch (1.46 KB, patch)
2020-01-21 08:59 PST, me
no flags Details | Formatted Diff | Diff
Patch (2.80 KB, patch)
2020-04-05 22:16 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description me 2020-01-21 08:30:32 PST
DLLLauncherMain print to console instead of opening window on fatal error
Comment 1 me 2020-01-21 08:30:53 PST
Created attachment 388299 [details]
Patch
Comment 2 me 2020-01-21 08:37:00 PST
Created attachment 388300 [details]
Patch
Comment 3 me 2020-01-21 08:40:25 PST
Created attachment 388303 [details]
Patch
Comment 4 me 2020-01-21 08:48:52 PST
Created attachment 388304 [details]
Patch
Comment 5 me 2020-01-21 08:59:35 PST
Created attachment 388305 [details]
Patch
Comment 6 Ross Kirsling 2020-01-21 14:12:55 PST
Comment on attachment 388305 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=388305&action=review

Nice! I hadn't thought of this approach.

Can you also apply this change to the other copy of DLLLauncherMain (which we use for all executables other than JSC shell)?
https://github.com/WebKit/webkit/blob/master/Tools/win/DLLLauncher/DLLLauncherMain.cpp

> Source/JavaScriptCore/shell/DLLLauncherMain.cpp:113
> +    fprintf(stderr, "%s %s\n", caption.c_str(), message.c_str());

Our Windows code uses wide-character strings, so let's do this:

    fwprintf(stderr, L"%s\n%s\n", caption.c_str(), message.c_str());

> Source/JavaScriptCore/shell/DLLLauncherMain.cpp:114
> +    exit(1);

This shouldn't be necessary; whatever is calling this should just exit with the returned 1.
Comment 7 Alex Christensen 2020-01-21 14:38:58 PST
Comment on attachment 388305 [details]
Patch

I like this too, but r- to address Ross's comments.
Comment 8 Ross Kirsling 2020-04-05 22:16:20 PDT
Created attachment 395544 [details]
Patch
Comment 9 EWS 2020-04-05 23:02:12 PDT
Committed r259565: <https://trac.webkit.org/changeset/259565>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 395544 [details].
Comment 10 Radar WebKit Bug Importer 2020-04-05 23:03:15 PDT
<rdar://problem/61330298>