Fix CMake compile error and add correct null check
Created attachment 263961 [details] Patch
Comment on attachment 263961 [details] Patch Clearing flags on attachment: 263961 Committed r191528: <http://trac.webkit.org/changeset/191528>
All reviewed patches have been landed. Closing bug.
Comment on attachment 263961 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=263961&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:3217 > - typeof(updateBlock) updateBlockCopy = nil; > + void (^updateBlockCopy)(void) = nil; How is this a “CMake” compile error? Since CMake is not a C compiler, I don’t understand how using CMake causes this to be a compile error when it’s not an error without CMake. Is CMake passing different options to clang? Also, I suggest using auto instead of what we did here.
(In reply to comment #4) > Comment on attachment 263961 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=263961&action=review > > > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:3217 > > - typeof(updateBlock) updateBlockCopy = nil; > > + void (^updateBlockCopy)(void) = nil; > > How is this a “CMake” compile error? Since CMake is not a C compiler, I > don’t understand how using CMake causes this to be a compile error when it’s > not an error without CMake. Is CMake passing different options to clang? Yes, CMake is currently passing different compile flags, and I'm not sure why this doesn't compile, but with typeof(updateBlock) as the variable type it has unrecognized identifier syntax errors. > > Also, I suggest using auto instead of what we did here. Good idea!