[ Windows ] More Windows test gardening to get bots green.

* platform/win/TestExpectations:
* platform/win/fast/dom/navigator-detached-no-crash-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Back to 2 child processes for NRWT on Windows.
* Scripts/webkitpy/port/win.py:
(WinPort.default_child_processes):
Changing the number of processes to 1 did not have an effect on the layout test results.
It does introduce an issue with one of the workers hanging indefinitely and causing the 
layout tests to timeout as a whole occasionally, but we should just fix that.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174120 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r174025): Invalid cast in JSC::asString
https://bugs.webkit.org/show_bug.cgi?id=137224

Reviewed by Geoffrey Garen.
        
Store barrier elision in fixup depends on checking the type of the value being stored. It's very important that
when we speak of "the value being stored" we are really referring to the right value.
        
The bug here was that the PutClosureVar case was assuming that child2 is the value being stored. It's actually
child3. So we were incorrectly removing all barriers from PutClosureVar.

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Label some asserts as having security implications.
<https://webkit.org/b/137260>

Reviewed by Filip Pizlo.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::handleAssertionFailure):
* runtime/JSCell.h:
(JSC::jsCast):
* runtime/StructureIDTable.h:
(JSC::StructureIDTable::get):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
It should be fun and easy to run every possible JavaScript benchmark from the command line
https://bugs.webkit.org/show_bug.cgi?id=137245

Reviewed by Oliver Hunt.
        
PerformanceTests:

This adds the scaffolding for running Octane version 2 inside run-jsc-benchmarks.
In the future we should just land Octane2 in this directory, and run-jsc-benchmarks
should be changed to point directly at this directory instead of requiring the
Octane path to be configured as part of the configuration file.

* Octane: Added.
* Octane/wrappers: Added.
* Octane/wrappers/jsc-box2d.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-boyer.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-closure.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-decrypt.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-deltablue.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-earley.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-encrypt.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-gbemu.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-jquery.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-mandreel.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-navier-stokes.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-pdfjs.js: Added.
(jscSetUp.PdfJS_window.console.log):
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-raytrace.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-regexp.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-richards.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-splay.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-typescript.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):
* Octane/wrappers/jsc-zlib.js: Added.
(jscSetUp):
(jscTearDown):
(jscRun):

Tools:

We previously had Tools/Scripts/bencher.  Then we stopped adding things to it because we
weren't sure about the licensing of things like Kraken and Octane.  Various people ended up
having their own private scripts for doing benchmark runs, and didn't share them in the open
source community, because of fears about the shady licensing of the benchmarks suites that
they were running. The dominant version of this was "run-jsc-benchmarks", which has a lot of
excellent power - it can run benchmarks through either jsc, DumpRenferTree, or
WebKitTestRunner; it can run tests on any number of remote machines; and it has inside
knowledge about how to run *a lot* of test suites. Many of those test suites are not public,
but some of them are. The non-public tests are exclusively those that were not made by any
WebKit contributor, but which JSC/WebKit devs found useful for testing.

This fixes this weirdness by releasing run-jsc-benchmarks. The paths to the test suites
whose licenses are incompatible with WebKit's (to the extent that they cannot be safely
checked into WebKit svn at all) can be run by passing the path to them via a configuration
file. The default configuration file is ~/.run-jsc-benchmarks. The most important benchmark
suites are Octane version 2 and Kraken version 1.1. We should probably check Octane 2 into
WebKit eventually because it seems that the license is fine. Kraken, on the other hand, will
probably never be checked in because there is no license text anywhere in that benchmark.
A valid ~/.run-jsc-benchmarks file will just be something like:
        
    {
        "OctanePath": "/path/to/Octane2",
        "KrakenPath": "/path/to/Kraken-1.1/tests/kraken-1.1"
    }
        
If your ~/.run-jsc-benchmarks file omits the directory for any particular test suite, then
run-jsc-benchmarks will just gracefully avoid running that test suite.
        
Finally, a word about policy: it is understood that different organizations that do
development on JSC may find themselves having internal benchmarks that they cannot share
because of weird licensing. It happens - usually because the organization doing JSC
development found some test in the wild that is owned by someone else and therefore cannot
be shared. So, we should consider it acceptable to write patches against run-jsc-benchmarks
that add support for some new kind of benchmark suite even if the suite is not made public
as part of the same patch - so long as the patch isn't too invasive. An example of
non-invasiveness is the DSPJS suite, which is implemented using some new classes (like
DSPJSAmmoJSRegularBenchmark) and some calls to otherwise reusable functions (like
emitSelfContainedBenchRunCode). It is obviously super helpful if a benchmark suite can be
completely open-sourced and committed to the WebKit repo - but the reality is that this
can't always be done safely.

* Scripts/bencher: Removed.
* Scripts/run-jsc-benchmarks: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows EWS went purple when it failed to build
https://bugs.webkit.org/show_bug.cgi?id=137267

Reviewed by Ryosuke Niwa.

* QueueStatusServer/app.yaml: Update the version.

* QueueStatusServer/model/attachment.py: (Attachment._calculate_queue_positions):
Make it work for style and win-ews queues.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Generalize is<>() / downcast<>() support to all types
https://bugs.webkit.org/show_bug.cgi?id=137243

Reviewed by Benjamin Poulain.

Generalize is<>() / downcast<>() support to all types, not just Nodes.
Source/WebCore:

To achieve this, the following changes were made:
- Move is<> / downcast<>() and NodeTypeCastTraits from Node.h to a new
  wtf/TypeCasts.h header. Also move them to WTF namespace instead of
  WebCore namespace as they can be used for classes in other namespaces
  (e.g. WebKit namespace).
- Rename NodeTypeCastsTraits to TypeCastTraits as it can be specialized
  for non-Nodes.
- Since C++ does not allow template specializations in different
  namespaces, I had to move all the SPECIALIZE_TYPE_TRAITS_*() uses to
  the global scope and use the WebCore:: namespace explicitly in those.
  This is a bit unfortunate but I couldn't find a better way.

This patch also takes care of supporting is<>() / downcast<>() for
the WorkerGlobalScope class, which does not derive from Node.

No new tests, no behavior change.

* Modules/indexeddb/IDBFactory.cpp:
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
* Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::toJSDOMGlobalObject):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::execute):
* dom/Attr.h:
(isType):
(WebCore::isAttr): Deleted.
* dom/CDATASection.h:
(isType):
(WebCore::isCDATASection): Deleted.
* dom/CharacterData.h:
(isType):
(WebCore::isCharacterData): Deleted.
* dom/Comment.h:
(isType):
(WebCore::isComment): Deleted.
* dom/Document.h:
(isType):
(WebCore::isDocument): Deleted.
* dom/DocumentFragment.h:
(isType):
(WebCore::isDocumentFragment): Deleted.
* dom/DocumentType.h:
(isType):
(WebCore::isDocumentType): Deleted.
* dom/Element.h:
* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
* dom/Node.h:
(WebCore::is): Deleted.
(WebCore::downcast): Deleted.
* dom/ProcessingInstruction.h:
(isType):
(WebCore::isProcessingInstruction): Deleted.
* dom/PseudoElement.h:
(isType):
(WebCore::isPseudoElement): Deleted.
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::createdMessagePort):
(WebCore::ScriptExecutionContext::destroyedMessagePort):
(WebCore::ScriptExecutionContext::vm):
* dom/ScriptExecutionContext.h:
* dom/ShadowRoot.h:
(isType):
(WebCore::isShadowRoot): Deleted.
* dom/StyledElement.h:
(isType):
(WebCore::isStyledElement): Deleted.
* dom/Text.h:
(isType):
(WebCore::isText): Deleted.
* dom/make_names.pl:
(printTypeHelpers):
(printTypeHelpersHeaderFile):
* html/HTMLDocument.h:
(isType):
(WebCore::isHTMLDocument): Deleted.
* html/HTMLElement.h:
(isType):
(WebCore::isHTMLElement): Deleted.
* html/HTMLFormControlElement.h:
(isType):
(WebCore::isHTMLFormControlElement): Deleted.
* html/HTMLFrameElementBase.h:
(isType):
(WebCore::isHTMLFrameElementBase): Deleted.
* html/HTMLFrameOwnerElement.h:
(isType):
(WebCore::isHTMLFrameOwnerElement): Deleted.
* html/HTMLMediaElement.h:
(isType):
(WebCore::isHTMLMediaElement): Deleted.
* html/HTMLPlugInElement.h:
(isType):
(WebCore::isHTMLPlugInElement): Deleted.
* html/HTMLPlugInImageElement.h:
(isType):
(WebCore::isHTMLPlugInImageElement): Deleted.
* html/HTMLTableCellElement.h:
(isType):
(WebCore::isHTMLTableCellElement): Deleted.
* html/HTMLTableSectionElement.h:
(isType):
(WebCore::isHTMLTableSectionElement): Deleted.
* html/HTMLTextFormControlElement.h:
(isType):
(WebCore::isHTMLTextFormControlElement): Deleted.
* html/ImageDocument.h:
(isType):
(WebCore::isImageDocument): Deleted.
* html/LabelableElement.h:
(isType):
(WebCore::isLabelableElement): Deleted.
* html/MediaDocument.h:
(isType):
(WebCore::isMediaDocument): Deleted.
* html/PluginDocument.h:
(isType):
(WebCore::isPluginDocument): Deleted.
* html/shadow/InsertionPoint.h:
(isType):
(WebCore::isInsertionPoint): Deleted.
* html/shadow/TextControlInnerElements.h:
(isType):
(WebCore::isTextControlInnerTextElement): Deleted.
* html/track/WebVTTElement.h:
(isType):
(WebCore::isWebVTTElement): Deleted.
* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
(WebCore::ThreadableLoader::loadResourceSynchronously):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::removeRequestFromCache):
(WebCore::MemoryCache::removeRequestFromSessionCaches):
* mathml/MathMLElement.h:
(isType):
(WebCore::isMathMLElement): Deleted.
* svg/SVGAnimateElementBase.h:
(isType):
(WebCore::isSVGAnimateElementBase): Deleted.
* svg/SVGDocument.h:
(isType):
(WebCore::isSVGDocument): Deleted.
* svg/SVGElement.h:
(isType):
(WebCore::isSVGElement): Deleted.
* svg/SVGFilterPrimitiveStandardAttributes.h:
(isType):
(WebCore::isSVGFilterPrimitiveStandardAttributes): Deleted.
* svg/SVGGradientElement.h:
(isType):
(WebCore::isSVGGradientElement): Deleted.
* svg/SVGGraphicsElement.h:
(isType):
(WebCore::isSVGGraphicsElement): Deleted.
* svg/SVGPolyElement.h:
(isType):
(WebCore::isSVGPolyElement): Deleted.
* svg/SVGTextContentElement.h:
(isType):
(WebCore::isSVGTextContentElement): Deleted.
* svg/animation/SVGSMILElement.h:
(isType):
(WebCore::isSVGSMILElement): Deleted.
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::close):
* workers/WorkerGlobalScope.h:
(isType):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
(WebCore::WorkerMessagingProxy::notifyNetworkStateChange):
(WebCore::WorkerMessagingProxy::connectToInspector):
(WebCore::WorkerMessagingProxy::disconnectFromInspector):
(WebCore::WorkerMessagingProxy::sendMessageToInspector):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::stop):

Source/WebKit/win:

* DOMCoreClasses.cpp:
(DOMElement::createInstance):

Source/WebKit2:

* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
(-[WKDOMDocument createElement:]):
(-[WKDOMDocument createTextNode:]):
(-[WKDOMDocument body]):
* WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
(-[WKDOMText data]):
(-[WKDOMText setData:]):

Source/WTF:

* wtf/Assertions.h:
* wtf/TypeCasts.h: Added.
(WTF::is):
(WTF::downcast):


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