diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-15 09:10:40 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-04-15 09:10:40 +0200 |
commit | 0f68b45974d9da98af22a5d33269bd31c8726221 (patch) | |
tree | c9504f653ede07db0be37dfb265ff550f36f8609 | |
parent | a49a02994a5a45cf9966a68621059b0ee9278e0f (diff) | |
parent | 738ad7e37c66f2afdbc7a77aff3ab7fa510361a2 (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5v5.5.0-beta1
Change-Id: I0d9dd63455dc12402afd56cc1bd97d0cc97c24e8
6 files changed, 55 insertions, 27 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp index cbab4e8c8..ec7515eec 100644 --- a/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp +++ b/Source/JavaScriptCore/dfg/DFGArgumentsSimplificationPhase.cpp @@ -123,12 +123,9 @@ public: bool changed = false; // Record which arguments are known to escape no matter what. - for (unsigned i = codeBlock()->inlineCallFrames().size(); i--;) { - InlineCallFrame* inlineCallFrame = &codeBlock()->inlineCallFrames()[i]; - if (m_graph.m_executablesWhoseArgumentsEscaped.contains( - m_graph.executableFor(inlineCallFrame))) - m_createsArguments.add(inlineCallFrame); - } + for (unsigned i = codeBlock()->inlineCallFrames().size(); i--;) + pruneObviousArgumentCreations(&codeBlock()->inlineCallFrames()[i]); + pruneObviousArgumentCreations(0); // the machine call frame. // Create data for variable access datas that we will want to analyze. for (unsigned i = m_graph.m_variableAccessData.size(); i--;) { @@ -700,6 +697,14 @@ private: NullableHashTraits<VariableAccessData*> > m_argumentsAliasing; HashSet<VariableAccessData*> m_isLive; + void pruneObviousArgumentCreations(InlineCallFrame* inlineCallFrame) + { + ScriptExecutable* executable = jsCast<ScriptExecutable*>(m_graph.executableFor(inlineCallFrame)); + if (m_graph.m_executablesWhoseArgumentsEscaped.contains(executable) + || executable->isStrictMode()) + m_createsArguments.add(inlineCallFrame); + } + void observeBadArgumentsUse(Node* node) { if (!node) diff --git a/Source/JavaScriptCore/dfg/DFGOSREntry.cpp b/Source/JavaScriptCore/dfg/DFGOSREntry.cpp index 5739593ee..9b75e70ab 100644 --- a/Source/JavaScriptCore/dfg/DFGOSREntry.cpp +++ b/Source/JavaScriptCore/dfg/DFGOSREntry.cpp @@ -118,7 +118,7 @@ void* prepareOSREntry(ExecState* exec, CodeBlock* codeBlock, unsigned bytecodeIn } continue; } - if (!entry->m_expectedValues.local(local).validate(exec->registers()[local].jsValue())) { + if (!entry->m_expectedValues.local(local).isTop() && !entry->m_expectedValues.local(local).validate(exec->registers()[local].jsValue())) { #if ENABLE(JIT_VERBOSE_OSR) dataLog(" OSR failed because variable ", local, " is ", exec->registers()[local].jsValue(), ", expected ", entry->m_expectedValues.local(local), ".\n"); #endif diff --git a/Source/WebCore/loader/icon/IconController.cpp b/Source/WebCore/loader/icon/IconController.cpp index 8f23f6db1..a808352af 100644 --- a/Source/WebCore/loader/icon/IconController.cpp +++ b/Source/WebCore/loader/icon/IconController.cpp @@ -159,6 +159,10 @@ void IconController::startLoader() } if (iconDatabase().supportsAsynchronousMode()) { + // FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode. + if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled()) + return; + m_frame->loader()->documentLoader()->getIconLoadDecisionForIconURL(urlString); // Commit the icon url mapping to the database just in case we don't end up loading later. commitToDatabase(iconURL); @@ -202,10 +206,6 @@ void IconController::continueLoadWithDecision(IconLoadDecision iconLoadDecision) { ASSERT(iconLoadDecision != IconLoadUnknown); - // FIXME (<rdar://problem/9168605>) - We should support in-memory-only private browsing icons in asynchronous icon database mode. - if (iconDatabase().supportsAsynchronousMode() && m_frame->page()->settings()->privateBrowsingEnabled()) - return; - if (iconLoadDecision == IconLoadNo) { KURL iconURL(url()); String urlString(iconURL.string()); diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp index 0c9fddc83..dffcfc637 100644 --- a/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp +++ b/Source/WebCore/platform/graphics/qt/GraphicsContext3DQt.cpp @@ -111,6 +111,18 @@ public: GraphicsSurface::Flags m_surfaceFlags; RefPtr<GraphicsSurface> m_graphicsSurface; #endif + + // Register as a child of a Qt context to make the necessary when it may be destroyed before the GraphicsContext3D instance + class QtContextWatcher : public QObject + { + public: + QtContextWatcher(QObject* ctx, GraphicsContext3DPrivate* watcher): QObject(ctx), m_watcher(watcher) { } + ~QtContextWatcher() { m_watcher->m_platformContext = 0; m_watcher->m_platformContextWatcher = 0; } + + private: + GraphicsContext3DPrivate* m_watcher; + }; + QtContextWatcher* m_platformContextWatcher; }; bool GraphicsContext3DPrivate::isOpenGLES() const @@ -149,11 +161,16 @@ GraphicsContext3DPrivate::GraphicsContext3DPrivate(GraphicsContext3D* context, H , m_surface(0) , m_platformContext(0) , m_surfaceOwner(0) + , m_platformContextWatcher(0) { if (renderStyle == GraphicsContext3D::RenderToCurrentGLContext) { m_platformContext = QOpenGLContext::currentContext(); if (m_platformContext) m_surface = m_platformContext->surface(); + + // Watcher needed to invalidate the GL context if destroyed before this instance + m_platformContextWatcher = new QtContextWatcher(m_platformContext, this); + initializeOpenGLFunctions(); return; } @@ -260,6 +277,9 @@ GraphicsContext3DPrivate::~GraphicsContext3DPrivate() #endif delete m_surfaceOwner; m_surfaceOwner = 0; + + delete m_platformContextWatcher; + m_platformContextWatcher = 0; } #if USE(ACCELERATED_COMPOSITING) @@ -441,22 +461,23 @@ GraphicsContext3D::~GraphicsContext3D() if (!m_private) return; - makeContextCurrent(); - m_functions->glDeleteTextures(1, &m_texture); - m_functions->glDeleteFramebuffers(1, &m_fbo); - if (m_attrs.antialias) { - m_functions->glDeleteRenderbuffers(1, &m_multisampleColorBuffer); - m_functions->glDeleteFramebuffers(1, &m_multisampleFBO); - if (m_attrs.stencil || m_attrs.depth) - m_functions->glDeleteRenderbuffers(1, &m_multisampleDepthStencilBuffer); - } else if (m_attrs.stencil || m_attrs.depth) { - if (isGLES2Compliant()) { - if (m_attrs.depth) - m_functions->glDeleteRenderbuffers(1, &m_depthBuffer); - if (m_attrs.stencil) - m_functions->glDeleteRenderbuffers(1, &m_stencilBuffer); + if (makeContextCurrent()) { + m_functions->glDeleteTextures(1, &m_texture); + m_functions->glDeleteFramebuffers(1, &m_fbo); + if (m_attrs.antialias) { + m_functions->glDeleteRenderbuffers(1, &m_multisampleColorBuffer); + m_functions->glDeleteFramebuffers(1, &m_multisampleFBO); + if (m_attrs.stencil || m_attrs.depth) + m_functions->glDeleteRenderbuffers(1, &m_multisampleDepthStencilBuffer); + } else if (m_attrs.stencil || m_attrs.depth) { + if (isGLES2Compliant()) { + if (m_attrs.depth) + m_functions->glDeleteRenderbuffers(1, &m_depthBuffer); + if (m_attrs.stencil) + m_functions->glDeleteRenderbuffers(1, &m_stencilBuffer); + } + m_functions->glDeleteRenderbuffers(1, &m_depthStencilBuffer); } - m_functions->glDeleteRenderbuffers(1, &m_depthStencilBuffer); } m_functions = 0; diff --git a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp index 0daf2f890..e390792a3 100644 --- a/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp +++ b/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp @@ -627,7 +627,7 @@ void GraphicsLayerTextureMapper::updateBackingStoreIfNeeded() bool GraphicsLayerTextureMapper::shouldHaveBackingStore() const { - return drawsContent() && contentsAreVisible() && !m_size.isEmpty(); + return drawsContent() && contentsAreVisible() && !m_size.isEmpty() && (m_size.width() * m_size.height() <= 8192*8192); } bool GraphicsLayerTextureMapper::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double timeOffset) diff --git a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp index 8ba625a82..591fa052d 100644 --- a/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp +++ b/Source/WebKit/qt/WebCoreSupport/InitWebCoreQt.cpp @@ -44,6 +44,7 @@ #include "ScriptController.h" #include "ScrollbarThemeQStyle.h" #include "SecurityPolicy.h" +#include "Settings.h" #include "qwebelement_p.h" #include <JavaScriptCore/runtime/InitializeThreading.h> @@ -104,6 +105,7 @@ Q_DECL_EXPORT void initializeWebCoreQt() if (!WebCore::memoryCache()->disabled()) WebCore::memoryCache()->setDeadDecodedDataDeletionInterval(60); WebCore::RuntimeEnabledFeatures::setCSSCompositingEnabled(true); + WebCore::Settings::setDefaultMinDOMTimerInterval(0.004); initialized = true; } |