Currently two IndexedDB tests fail when run on JSC because they depend upon event listener behavior which differs between V8 and JSC. V8 sets window.event for all event listeners to the current event and resets this variable to its previous state once the event listener has returned. In JSC by contrast, once window.event is overridden in user code, the user-defined definition persists and will not be reset when calling subsequent event listeners. Two tests, storage/indexeddb/cursor-advance.html and storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html, set window.event and then depend upon the value of this variable to be reset in a subsequent event handler. These tests should be modified to work on JSC.
Created attachment 182477 [details] Patch
The preamble(evt) pattern is used so that the tests will run in both a window context and in a worker context - workers don't set a global event property. We don't yet have HTML files for running them all in worker contexts, so this patch probably won't fail EWS but we'd like to keep (or update) that pattern. Agreed that the tests should be updated, but we'll need to decide what to do for these tests in Workers. (I'll be able to look more closely on Monday.)
Created attachment 182821 [details] Patch
I attached a different approach (that Michael and I discussed on IRC) that uses preamble(evt) consistently. This has the happy side effect of making the tests run in workers, so I added the *-workers.html wrappers for these. Michael - can you confirm that these work in your in-progress port?
Created attachment 182826 [details] Patch
Oops, one more try. Thanks Michael! If Michael gives this the thumbs up, tony@ can you r?
(In reply to comment #6) > Oops, one more try. Thanks Michael! > > If Michael gives this the thumbs up, tony@ can you r? This change looks good to me. The tests pass in WebKitGTK+.
Comment on attachment 182826 [details] Patch Thanks, tony@ !
Comment on attachment 182826 [details] Patch Clearing flags on attachment: 182826 Committed r139793: <http://trac.webkit.org/changeset/139793>
All reviewed patches have been landed. Closing bug.