Commit e9d750e4 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

Imported Upstream version 2.8.2+dfsg1

parent 83cfb78f
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKit2GTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.8.1</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.8.2</p></div>
</div>
<hr>
</div>
......
......@@ -127,7 +127,7 @@ against at application run time.</p>
<hr>
<div class="refsect2">
<a name="WEBKIT-MICRO-VERSION:CAPS"></a><h3>WEBKIT_MICRO_VERSION</h3>
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (1)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (2)
</pre>
<p>Like <a class="link" href="webkit2gtk-4.0-WebKitVersion.html#webkit-get-micro-version" title="webkit_get_micro_version ()"><code class="function">webkit_get_micro_version()</code></a>, but from the headers used at
application compile time, rather than from the library linked
......
......@@ -14,7 +14,7 @@
<div class="titlepage">
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">WebKitDOMGTK+ Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.8.1</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.8.2</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.8.2
=================
What's new in WebKitGTK+ 2.8.2?
- Fix network redirection to a non HTTP destination.
- Use a webkit subdirectory for the disk cache to avoid conflicts with other
files in the cache directory when the disk cache is cleaned up.
- Do not preserve the Origin header on on cross-origin redirects.
- Prevent WorkQueue objects from being leaked and ensure its worker thread
always exits.
=================
WebKitGTK+ 2.8.1
=================
......
......@@ -947,6 +947,7 @@ public:
{
ASSERT(!(offset & 0xfff));
insn(pcRelative(true, offset >> 12, rd));
nopCortexA53Fix843419();
}
template<int datasize, SetFlags setFlags = DontSetFlags>
......@@ -3655,6 +3656,17 @@ private:
#endif
}
// Workaround for Cortex-A53 erratum (843419). Emit extra nops to avoid
// wrong address access after ADRP instruction.
ALWAYS_INLINE void nopCortexA53Fix843419()
{
#if CPU(ARM64_CORTEXA53)
nop();
nop();
nop();
#endif
}
AssemblerBuffer m_buffer;
Vector<LinkRecord, 0, UnsafeVectorOverflow> m_jumpsToLink;
int m_indexOfLastWatchpoint;
......
......@@ -608,7 +608,7 @@ private:
Node* bottom = nullptr;
for (BasicBlock* block : m_graph.blocksInNaturalOrder()) {
if (block == m_graph.block(0))
bottom = m_insertionSet.insertNode(0, SpecNone, BottomValue, NodeOrigin());
bottom = m_insertionSet.insertConstant(0, NodeOrigin(), jsUndefined());
for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
Node* node = block->at(nodeIndex);
......
......@@ -732,16 +732,16 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32));
m_interpreter.filter(value, SpecInt32);
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
if (edge->hasConstant() && !edge->isInt32Constant()) {
if (m_interpreter.filter(value, SpecInt32) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
returnFormat = DataFormatInt32;
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
if (edge->hasConstant()) {
......@@ -756,12 +756,6 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF
DataFormat spillFormat = info.spillFormat();
if (spillFormat == DataFormatCell) {
terminateSpeculativeExecution(BadType, JSValueRegs(), edge);
returnFormat = DataFormatInt32;
return allocate();
}
ASSERT_UNUSED(spillFormat, (spillFormat & DataFormatJS) || spillFormat == DataFormatInt32);
// If we know this was spilled as an integer we can fill without checking.
......@@ -807,10 +801,6 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF
case DataFormatJSDouble:
case DataFormatJSCell:
case DataFormatJSBoolean:
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
returnFormat = DataFormatInt32;
return allocate();
case DataFormatDouble:
case DataFormatStorage:
default:
......@@ -869,26 +859,17 @@ GPRReg SpeculativeJIT::fillSpeculateCell(Edge edge)
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
ASSERT((edge.useKind() != KnownCellUse && edge.useKind() != KnownStringUse) || !(value.m_type & ~SpecCell));
m_interpreter.filter(value, SpecCell);
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
if (edge->hasConstant() && !edge->isCellConstant()) {
// Protect the silent spill/fill logic by failing early. If we "speculate" on
// the constant then the silent filler may think that we have a cell and a
// constant, so it will try to fill this as an cell constant. Bad things will
// happen.
if (m_interpreter.filter(value, SpecCell) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
if (info.spillFormat() == DataFormatInt32) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
if (edge->hasConstant()) {
JSValue jsValue = edge->asJSValue();
GPRReg gpr = allocate();
......@@ -946,9 +927,6 @@ GPRReg SpeculativeJIT::fillSpeculateCell(Edge edge)
case DataFormatJSDouble:
case DataFormatJSBoolean:
case DataFormatBoolean:
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
case DataFormatDouble:
case DataFormatStorage:
RELEASE_ASSERT_NOT_REACHED();
......@@ -963,27 +941,23 @@ GPRReg SpeculativeJIT::fillSpeculateBoolean(Edge edge)
{
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
m_interpreter.filter(value, SpecBoolean);
if (m_interpreter.filter(value, SpecBoolean) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
if (info.spillFormat() == DataFormatInt32) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
if (edge->hasConstant()) {
JSValue jsValue = edge->asJSValue();
GPRReg gpr = allocate();
if (jsValue.isBoolean()) {
m_gprs.retain(gpr, virtualRegister, SpillOrderConstant);
m_jit.move(MacroAssembler::TrustedImm32(jsValue.asBoolean()), gpr);
info.fillBoolean(*m_stream, gpr);
return gpr;
}
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
m_gprs.retain(gpr, virtualRegister, SpillOrderConstant);
m_jit.move(MacroAssembler::TrustedImm32(jsValue.asBoolean()), gpr);
info.fillBoolean(*m_stream, gpr);
return gpr;
}
......@@ -1027,9 +1001,6 @@ GPRReg SpeculativeJIT::fillSpeculateBoolean(Edge edge)
case DataFormatJSDouble:
case DataFormatJSCell:
case DataFormatCell:
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
case DataFormatDouble:
case DataFormatStorage:
RELEASE_ASSERT_NOT_REACHED();
......
......@@ -708,20 +708,16 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
ASSERT(edge.useKind() != KnownInt32Use || !(value.m_type & ~SpecInt32));
m_interpreter.filter(value, SpecInt32);
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
if (edge->hasConstant() && !edge->isInt32Constant()) {
// Protect the silent spill/fill logic by failing early. If we "speculate" on
// the constant then the silent filler may think that we have an int32 and a
// constant, so it will try to fill this as an int32 constant. Bad things will
// happen.
if (m_interpreter.filter(value, SpecInt32) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
returnFormat = DataFormatInt32;
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
GPRReg gpr = allocate();
......@@ -820,12 +816,7 @@ GPRReg SpeculativeJIT::fillSpeculateInt32Internal(Edge edge, DataFormat& returnF
case DataFormatCell:
case DataFormatBoolean:
case DataFormatJSCell:
case DataFormatJSBoolean: {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
returnFormat = DataFormatInt32;
return allocate();
}
case DataFormatJSBoolean:
case DataFormatDouble:
case DataFormatStorage:
case DataFormatInt52:
......@@ -858,17 +849,17 @@ GPRReg SpeculativeJIT::fillSpeculateInt52(Edge edge, DataFormat desiredFormat)
{
ASSERT(desiredFormat == DataFormatInt52 || desiredFormat == DataFormatStrictInt52);
AbstractValue& value = m_state.forNode(edge);
m_interpreter.filter(value, SpecMachineInt);
if (m_interpreter.filter(value, SpecMachineInt) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
if (edge->hasConstant() && !edge->isMachineIntConstant()) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
GPRReg gpr = allocate();
if (edge->hasConstant()) {
......@@ -987,16 +978,15 @@ GPRReg SpeculativeJIT::fillSpeculateCell(Edge edge)
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
ASSERT((edge.useKind() != KnownCellUse && edge.useKind() != KnownStringUse) || !(value.m_type & ~SpecCell));
m_interpreter.filter(value, SpecCell);
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
if (edge->hasConstant() && !edge->isCellConstant()) {
// Better to fail early on constants.
if (m_interpreter.filter(value, SpecCell) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
GPRReg gpr = allocate();
......@@ -1008,12 +998,7 @@ GPRReg SpeculativeJIT::fillSpeculateCell(Edge edge)
info.fillJSValue(*m_stream, gpr, DataFormatJSCell);
return gpr;
}
if (!(info.spillFormat() & DataFormatJS)) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return gpr;
}
m_gprs.retain(gpr, virtualRegister, SpillOrderSpilled);
m_jit.load64(JITCompiler::addressFor(virtualRegister), gpr);
......@@ -1049,11 +1034,7 @@ GPRReg SpeculativeJIT::fillSpeculateCell(Edge edge)
case DataFormatInt32:
case DataFormatJSDouble:
case DataFormatJSBoolean:
case DataFormatBoolean: {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
case DataFormatBoolean:
case DataFormatDouble:
case DataFormatStorage:
case DataFormatInt52:
......@@ -1070,28 +1051,24 @@ GPRReg SpeculativeJIT::fillSpeculateBoolean(Edge edge)
{
AbstractValue& value = m_state.forNode(edge);
SpeculatedType type = value.m_type;
m_interpreter.filter(value, SpecBoolean);
if (m_interpreter.filter(value, SpecBoolean) == Contradiction) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
VirtualRegister virtualRegister = edge->virtualRegister();
GenerationInfo& info = generationInfoFromVirtualRegister(virtualRegister);
switch (info.registerFormat()) {
case DataFormatNone: {
if (info.spillFormat() == DataFormatInt32) {
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
}
GPRReg gpr = allocate();
if (edge->hasConstant()) {
JSValue jsValue = edge->asJSValue();
if (jsValue.isBoolean()) {
m_gprs.retain(gpr, virtualRegister, SpillOrderConstant);
m_jit.move(MacroAssembler::TrustedImm64(JSValue::encode(jsValue)), gpr);
info.fillJSValue(*m_stream, gpr, DataFormatJSBoolean);
return gpr;
}
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
m_gprs.retain(gpr, virtualRegister, SpillOrderConstant);
m_jit.move(MacroAssembler::TrustedImm64(JSValue::encode(jsValue)), gpr);
info.fillJSValue(*m_stream, gpr, DataFormatJSBoolean);
return gpr;
}
DFG_ASSERT(m_jit.graph(), m_currentNode, info.spillFormat() & DataFormatJS);
......@@ -1132,9 +1109,6 @@ GPRReg SpeculativeJIT::fillSpeculateBoolean(Edge edge)
case DataFormatJSDouble:
case DataFormatJSCell:
case DataFormatCell:
terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
return allocate();
case DataFormatDouble:
case DataFormatStorage:
case DataFormatInt52:
......
......@@ -740,6 +740,9 @@ private:
EncodedJSValue JSC_HOST_CALL globalFuncProtoGetter(ExecState* exec)
{
if (exec->thisValue().isUndefinedOrNull())
return throwVMError(exec, createTypeError(exec, "Can't convert undefined or null to object"));
JSObject* thisObject = jsDynamicCast<JSObject*>(exec->thisValue().toThis(exec, NotStrictMode));
if (!thisObject)
......@@ -780,6 +783,9 @@ private:
EncodedJSValue JSC_HOST_CALL globalFuncProtoSetter(ExecState* exec)
{
if (exec->thisValue().isUndefinedOrNull())
return throwVMError(exec, createTypeError(exec, "Can't convert undefined or null to object"));
JSValue value = exec->argument(0);
JSObject* thisObject = jsDynamicCast<JSObject*>(exec->thisValue().toThis(exec, NotStrictMode));
......
......@@ -968,7 +968,7 @@ void JSObject::convertInt32ForValue(VM& vm, JSValue value)
{
ASSERT(!value.isInt32());
if (value.isDouble()) {
if (value.isDouble() && !std::isnan(value.asDouble())) {
convertInt32ToDouble(vm);
return;
}
......
......@@ -129,7 +129,7 @@ void MathObject::finishCreation(VM& vm, JSGlobalObject* globalObject)
putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier(&vm, "tan"), 1, mathProtoFuncTan, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier(&vm, "tanh"), 1, mathProtoFuncTanh, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier(&vm, "trunc"), 1, mathProtoFuncTrunc, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier(&vm, "imul"), 1, mathProtoFuncIMul, IMulIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier(&vm, "imul"), 2, mathProtoFuncIMul, IMulIntrinsic, DontEnum | Function);
}
// ------------------------------ Functions --------------------------------
......
......@@ -73,7 +73,7 @@ void NumberConstructor::finishCreation(VM& vm, NumberPrototype* numberPrototype)
putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "isNaN"), 1, numberConstructorFuncIsNaN, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "isSafeInteger"), 1, numberConstructorFuncIsSafeInteger, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "parseFloat"), 1, globalFuncParseFloat, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "parseInt"), 1, globalFuncParseInt, NoIntrinsic, DontEnum | Function);
putDirectNativeFunctionWithoutTransition(vm, numberPrototype->globalObject(), Identifier(&vm, "parseInt"), 2, globalFuncParseInt, NoIntrinsic, DontEnum | Function);
}
// ECMA 15.7.1
......
......@@ -2,6 +2,7 @@
* Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2009 Torch Mobile, Inc.
* Copyright (C) 2015 Jordan Harband (ljharb@gmail.com)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -137,9 +138,9 @@ void StringPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject, JSStr
JSC_NATIVE_FUNCTION("trim", stringProtoFuncTrim, DontEnum, 0);
JSC_NATIVE_FUNCTION("trimLeft", stringProtoFuncTrimLeft, DontEnum, 0);
JSC_NATIVE_FUNCTION("trimRight", stringProtoFuncTrimRight, DontEnum, 0);
JSC_NATIVE_FUNCTION("startsWith", stringProtoFuncStartsWith, DontEnum, 0);
JSC_NATIVE_FUNCTION("endsWith", stringProtoFuncEndsWith, DontEnum, 0);
JSC_NATIVE_FUNCTION("includes", stringProtoFuncIncludes, DontEnum, 0);
JSC_NATIVE_FUNCTION("startsWith", stringProtoFuncStartsWith, DontEnum, 1);
JSC_NATIVE_FUNCTION("endsWith", stringProtoFuncEndsWith, DontEnum, 1);
JSC_NATIVE_FUNCTION("includes", stringProtoFuncIncludes, DontEnum, 1);
// The constructor will be added later, after StringConstructor has been built
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
......
......@@ -1150,6 +1150,7 @@ namespace WTF {
m_tableSize = 0;
m_tableSizeMask = 0;
m_keyCount = 0;
m_deletedCount = 0;
}
template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
......
......@@ -158,12 +158,9 @@ private:
#elif USE(GLIB)
public:
static gboolean queueWork(RunLoop*);
GMainLoop* innermostLoop();
void pushNestedMainLoop(GMainLoop*);
void popNestedMainLoop();
private:
GRefPtr<GMainContext> m_runLoopContext;
Vector<GRefPtr<GMainLoop>> m_runLoopMainLoops;
GRefPtr<GMainContext> m_mainContext;
Vector<GRefPtr<GMainLoop>> m_mainLoops;
#endif
};
......
......@@ -35,64 +35,47 @@ namespace WTF {
RunLoop::RunLoop()
{
// g_main_context_default() doesn't add an extra reference.
m_runLoopContext = isMainThread() ? g_main_context_default() : adoptGRef(g_main_context_new());
ASSERT(m_runLoopContext);
GRefPtr<GMainLoop> innermostLoop = adoptGRef(g_main_loop_new(m_runLoopContext.get(), FALSE));
m_mainContext = isMainThread() ? g_main_context_default() : adoptGRef(g_main_context_new());
ASSERT(m_mainContext);
GRefPtr<GMainLoop> innermostLoop = adoptGRef(g_main_loop_new(m_mainContext.get(), FALSE));
ASSERT(innermostLoop);
m_runLoopMainLoops.append(innermostLoop);
m_mainLoops.append(innermostLoop);
}
RunLoop::~RunLoop()
{
for (int i = m_runLoopMainLoops.size() - 1; i >= 0; --i) {
if (!g_main_loop_is_running(m_runLoopMainLoops[i].get()))
for (int i = m_mainLoops.size() - 1; i >= 0; --i) {
if (!g_main_loop_is_running(m_mainLoops[i].get()))
continue;
g_main_loop_quit(m_runLoopMainLoops[i].get());
g_main_loop_quit(m_mainLoops[i].get());
}
}
void RunLoop::run()
{
RunLoop& mainRunLoop = RunLoop::current();
GMainLoop* innermostLoop = mainRunLoop.innermostLoop();
RunLoop& runLoop = RunLoop::current();
// The innermost main loop should always be there.
ASSERT(!runLoop.m_mainLoops.isEmpty());
GMainLoop* innermostLoop = runLoop.m_mainLoops[0].get();
if (!g_main_loop_is_running(innermostLoop)) {
g_main_loop_run(innermostLoop);
return;
}
// Create and run a nested loop if the innermost one was already running.
GMainLoop* nestedMainLoop = g_main_loop_new(0, FALSE);
mainRunLoop.pushNestedMainLoop(nestedMainLoop);
GMainLoop* nestedMainLoop = g_main_loop_new(runLoop.m_mainContext.get(), FALSE);
runLoop.m_mainLoops.append(adoptGRef(nestedMainLoop));
g_main_loop_run(nestedMainLoop);
mainRunLoop.popNestedMainLoop();
}
GMainLoop* RunLoop::innermostLoop()
{
// The innermost main loop should always be there.
ASSERT(!m_runLoopMainLoops.isEmpty());
return m_runLoopMainLoops[0].get();
}
void RunLoop::pushNestedMainLoop(GMainLoop* nestedLoop)
{
// The innermost main loop should always be there.
ASSERT(!m_runLoopMainLoops.isEmpty());
m_runLoopMainLoops.append(adoptGRef(nestedLoop));
}
void RunLoop::popNestedMainLoop()
{
// The innermost main loop should always be there.
ASSERT(!m_runLoopMainLoops.isEmpty());
m_runLoopMainLoops.removeLast();
runLoop.m_mainLoops.removeLast();
}
void RunLoop::stop()
{
// The innermost main loop should always be there.
ASSERT(!m_runLoopMainLoops.isEmpty());
GRefPtr<GMainLoop> lastMainLoop = m_runLoopMainLoops.last();
ASSERT(!m_mainLoops.isEmpty());
GRefPtr<GMainLoop> lastMainLoop = m_mainLoops.last();
if (g_main_loop_is_running(lastMainLoop.get()))
g_main_loop_quit(lastMainLoop.get());
}
......@@ -102,8 +85,8 @@ void RunLoop::wakeUp()
RefPtr<RunLoop> runLoop(this);
GMainLoopSource::scheduleAndDeleteOnDestroy("[WebKit] RunLoop work", std::function<void()>([runLoop] {
runLoop->performWork();
}), G_PRIORITY_DEFAULT, nullptr, m_runLoopContext.get());
g_main_context_wakeup(m_runLoopContext.get());
}), G_PRIORITY_DEFAULT, nullptr, m_mainContext.get());
g_main_context_wakeup(m_mainContext.get());
}
RunLoop::TimerBase::TimerBase(RunLoop& runLoop)
......@@ -119,7 +102,7 @@ RunLoop::TimerBase::~TimerBase()
void RunLoop::TimerBase::start(double fireInterval, bool repeat)
{
m_timerSource.scheduleAfterDelay("[WebKit] RunLoop::Timer", std::function<bool ()>([this, repeat] { fired(); return repeat; }),
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>(fireInterval)), G_PRIORITY_DEFAULT, nullptr, m_runLoop.m_runLoopContext.get());
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::duration<double>(fireInterval)), G_PRIORITY_DEFAULT, nullptr, m_runLoop.m_mainContext.get());
}
void RunLoop::TimerBase::stop()
......
......@@ -82,7 +82,26 @@
namespace WebCore {
static const char versionKey[] = "WebKitDatabaseVersionKey";
static const char infoTableName[] = "__WebKitDatabaseInfoTable__";
static const char unqualifiedInfoTableName[] = "__WebKitDatabaseInfoTable__";
const char* DatabaseBackendBase::databaseInfoTableName()
{
return unqualifiedInfoTableName;
}