[CSS Grid Layout] Make resolveContentBasedTrackSizingFunctionsForItems reuse distributeSpaceToTracks
https://bugs.webkit.org/show_bug.cgi?id=108110

Reviewed by Tony Chang.

This change makes us match more closely the specification by reusing distributeSpaceToTracks inside
resolveContentBasedTrackSizingFunctionsForItems. This also removes some existing code duplication.

Refactoring covered by existing tests.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
Updated after distributeSpaceToTracks new arguments. Copying the tracks to a Vector<GridTrack*> is
now done here.

(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
Removed code duplication and switched to using distributeSpaceToTracks.

(WebCore::RenderGrid::distributeSpaceToTracks):
Refactored distributeSpaceToTracks to implement the distribution of any extra space above max breadth
as it was required to pass the tests (required to properly handling min-content > max). Also changed
the arguments of the function to better match the intent of the function.

* rendering/RenderGrid.h: Updated distributeSpaceToTracks's arguments.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141163 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Temporarily disable inspector tests. 
They are all timing out due to some configuration problem on the bots.

* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Start using the message flag in MessageEncoder/MessageDecoder
https://bugs.webkit.org/show_bug.cgi?id=108227

Reviewed by Beth Dakin.

Stop using the flags in MessageID and store the flags directly in the message instead.
This is another step towards eliminating MessageID.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::SyncMessageState::processIncomingMessage):
(CoreIPC::Connection::createSyncMessageEncoder):
(CoreIPC::Connection::sendMessage):
(CoreIPC::Connection::sendSyncMessage):
(CoreIPC::Connection::sendSyncMessageFromSecondaryThread):
(CoreIPC::Connection::dispatchSyncMessage):
(CoreIPC::Connection::dispatchMessage):
* Platform/CoreIPC/Connection.h:
* Platform/CoreIPC/MessageDecoder.cpp:
(CoreIPC::MessageDecoder::MessageDecoder):
(CoreIPC::MessageDecoder::isSyncMessage):
(CoreIPC):
(CoreIPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply):
* Platform/CoreIPC/MessageDecoder.h:
(MessageDecoder):
* Platform/CoreIPC/MessageEncoder.cpp:
(CoreIPC):
(CoreIPC::MessageEncoder::MessageEncoder):
(CoreIPC::MessageEncoder::~MessageEncoder):
(CoreIPC::MessageEncoder::setIsSyncMessage):
(CoreIPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply):
* Platform/CoreIPC/MessageEncoder.h:
(MessageEncoder):
* Platform/CoreIPC/MessageFlags.h: Copied from Source/WebKit2/Platform/CoreIPC/MessageEncoder.h.
(CoreIPC):
* Platform/CoreIPC/MessageID.h:
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change DatabaseContext lookup to be thread-safe.
https://bugs.webkit.org/show_bug.cgi?id=107784.

Reviewed by Geoffrey Garen.

DatabaseContext will no longer be a Supplement of ScriptExecutionContext.
Instead we will maintain a mutex guarded contextMap in the DatabaseManager
which maps ScriptExecutionContexts to DatabaseContexts.

Also cleaned up the shutdown mechanism of the DatabaseContext,
DatabaseThread, and Databases when their owner ScriptExecutionContext
destructs.

No new tests.

* Modules/webdatabase/AbstractDatabase.cpp:
(WebCore::AbstractDatabase::AbstractDatabase):
* Modules/webdatabase/AbstractDatabase.h:
(WebCore::AbstractDatabase::databaseContext):
(AbstractDatabase):
* Modules/webdatabase/Database.cpp:
(WebCore::Database::Database):
* Modules/webdatabase/Database.h:
(WebCore):
(Database):
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore):
(WebCore::DatabaseContext::DatabaseContext):
(WebCore::DatabaseContext::~DatabaseContext):
(WebCore::DatabaseContext::contextDestroyed):
(WebCore::DatabaseContext::stop):
(WebCore::DatabaseContext::databaseThread):
(WebCore::DatabaseContext::stopDatabases):
* Modules/webdatabase/DatabaseContext.h:
(DatabaseContext):
(WebCore::DatabaseContext::scriptExecutionContext):
(WebCore::DatabaseContext::hasOpenDatabases):
(WebCore::DatabaseContext::stopDatabases):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::manager):
(WebCore::DatabaseManager::DatabaseManager):
(WebCore::DatabaseManager::getExistingDatabaseContext):
(WebCore):
(WebCore::DatabaseManager::getDatabaseContext):
(WebCore::DatabaseManager::registerDatabaseContext):
(WebCore::DatabaseManager::unregisterDatabaseContext):
(WebCore::DatabaseManager::notifyDatabaseContextConstructed):
(WebCore::DatabaseManager::notifyDatabaseContextDestructed):
(WebCore::DatabaseManager::openDatabase):
(WebCore::DatabaseManager::openDatabaseSync):
(WebCore::DatabaseManager::hasOpenDatabases):
(WebCore::DatabaseManager::stopDatabases):
(WebCore::DatabaseManager::interruptAllDatabasesForContext):
* Modules/webdatabase/DatabaseManager.h:
(WebCore):
(DatabaseManager):
(WebCore::DatabaseManager::notifyDatabaseContextConstructed):
(WebCore::DatabaseManager::notifyDatabaseContextDestructed):
* Modules/webdatabase/DatabaseSync.cpp:
(WebCore::DatabaseSync::DatabaseSync):
* Modules/webdatabase/DatabaseSync.h:
(WebCore):
(DatabaseSync):
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::~DatabaseThread):
(WebCore::DatabaseThread::requestTermination):
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::canEstablishDatabase):
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::~ActiveDOMObject):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141166 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for enabling process suppression in WebProcesses with no visible pages
https://bugs.webkit.org/show_bug.cgi?id=108054

Patch by Kiran Muppala <cmuppala@apple.com> on 2013-01-29
Reviewed by Anders Carlsson.

Provide a preference to enable process suppression in WebProcesses with
no visible pages even if the application is not completely occluded.
This provides more opportunities for process suppression to take effect.

Replace the messaging of application occlusion status from UI process to
ChildProcesses with messages that indicate the current required process
suppression state.  WebProcessProxy should determine if the process is
eligible for process suppression based on both application occlusion
and page visibility.  When either of these parameters changes,
the proxy should message the child process of the updated process
suppression state.

* NetworkProcess/NetworkProcess.messages.in: Rename
SetApplicationIsOccluded to SetProcessSuppressionEnabled.
* PluginProcess/PluginProcess.messages.in: Ditto.
* Shared/ChildProcess.h:
(WebKit::ChildProcess::processSuppressionEnabled): Rename
applicationIsOccluded.
* Shared/WebPreferencesStore.h: Add a new preference
pageVisibilityBasedProcessSuppressionEnabled, to enabled/disable
process suppression of WebProcesses when all pages are hidden.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::setProcessSuppressionEnabled): Rename
setApplicationIsOccluded.
(WebKit::ChildProcess::platformInitialize): Replace call to
setApplicationIsOccluded with setProcessSuppressionEnabled.
* SharedWorkerProcess/SharedWorkerProcess.messages.in: Rename
SetApplicationIsOccluded to SetProcessSuppressionEnabled.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled):
(WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching): Use setter
to update process suppression state instead of messaging directly.
Use WebContext::canEnableProcessSuppressionForNetworkProcess() helper
method to determine if process suppression should be enabled.
* UIProcess/Network/NetworkProcessProxy.h: Rename
setApplicationIsOccluded to setProcessSuppresionEnabled.
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::setProcessSuppressionEnabled): Ditto.
* UIProcess/Plugins/PluginProcessManager.h: Ditto.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching): Use setter
to update process suppression state instead of messaging directly.
Use WebContext::canEnableProcessSuppressionForGlobalChildProcesses()
helper method to determine if process suppression should be enabled.
* UIProcess/Plugins/PluginProcessProxy.h: Rename
setApplicationIsOccluded to setProcessSuppresionEnabled.
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
(WebKit::PluginProcessManager::setProcessSuppressionEnabled): Ditto.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::setProcessSuppressionEnabled): Ditto.
* UIProcess/SharedWorkers/SharedWorkerProcessManager.h: Ditto.
* UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp:
(WebKit::SharedWorkerProcessProxy::didFinishLaunching): Use setter
to update process suppression state instead of messaging directly.
Use WebContext::canEnableProcessSuppressionForGlobalChildProcesses()
helper method to determine if process suppression should be enabled.
* UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: Rename
setApplicationIsOccluded to setProcessSuppresionEnabled.
* UIProcess/SharedWorkers/mac/SharedWorkerProcessManagerMac.mm:
(WebKit::SharedWorkerProcessManager::setProcessSuppressionEnabled):
Ditto.
* UIProcess/SharedWorkers/mac/SharedWorkerProcessProxyMac.mm:
(WebKit::SharedWorkerProcessProxy::setProcessSuppressionEnabled): Ditto.
* UIProcess/WebContext.h: Replace applicationIsOccluded() getter with
helper methods to determine if a child process can have process
suppression enabled.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange): Notify WebProcessProxy of
page visibility change.
(WebKit::WebPageProxy::preferencesDidChange): Notify WebProcessProxy of
change in preferences.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Initialize member variable
tracking process suppression state to false.
(WebKit::WebProcessProxy::createWebPage): Update set of pages which can
be process suppressed and the resulting process suppression state for
the child process.
(WebKit::WebProcessProxy::addExistingWebPage): Ditto.
(WebKit::WebProcessProxy::removeWebPage): Ditto.
(WebKit::WebProcessProxy::pageVisibilityChanged): Ditto.
(WebKit::WebProcessProxy::pagePreferencesChanged): Ditto.
(WebKit::WebProcessProxy::didFinishLaunching): Call
updateProcessSuppressionState().
* UIProcess/WebProcessProxy.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::updateProcessSuppressionStateOfGlobalChildProcesses): Use new
helper method canEnableProcessSuppressionForGlobalChildProcesses() to
determine if process suppression should be enabled.
(WebKit::applicationOcclusionStateChanged): Update renamed methods
and variables.
(WebKit::enableOcclusionNotifications): Move OmitProcessSuppression
user default check into canEnableProcessSuppression methods.
(WebKit::omitProcessSuppression):
(WebKit::WebContext::updateProcessSuppressionStateOfChildProcesses):
Use new helper method canEnableProcessSuppressionForNetworkProcess() to
determine if process suppression should be enabled for NetworkProcess.
Let WebProcess update process suppression state based on application
occlusion state and page visibility.
(WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess):
(WebKit::WebContext::canEnableProcessSuppressionForWebProcess):
(WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses):
(WebKit::WebContext::processSuppressionEnabledChanged): Reevaluate if
process suppression is enabled for all contexts and update process
suppression state of global child processes.
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::pageIsProcessSuppressible):
(WebKit::WebProcessProxy::allPagesAreProcessSuppressible):
(WebKit::WebProcessProxy::updateProcessSuppressionState):
* WebProcess/WebProcess.messages.in:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141167 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r140594): RELEASE_ASSERT_NOT_REACHED in JSC::Interpreter::execute
https://bugs.webkit.org/show_bug.cgi?id=108097

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

LiteralParser was accepting a bogus 'var a.b = c' statement

* runtime/LiteralParser.cpp:
(JSC::::tryJSONPParse):

LayoutTests:

Add parser test for invalid var a.b syntax

* fast/js/parser-syntax-check-expected.txt:
* fast/js/script-tests/parser-syntax-check.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of MessageID::get()
https://bugs.webkit.org/show_bug.cgi?id=108235

Reviewed by Beth Dakin.

Just check for the message receiver name and message name explicitly instead.

* Platform/CoreIPC/MessageID.h:
(CoreIPC::MessageID::is):
* Shared/CoreIPCSupport/WebContextMessageKinds.h:
(WebContextLegacyMessage::messageReceiverName):
(WebContextLegacyMessage):
(WebContextLegacyMessage::postMessageMessageName):
(WebContextLegacyMessage::postSynchronousMessageMessageName):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Call LayerTreeHost::deviceOrPageScaleFactorChanged() when a device or page scale factor is changed.
https://bugs.webkit.org/show_bug.cgi?id=107802

Patch by Huang Dongsung <luxtella@company100.net> on 2013-01-29
Reviewed by Simon Fraser.

Currently, LayerTreeHostMac and *GTK call deviceOrPageScaleFactorChanged()
of the non compositing GraphicsLayer when a device scale factor is changed.

There are two problems.
1. We don't notify LayerTreeHost when a page scale factor is changed.
2. When using TiledCoreAnimationDrawingAreaProxy, LayerTreeHostMac does
not receive the device scale factor changed callback.

So this patch changes three points.
1. Rename from deviceScaleFactorDidChange() to deviceOrPageScaleFactorChanged()
in LayerTreeHost.
2. WebPage::setDeviceScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange()
because of dealing with TiledCoreAnimationDrawingAreaProxy.
3. WebPage::pageScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange()
to call deviceOrPageScaleFactorChanged() of the non compositing GraphicsLayer.

Unfortunately, I couldn't think of a way to test this in an automated fashion.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updateBackingStoreState):
    Don't call LayerTreeHost::deviceScaleFactorDidChange() because this
    method calls WebPage::setDeviceScaleFactor() and then
    LayerTreeHost::deviceScaleFactorDidChange() is called.
* WebProcess/WebPage/LayerTreeHost.h:
(LayerTreeHost):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage):
(WebKit::WebPage::setDeviceScaleFactor):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
(LayerTreeHostGtk):
* WebProcess/WebPage/mac/LayerTreeHostMac.h:
(LayerTreeHostMac):
* WebProcess/WebPage/mac/LayerTreeHostMac.mm:
(WebKit::LayerTreeHostMac::deviceOrPageScaleFactorChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
run-api-tests should have an option to specify root
https://bugs.webkit.org/show_bug.cgi?id=108210

Reviewed by Ryosuke Niwa.

* Scripts/run-api-tests:
Add the option and use it to set the configuration product directory. Since it is supposed
to point to the built products, do not build the products if root is specified (this mimics
the behavior of run-javascriptcore-tests).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141172 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow clients to ask for the WebView/WKView placeholder view when in full screen mode.
https://bugs.webkit.org/show_bug.cgi?id=103558
<rdar://problem/12763112>

Reviewed by Benjamin Poulain.

Source/WebKit/mac:

Clients may want to behave differently when their WebView/WKView has been swapped out by a placeholder
view when in full screen mode.  Add a simple accessor for the existing placeholder view to
WebFullScreenController and WebView.

* WebView/WebFullScreenController.h:
* WebView/WebFullScreenController.mm:
(-[WebFullScreenController webViewPlaceholder]): Added simple accessor.
* WebView/WebView.mm:
(-[WebView fullScreenPlaceholderView]): Added simple accessor.

Source/WebKit2:

Clients may want to behave differently when their WebView/WKView has been swapped out by a placeholder
view when in full screen mode.  Add a simple accessor for the existing placeholder view to
WKFullScreenWindowController and WKView.

* UIProcess/API/mac/WKView.mm:
(-[WKView fullScreenPlaceholderView]): Added simple accessor.
* UIProcess/API/mac/WKViewPrivate.h:
* UIProcess/mac/WKFullScreenWindowController.h:
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController webViewPlaceholder]): Added simple accessor.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Get rid of MessageID::is()
https://bugs.webkit.org/show_bug.cgi?id=108234

Reviewed by Beth Dakin.

Add explicit message receiver name equality checks instead of using MessageID::is.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):
(WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage):
* Platform/CoreIPC/MessageID.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):
* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didReceiveMessage):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
(WebKit::WebPageProxy::didReceiveSyncMessage):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):
(WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue):
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didReceiveSyncMessage):
* WebProcess/Plugins/PluginProcessConnection.cpp:
(WebKit::PluginProcessConnection::didReceiveSyncMessage):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceiveMessage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):
(WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactor ShadowRoot exception handling
https://bugs.webkit.org/show_bug.cgi?id=108209

Reviewed by Dimitri Glazkov.

Source/WebCore:

Many of the exception cases for ShadowRoot are actually impossible and
should be asserts instead. We can also move the one case of exception logic,
for elements that don't allow author shadows into Element::createShadowRoot
instead of having it all over the ShadowRoot and ElementShadow classes. This
is the first step in centralizing all ShadowRoot creation inside ElementShadow.

No new tests, covered by existing tests.

* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::createShadowRoot): Be explicit about what kind of ShadowRoot you're creating.
(WebCore::Element::ensureUserAgentShadowRoot): No more exceptions.
* dom/ElementShadow.cpp:
(WebCore::ElementShadow::addShadowRoot): This never actually throws exceptions, remove ExceptionCode.
* dom/ElementShadow.h:
(ElementShadow):
* dom/ShadowRoot.cpp:
(WebCore::determineUsageType): Merge with Element::createShadowRoot.
(WebCore):
(WebCore::ShadowRoot::ShadowRoot): Moved Histogram logic here since it's actually about the constructor anyway.
(WebCore::ShadowRoot::create): Removed overload that made the code less obvious.
* dom/ShadowRoot.h:
(ShadowRoot):
* html/HTMLKeygenElement.cpp:
(WebCore::HTMLKeygenElement::HTMLKeygenElement):
* html/shadow/TextFieldDecorationElement.cpp:
(WebCore::getDecorationRootAndDecoratedRoot):
* testing/Internals.cpp:
(WebCore::Internals::ensureShadowRoot):
(WebCore::Internals::createShadowRoot):

Source/WebKit/win:

* WebKit.vcproj/WebKitExports.def.in: Swap ShadowRoot::create export with Element::createShadowRoot.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Objective-C API: JSObjCClassInfo creates reference cycle with JSContext
https://bugs.webkit.org/show_bug.cgi?id=107839

Reviewed by Oliver Hunt.

JSContext has a JSWrapperMap, which has an NSMutableDictionary m_classMap, which has values that
are JSObjCClassInfo objects, which have strong references to two JSValue *'s, m_prototype and
m_constructor, which in turn have strong references to the JSContext, creating a reference cycle.
We should make m_prototype and m_constructor Weak<JSObject>. This gets rid of the strong reference
to the JSContext and also prevents clients from accidentally creating reference cycles by assigning
to the prototype of the constructor. If Weak<JSObject> fields are ever garbage collected, we will
reallocate them.

* API/JSContext.mm:
(-[JSContext wrapperMap]):
* API/JSContextInternal.h:
* API/JSWrapperMap.mm:
(-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]):
(-[JSObjCClassInfo dealloc]):
(-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]):
(-[JSObjCClassInfo allocateConstructorAndPrototype]):
(-[JSObjCClassInfo wrapperForObject:]):
(-[JSObjCClassInfo constructor]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove almost everything from MessageID
https://bugs.webkit.org/show_bug.cgi?id=108244

Reviewed by Beth Dakin.

* Platform/CoreIPC/MessageID.h:
(CoreIPC::MessageID::MessageID):
* Platform/CoreIPC/mac/ConnectionMac.cpp:
(CoreIPC):
(CoreIPC::Connection::sendOutgoingMessage):
(CoreIPC::createMessageDecoder):
(CoreIPC::Connection::receiveSourceEventHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove redundant AST dump method from cloop.rb, since they are already defined in ast.rb
https://bugs.webkit.org/show_bug.cgi?id=108247

Reviewed by Oliver Hunt.
        
Makes offlineasm dumping easier to read and less likely to cause assertion failures.
Also fixes the strange situation where cloop.rb and ast.rb both defined dump methods,
but cloop.rb was winning.

* offlineasm/cloop.rb:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Removed GGC because it has been disabled for a long time
https://bugs.webkit.org/show_bug.cgi?id=108245

Reviewed by Filip Pizlo.

../JavaScriptCore: 

* GNUmakefile.list.am:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
* JavaScriptCore.xcodeproj/project.pbxproj:
* dfg/DFGRepatch.cpp:
(JSC::DFG::emitPutReplaceStub):
(JSC::DFG::emitPutTransitionStub):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::writeBarrier):
* dfg/DFGSpeculativeJIT.h:
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* heap/CardSet.h: Removed.
* heap/Heap.cpp:
(JSC::Heap::markRoots):
(JSC::Heap::collect):
* heap/Heap.h:
(Heap):
(JSC::Heap::shouldCollect):
(JSC::Heap::isWriteBarrierEnabled):
(JSC):
(JSC::Heap::writeBarrier):
* heap/MarkedBlock.h:
(MarkedBlock):
(JSC):
* heap/MarkedSpace.cpp:
(JSC):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitWriteBarrier):

../WebCore: 

* ForwardingHeaders/heap/CardSet.h: Removed.
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix erroneous semicolon causing build failure: if statement has empty body [-Werror,-Wempty-body]
https://bugs.webkit.org/show_bug.cgi?id=108241

Patch by Kiran Muppala <cmuppala@apple.com> on 2013-01-29
Reviewed by Anders Carlsson.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addExistingWebPage): Remove erroneous
semicolon following the if condition.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Skip a bunch of tests on Win7 in preparation of turning on EWS testers.
https://bugs.webkit.org/show_bug.cgi?id=108249

* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MockWeb should be able to serve mock web content
https://bugs.webkit.org/show_bug.cgi?id=108240

Patch by Alan Cutter <alancutter@chromium.org> on 2013-01-29
Reviewed by Dirk Pranke.

Added the ability to have MockWeb serve mock web data.

* Scripts/webkitpy/common/host_mock.py:
(MockHost.__init__):
* Scripts/webkitpy/common/net/web_mock.py:
(MockWeb.__init__):
(MockWeb.get_binary):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop generating the message kind enum
https://bugs.webkit.org/show_bug.cgi?id=108258

Reviewed by Beth Dakin.

* Platform/CoreIPC/Connection.h:
(CoreIPC::Connection::send):
(CoreIPC::Connection::sendSync):
(CoreIPC::Connection::waitForAndDispatchImmediately):
* Platform/CoreIPC/MessageSender.h:
(CoreIPC::MessageSender::send):
* Scripts/webkit2/messages.py:
(surround_in_condition):
(message_to_struct_declaration):
(generate_messages_header):
* Scripts/webkit2/messages_unittest.py:
* Scripts/webkit2/model.py:
(Message.__init__):
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::send):
* Shared/WebConnection.cpp:
(WebKit::WebConnection::postMessage):

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