JSON generation on new flakiness dashboard is still too slow
https://bugs.webkit.org/show_bug.cgi?id=123776

Reviewed by Mark Rowe.

* init-database.sql: Added a constraint that result is unique for each (build, test) pair.

* public/include/test-results.php:
(ResultsJSONGenerator::generate): Don't sort results by latest_revision_time since that's done
in the client side anyway.
(update_flakiness_for_build): Don't update is_flaky flag if it's already set to the right value.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Build fix. Update is_flaky when it's NULL.

* public/include/test-results.php:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Make opening/establishing a database asynchronous.
https://bugs.webkit.org/show_bug.cgi?id=123775

Reviewed by Andreas Kling.

No new tests (No behavior change for a tested port).

* Modules/indexeddb/IDBBackingStoreInterface.h: Add getOrEstablishIDBDatabaseMetadata with a callback,
  removing getIDBDatabaseMetaData, getObjectStores, and createIDBDatabaseMetaData in the process.

* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata): Adapted from getIDBDatabaseMetaData,
  implement the asynchronous interface in terms of other LevelDB methods, always calling back synchronously.
(WebCore::IDBBackingStoreLevelDB::createIDBDatabaseMetaData):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::create):
(WebCore::IDBDatabaseBackendImpl::openInternalAsync): Broken off from openInternal.
(WebCore::IDBDatabaseBackendImpl::didOpenInternalAsync): Broken off from openInternal.
(WebCore::IDBDatabaseBackendImpl::processPendingCalls):
(WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls): Broken off to allow didOpenInternalAsync
  to perform open callbacks in the failure case.
(WebCore::IDBDatabaseBackendImpl::openConnection): Always queue open connection calls, then immediately processPendingCalls.
(WebCore::IDBDatabaseBackendImpl::openConnectionInternal): Actually perform open connection calls.
* Modules/indexeddb/IDBDatabaseBackendImpl.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Address review feedback I forgot to commit in r158641

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::processPendingOpenCalls):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Running FTL tests shouldn't reduce coverage on DFG tests
https://bugs.webkit.org/show_bug.cgi?id=123780

Reviewed by Geoffrey Garen.

* Scripts/run-jsc-stress-tests:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG CheckArray(String) should just be a Phantom(String:)
https://bugs.webkit.org/show_bug.cgi?id=123779

Reviewed by Geoffrey Garen.
        
This should be a speed-up since Phantom(String:) is smart enough to use the string
structure. It should also be a simplification since CheckArray(String) was totally
redundant.
        
Also FixupPhase was assuming that it may see CheckArray's. That's wrong. It can
create CheckArray's but it won't see them as input since no previous phase can
create them.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::checkArray):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::checkArray):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Modules/indexeddb/leveldb to the WebCore.xcodeproj

Rubberstamped by Andreas Kling.

This will make hacking on IDB much easier for Mac developers as they won’t have
to constantly add and then subtract the leveldb subdirectory.

The USE(LEVELDB) flag is still disabled so these files won’t actually build by default.

* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
internal-js-tests.yaml/Octane/stress-tests/pdfjs.js.default: ASSERTION FAILED: m_state.forNode(child).m_futurePossibleStructure.isSubsetOf(StructureSet(structure)) at DFGConstantFoldingPhase.cpp:249
https://bugs.webkit.org/show_bug.cgi?id=123778

Reviewed by Geoffrey Garen.
        
This assertion was just wrong: ee do an execute() above the assertion. The assertion
is asserting that if we need a watchpoint (i.e. the best proven structure was not the
current structure) then it must be the future possible structure.  But while that may
have been true before execute(), it won't be true after if the PutById was a
transition. Of course, this can only happen in the concurrent JIT in which case the
code would be invalidated anyway since we would only transform the code in a way that
leveraged the lack of a transition if we inserted a watchpoint, in which case we
would realize that the watchpoint had been fired during compilation.
        
Since this requires concurrent JIT awesomeness, I don't know how to test it.

* dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158646 268f45cc-cd09-0410-ab3c-d52691b4dbfc