Fix sporadic crash in the RequestInterruptTestWithNativeAccessor.
authorvegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Dec 2013 14:07:19 +0000 (14:07 +0000)
committervegorov@chromium.org <vegorov@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 20 Dec 2013 14:07:19 +0000 (14:07 +0000)
commit79ad8bf2e015390dd869f0ca4ed1e999db170c38
tree97d5806774affd83733c3da79cd73c18112a6cea
parente84e2abde236c2487c97b6e501bce107cab5430d
Fix sporadic crash in the RequestInterruptTestWithNativeAccessor.

The test was broken. V8 currently does not correctly lookup NativeDataProperty accessors attached to the PrototypeTemplate of FunctionTemplate (Issue 3066). As the result while(obj.shouldContinue) loop was immediately exiting and the test would terminate while RequestInterruptTestBase::InterruptThread would be still starting up. As the result later InterruptThread would try to access members of the test object which was destroyed.

The test was fixed:

- instead of attaching accessor to PrototypeTemplate we attach it to  InstanceTemplate;
- an assertion was added to verify that we completed the test successfully due to interruptor firing not due to sporadic loop termination due to some unrelated bug.

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/109653010

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
test/cctest/test-api.cc