Comment #35 on issue 1945 by [email protected]: call SetTime(0,0,0,0) and throws "this is not a Date object." if Date() object has been subclassed
http://code.google.com/p/v8/issues/detail?id=1945
@#34: Knowing what the problem was, I don't see how your "hotfix" can possibly work around the issue. The problem was *not* that "new Date()" would return broken Date objects. The problem was that due to a small bug in the register allocator, it could happen that the optimizing compiler would generate wrong code for the typecheck inside most of the built-in methods of Date objects once it decided to optimized these functions. So no matter how many new Date objects you'd construct, .setHours(...) (and .setTime and .setYear and so on) would simply refuse to work on them. In consequence, the only effect your ping-pong code could possibly have is to create an endless loop. I strongly recommend not to use this, as per comment #33 a proper fix is on its way anyway and will be in the next updates for Chrome 17 (look for V8 v3.7.12.23) and 18 (V8 v3.8.9.7). In the meantime, possible workarounds are: (1) use Chrome on Linux or MacOS, (2) use an older version of Chrome (<=M16), (3) start Chrome with --js-flags="--nocrankshaft" (will be noticably slower, but this particular issue will not occur).
-- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
