On Sep 10, 2009, at 9:04 AM, Kent Hansen wrote:
JavaScriptCore uses some compile-time defines to decide which flags to pass to vm_map() and mmap(), depending on the Mac OS version. Now, if WebKit is built and run on the same version, that's obviously fine, but we've found that if we build on Tiger but run on Leopard, the vm_map() call fails.
That's right. There are many places where WebKit makes compile time assumptions about Tiger vs. Leopard vs. Snow Leopard.
Can/should the decision of which flags to pass be made at runtime instead?
This is only one of the many different places you'll have to add more logic and runtime checks to WebKit if you want to build a single binary that works well on Tiger, Leopard, and Snow Leopard. Doing that project will be quite challenging!
Adding runtime checks would be OK, but the main version of WebKit, built for Mac OS X, should not have such runtime checks. So you'll have to figure out an appropriate way to do the #if so that we don't add unnecessary runtime overhead to the standard Mac OS X WebKit.
-- Darin _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev