Re: [webkit-dev] Checking allocation failures [was: Re: Naked new considered harmful]

2010-08-26 Thread Mike Marchywka
this reminds me that I've always been wondering about checks for allocation failure in WebCore (versus concerns about leaks). A plain call to new may throw an std::bad_alloc exception. If this is not considered, it may leave objects in an invalid state, even when using objects such

Re: [webkit-dev] WebKitTools/Script/generate-coverage-data

2010-08-26 Thread Holger Freyther
On 08/24/2010 12:46 PM, Holger Freyther wrote: On 08/24/2010 01:38 AM, Eric Seidel wrote: Has anyone looked at our coverage-generating scripts in a while? Sorry, I didn't. You are trying to use them on OSX? I think I can find some time at the end of the week to make them work again. Can you

Re: [webkit-dev] Throwing SECURITY_ERR on cross-origin window.location property accesses

2010-08-26 Thread Geoffrey Garen
(1) we can't access the value at all because the browser prevents the actual reading of the value since window.top is different-origin so it comes back empty string, Isn't empty string sufficient to indicate lack of access? What unique information does an exception provide? and even if we

[webkit-dev] style question for empty for loops

2010-08-26 Thread Chris Fleizach
Which is preferred? for (...; ...; ...) { } or for (...; ...; ...) { }___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread David Levin
Option 1 Seems in keeping with what is done for constructors/functions w/o bodies, so for consistency, I think it it preferable. On Thu, Aug 26, 2010 at 11:35 AM, Chris Fleizach cfleiz...@apple.comwrote: Which is preferred? for (...; ...; ...) { } or for (...; ...; ...) { }

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread Darin Adler
On Aug 26, 2010, at 11:35 AM, Chris Fleizach wrote: for (...; ...; ...) { } This seems OK. for (...; ...; ...) { } The above is definitely not allowed, because braces go on the line with the for. The other possibilities are: C) for (...) ; D) for (...) {

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread Nico Weber
On Thu, Aug 26, 2010 at 11:49 AM, Darin Adler da...@apple.com wrote: On Aug 26, 2010, at 11:35 AM, Chris Fleizach wrote:     for (...; ...; ...) { } This seems OK.     for (...; ...; ...)     { } The above is definitely not allowed, because braces go on the line with the for. The

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread Darin Adler
On Aug 26, 2010, at 12:11 PM, Nico Weber wrote: FWIW, clang warns about (C) but doesn't warn about the others (at least on high warning levels). Seems like a good reason not to use (C). -- Darin ___ webkit-dev mailing list

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread Chris Fleizach
On 26. aug. 2010, at 11.49, Darin Adler wrote: On Aug 26, 2010, at 11:35 AM, Chris Fleizach wrote: for (...; ...; ...) { } So maybe this is the best option. I can add a style guide check for that, unless there are objections ___ webkit-dev

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread James Robinson
The style guide currently covers this http://webkit.org/coding/coding-style.html: 4. Control clauses without a body should use empty braces:Right: for ( ; current; current = current-next) { } Wrong: for ( ; current; current = current-next); - James On Thu, Aug 26, 2010 at 12:22 PM, Chris

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread Chris Fleizach
webkit-check-style should probably be amended as well On Aug 26, 2010, at 12:48 PM, James Robinson wrote: The style guide currently covers this http://webkit.org/coding/coding-style.html: 4. Control clauses without a body should use empty braces: Right: for ( ; current; current =

Re: [webkit-dev] style question for empty for loops

2010-08-26 Thread David Levin
On Thu, Aug 26, 2010 at 1:12 PM, Chris Fleizach cfleiz...@apple.com wrote: webkit-check-style should probably be amended as well Please file a bug. Feel free to cc ham...@chromium.org, le...@chromium.org, cjerdo...@webkit.org On Aug 26, 2010, at 12:48 PM, James Robinson wrote: The