REGRESSION: Web Inspector crashes when reloading apple.com with Timeline recording active
https://bugs.webkit.org/show_bug.cgi?id=136034

Reviewed by Mark Lam.

DebuggerCallFrame::positionForCallFrame is trying to unwind starting somewhere in the middle
of the stack.  Hardened StackVisitor to skip over the frames between the current top frame
and the requested start frame.

* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::StackVisitor):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop implicitly skipping a function's own activation when walking the scope chain
https://bugs.webkit.org/show_bug.cgi?id=136118

Reviewed by Geoffrey Garen.

Remove the current logic that implicitly skips a function's
own activation when walking the scope chain. This is ground
work for ensuring that all closed variable access is made
through the function's activation. This leads to a further
10% regression on earley, but we're already tracking the
overall performance regression.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getScope):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.cpp:
(WTF::printInternal):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITPropertyAccess.cpp:
(JSC::JIT::emitResolveClosure):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSScope.cpp:
(JSC::JSScope::abstractResolve):
* runtime/JSScope.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cleanup MediaSession
https://bugs.webkit.org/show_bug.cgi?id=136116

Reviewed by Brent Fulgham.

MediaSessionManagerClient interface isn't used, remove it.
No new tests, this doesn't change behavior.

* WebCore.exp.in:
* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::addSession):
(WebCore::MediaSessionManager::removeSession):
(WebCore::MediaSessionManager::sessionWillBeginPlayback):
(WebCore::MediaSessionManager::addClient): Deleted.
(WebCore::MediaSessionManager::removeClient): Deleted.
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManagerClient::~MediaSessionManagerClient): Deleted.
(WebCore::MediaSessionManagerClient::MediaSessionManagerClient): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
https://bugs.webkit.org/show_bug.cgi?id=135896

Reviewed by Andreas Kling.

Source/WebCore:

Refactor code and move it to WebCore.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* loader/ResourceLoader.h:
    Make willCacheResponse protected so that SubresourceLoader can override it.
* loader/SubresourceLoader.h:
* loader/cocoa/DiskCacheMonitorCocoa.h: Added.
    Mostly the same as the existing NetworkDiskCacheMonitor class in WebKit2. In the
    CFNetwork callback block, it calls a virtual function that is overridden by
    NetworkDiskCacheMonitor to send a message to WebContent process.
(WebCore::DiskCacheMonitor::~DiskCacheMonitor):
(WebCore::DiskCacheMonitor::resourceRequest):
(WebCore::DiskCacheMonitor::sessionID):
* loader/cocoa/DiskCacheMonitorCocoa.mm:
(WebCore::DiskCacheMonitor::tryGetFileBackedSharedBufferFromCFURLCachedResponse):
    Copied from NetworkResourceLoader::tryGetFileBackedSharedBufferFromCFURLCachedResponse.
(WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation):
(WebCore::DiskCacheMonitor::DiskCacheMonitor):
(WebCore::DiskCacheMonitor::resourceBecameFileBacked):
    Replace the cached resource data with the contents of the file backed buffer. This is
    used in WebKit1 (and also for any resource loads that happen from the WebContent
    process).
* loader/cocoa/SubresourceLoaderCocoa.mm: Added.
(WebCore::SubresourceLoader::willCacheResponse):
    Override willCacheresponse from ResourceLoader to listen for disk cache notifications.

Source/WebKit2:

* NetworkProcess/mac/NetworkDiskCacheMonitor.h:
    Inherit from WebCore::DiskCacheMonitor which has the bulk of the functionality now.
(WebKit::NetworkDiskCacheMonitor::~NetworkDiskCacheMonitor):
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
(WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
(WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked):
    Override virtual method and send the data to the WebContent process as before.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/136119> WebKit1 plug-in test failures in production builds after r172595

Reviewed by Alexey Proskuryakov.

* WebKit.xcodeproj/project.pbxproj: Add the symlinks at the top level of WebKitLegacy.framework
even in Production builds. Add the symlinks in the right locations too.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
URTBF after r172799.

* disassembler/ARM64/A64DOpcode.cpp:
* disassembler/ARM64Disassembler.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@172813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introducing WEBCORE_EXPORT macro.
https://bugs.webkit.org/show_bug.cgi?id=136108

Reviewed by Antti Koivisto.

Source/WebCore:

This should eventually replace WebCore.exp.in.

* platform/PlatformExportMacros.h:
Define WEBCORE_EXPORT to nothing to not cause problems while I'm working on it.
* Modules/encryptedmedia/CDM.h:
* Modules/speech/DOMWindowSpeechSynthesis.h:
* Modules/webdatabase/DatabaseManager.h:
* Modules/webdatabase/DatabaseTracker.h:
* accessibility/AXObjectCache.h:
* bindings/js/DOMWrapperWorld.h:
* bridge/jsc/BridgeJSC.h:
* bridge/runtime_method.h:
* bridge/runtime_object.h:
* bridge/runtime_root.h:
* css/CSSComputedStyleDeclaration.h:
* css/CSSParserMode.h:
* css/CSSValue.h:
* css/DOMWindowCSS.h:
* css/StyleSheetContents.h:
* dom/CharacterData.h:
* dom/ClientRect.h:
* dom/ClientRectList.h:
* dom/ContainerNode.h:
* dom/ContextDestructionObserver.h:
* dom/DOMImplementation.h:
* dom/DataTransfer.h:
* dom/DeviceMotionData.h:
* dom/DeviceOrientationData.h:
* dom/Document.h:
(WebCore::Document::setAnnotatedRegionsDirty):
* dom/DocumentMarker.h:
* dom/DocumentMarkerController.h:
* dom/DocumentStyleSheetCollection.h:
* dom/Element.h:
* dom/Event.h:
(WebCore::Event::create):
* dom/EventListenerMap.h:
* editing/DictationAlternative.h:
* editing/EditCommand.h:
* editing/EditingStyle.h:
* editing/Editor.h:
* editing/mac/AlternativeTextUIController.h:
* history/BackForwardController.h:
* history/BackForwardList.h:
* history/CachedFrame.h:
* loader/CookieJar.h:
* loader/CrossOriginPreflightResultCache.h:
* loader/DocumentLoader.h:
* loader/DocumentWriter.h:
* loader/appcache/ApplicationCache.h:
* loader/appcache/ApplicationCacheHost.h:
* loader/appcache/ApplicationCacheStorage.h:
* loader/archive/ArchiveResource.h:
* loader/cache/CachedImage.h:
* loader/cache/CachedResource.h:
* loader/cache/CachedResourceHandle.h:
* loader/cache/CachedResourceLoader.h:
* page/Chrome.h:
* page/ContextMenuController.h:
* page/DOMWindow.h:
* page/DOMWindowExtension.h:
* page/DragController.h:
* page/EventHandler.h:
* page/animation/AnimationController.h:
* page/scrolling/AsyncScrollingCoordinator.h:
* platform/CalculationValue.h:
* platform/ContentFilter.h:
* platform/ContextMenu.h:
* platform/ContextMenuItem.h:
* platform/CrossThreadCopier.h:
* platform/Cursor.h:
* platform/DatabaseStrategy.h:
* platform/DisplaySleepDisabler.h:
* platform/DragData.h:
* platform/LocalizedStrings.h:
* platform/audio/AudioHardwareListener.h:
* platform/audio/AudioSession.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
* platform/graphics/BitmapImage.h:
* platform/graphics/Color.h:
* platform/graphics/DisplayRefreshMonitor.h:
* platform/graphics/transforms/AffineTransform.h:
* platform/ios/WebCoreSystemInterfaceIOS.mm:
* platform/ios/WebVideoFullscreenModelMediaElement.h:
* platform/ios/wak/WAKView.mm:
* platform/ios/wak/WKContentObservation.h:
* platform/ios/wak/WKView.h:
* platform/ios/wak/WebCoreThread.h:
* platform/ios/wak/WebCoreThreadMessage.h:
* platform/mac/BlockExceptions.h:
* platform/mock/DeviceOrientationClientMock.h:
* platform/network/AuthenticationChallengeBase.h:
* platform/network/BlobData.h:
* platform/network/BlobDataFileReference.h:
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.h:
* platform/network/CredentialBase.h:
* platform/network/CredentialStorage.h:
* platform/network/PlatformCookieJar.h:
* platform/network/cf/AuthenticationChallenge.h:
* platform/network/cocoa/CredentialCocoa.h:
* platform/network/mac/CertificateInfo.h:
* platform/sql/SQLiteDatabase.h:
(WebCore::SQLiteDatabase::disableThreadingChecks):
* platform/sql/SQLiteDatabaseTracker.h:
* platform/sql/SQLiteStatement.h:
* platform/sql/SQLiteTransaction.h:
* platform/text/BidiContext.h:
Added WEBCORE_EXPORT macros.

Source/WebKit2:

* config.h:
Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers.

Tools:

* TestWebKitAPI/config.h:
Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers.



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