Bug 40816

Summary: WebKit API: Undo static hooks into V8 when WebKit is shut down
Product: WebKit Reporter: Aaron Boodman <aa>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: andersca, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
Patch abarth: review-

Description Aaron Boodman 2010-06-18 01:30:50 PDT
V8DOMWindowShell lazily sets static hooks in V8 that call back into WebCore. WebKit::shutdown() should clear these, so that V8 doesn't crash if it continues being used after that time.
Comment 1 Aaron Boodman 2010-06-18 01:39:26 PDT
Created attachment 59082 [details]
Patch
Comment 2 Darin Fisher (:fishd, Google) 2010-06-18 11:23:11 PDT
I'm concerned that the pattern of shutting down WebKit and re-initializing it is going to be hard to support in the future since no other port requires it.  It will be fragile to support.  We don't need it for Chrome.  We only need it because our unit_tests are constructed to initialize, shutdown, and re-initialize WebKit.  Perhaps our unit_tests should change instead.  Note that webkit_unit_tests initializes WebKit once for the entire process.  That is the only currently supported usage.

I notice that the comments in WebKit.h do not make this clear, and the implementation of WebKit::initialize does not assert that initialization is a one-time deal.  It probably should have had such a check to prevent abuse.
Comment 3 Aaron Boodman 2010-06-18 13:14:23 PDT
Ok, thanks. I will track down the paths that are causing initialization in Chrome's unit tests.
Comment 4 Aaron Boodman 2010-06-18 23:54:46 PDT
Committed r61466: <http://trac.webkit.org/changeset/61466>
Comment 5 Aaron Boodman 2010-06-19 00:06:04 PDT
Reverted r61466 for reason:

Landed wrong change

Committed r61467: <http://trac.webkit.org/changeset/61467>
Comment 6 Adam Barth 2010-06-19 16:51:06 PDT
Comment on attachment 59082 [details]
Patch

As discussed on chromium-dev, I think our current plan is to make the unit tests not assume they can restart WebKit.
Comment 7 Anders Carlsson 2013-05-02 11:46:26 PDT
V8 is gone from WebKit.