Bug 138500

Summary: WTR crashes after running a test when NetworkProcess enabled
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, buildbot, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 138428    
Attachments:
Description Flags
Patch ap: review+

Description Carlos Garcia Campos 2014-11-07 02:29:45 PST
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff53b0b38 in WebKit::WebNotificationManagerProxy::initializeProvider(WKNotificationProviderBase const*) ()
   from WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
(gdb) bt
#0  0x00007ffff53b0b38 in WebKit::WebNotificationManagerProxy::initializeProvider(WKNotificationProviderBase const*) ()
   from WebKitBuild/Release/lib/libwebkit2gtk-4.0.so.37
#1  0x0000000000418476 in WTR::WebNotificationProvider::~WebNotificationProvider() ()
#2  0x000000000040fc33 in WTR::TestController::~TestController() ()
#3  0x000000000040c250 in main ()

I don't know why it only happens with the network process enabled, though. The thing is that WebNotificationProvider destructor is calling WKNotificationManagerSetProvider, but m_notificationManager is null because removeNotificationManager was already called.
Comment 1 Carlos Garcia Campos 2014-11-07 02:33:01 PST
Created attachment 241170 [details]
Patch
Comment 2 Alexey Proskuryakov 2014-11-07 16:48:08 PST
Comment on attachment 241170 [details]
Patch

This seems OK to do.

The difference is that on Mac, WebContext is destroyed after WebNotificationProvider, so removeNotificationManager is never called.
Comment 3 Carlos Garcia Campos 2014-11-08 02:47:13 PST
Committed r175774: <http://trac.webkit.org/changeset/175774>