WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
29835
Clarify usage of functions related to sudden termination
https://bugs.webkit.org/show_bug.cgi?id=29835
Summary
Clarify usage of functions related to sudden termination
Evan Stade
Reported
2009-09-28 17:04:00 PDT
Created
attachment 40272
[details]
sudden bug found by Darin Fisher.
Attachments
sudden
(3.71 KB, patch)
2009-09-28 17:04 PDT
,
Evan Stade
darin
: review-
Details
Formatted Diff
Diff
comment
(1.01 KB, patch)
2009-09-28 17:52 PDT
,
Evan Stade
darin
: review+
eric
: commit-queue-
Details
Formatted Diff
Diff
updated comment
(3.71 KB, patch)
2009-10-19 18:55 PDT
,
Evan Stade
estade
: review+
Details
Formatted Diff
Diff
updated comment (correct .diff)
(1.06 KB, patch)
2009-10-19 18:57 PDT
,
Evan Stade
abarth
: review+
abarth
: commit-queue+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2009-09-28 17:12:53 PDT
Comment on
attachment 40272
[details]
sudden This change isn't needed on the normal Mac OS X version of WebKit. That's because you can make multiple calls to disableSuddenTermination and enableSuddenTermination, and only when you have balanced each disableSuddenTermination call with an enableSuddenTermination call will it do anything. I don't see any reason to merge together the before-unload set's disableSuddenTermination call with the plain-old-unload set's disableSuddenTermination. Maybe there's a bug here, but this big a change is not needed to fix it.
Evan Stade
Comment 2
2009-09-28 17:29:41 PDT
I see. So the bug is only in chromium then, because it takes {enable,disable}SuddenTermination to mean what the name says, that is, enable enables and does not just add to a counter. Mac and Chromium are the only two platforms that actually use this right now, but this mistake seems likely to crop up again as other platforms implement it. Perhaps documentation ought to be added to SuddenTermination.h.
Darin Adler
Comment 3
2009-09-28 17:32:05 PDT
OK. SuddenTermination.h is designed to be a light wrapper around Mac OS X’s sudden termination API. The documentation for that is here:
http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSProcessInfo_Class/Reference/Reference.html
If you'd like to add comments to SuddenTermination.h to make that more clear, I'd be happy to review the patch.
Evan Stade
Comment 4
2009-09-28 17:52:51 PDT
Created
attachment 40275
[details]
comment instead just add comments to SuddenTermination.h
Darin Adler
Comment 5
2009-09-29 11:22:52 PDT
Comment on
attachment 40275
[details]
comment The name is Mac OS X, not MacOSX. I think the description makes things a bit more obscure than necessary. The idea is that you call disableSuddenTermination first, then balance it with a call to enableSuddenTermination. It's a programming error to call enableSuddenTermination more times than you called disableSuddenTermination. But it's good to have a comment. Comment seems OK to land as-is, but it would be even better to fix either of these things mentioned above.
Eric Seidel (no email)
Comment 6
2009-09-29 14:14:17 PDT
Comment on
attachment 40275
[details]
comment Given that Darin suggested additional changes, marking this cq-. If you'd like to make some of those changes you can re-post this with r?/cq? for automatic commit. Otherwise someone can commit this manually and make the desired comment tweeks.
Evan Stade
Comment 7
2009-10-19 11:59:56 PDT
sorry I have been slow at fixing this up. I will get around to it today.
Evan Stade
Comment 8
2009-10-19 18:55:56 PDT
Created
attachment 41468
[details]
updated comment
Evan Stade
Comment 9
2009-10-19 18:57:13 PDT
Created
attachment 41469
[details]
updated comment (correct .diff) uploaded wrong patch
Adam Barth
Comment 10
2009-10-19 21:29:14 PDT
Committed
r49836
: <
http://trac.webkit.org/changeset/49836
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug