Commit 6472bb18 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.22.1

parent ab504ad3
......@@ -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">JavaScriptCore GLib Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">for JavaScriptCore 2.22.0</p></div>
<div><p class="releaseinfo">for JavaScriptCore 2.22.1</p></div>
</div>
<hr>
</div>
......
......@@ -175,7 +175,7 @@ have included when compiling your code.</p>
<hr>
<div class="refsect2">
<a name="JSC-MICRO-VERSION:CAPS"></a><h3>JSC_MICRO_VERSION</h3>
<pre class="programlisting">#define JSC_MICRO_VERSION (0)
<pre class="programlisting">#define JSC_MICRO_VERSION (1)
</pre>
</div>
</div>
......
......@@ -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.22.0</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.22.1</p></div>
</div>
<hr>
</div>
......
......@@ -213,7 +213,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 (0)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (1)
</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.22.0</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.22.1</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.22.1
=================
What's new in WebKitGTK+ 2.22.1?
- Fix printing in landscape.
- Fix the build in several platforms: s390x, ppc64le, armv7hl.
- Fix the build with a11y disabled.
- Fix the build with video disabled.
- Fix several crashes and rendering issues.
==================
WebKitGTK+ 2.22.0
==================
......
......@@ -45,7 +45,7 @@ inline ExceptionStatus handleExceptionIfNeeded(JSC::CatchScope& scope, JSC::Exec
*returnedExceptionRef = toRef(exec, exception->value());
scope.clearException();
#if ENABLE(REMOTE_INSPECTOR)
exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exception);
scope.vm().vmEntryGlobalObject(exec)->inspectorController().reportAPIException(exec, exception);
#endif
return ExceptionStatus::DidThrow;
}
......@@ -57,7 +57,8 @@ inline void setException(JSC::ExecState* exec, JSValueRef* returnedExceptionRef,
if (returnedExceptionRef)
*returnedExceptionRef = toRef(exec, exception);
#if ENABLE(REMOTE_INSPECTOR)
exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, JSC::Exception::create(exec->vm(), exception));
VM& vm = exec->vm();
vm.vmEntryGlobalObject(exec)->inspectorController().reportAPIException(exec, JSC::Exception::create(vm, exception));
#endif
}
......
......@@ -54,14 +54,15 @@ JSValueRef JSEvaluateScript(JSContextRef ctx, JSStringRef script, JSObjectRef th
return 0;
}
ExecState* exec = toJS(ctx);
JSLockHolder locker(exec);
VM& vm = exec->vm();
JSLockHolder locker(vm);
JSObject* jsThisObject = toJS(thisObject);
startingLineNumber = std::max(1, startingLineNumber);
// evaluate sets "this" to the global object if it is NULL
JSGlobalObject* globalObject = exec->vmEntryGlobalObject();
JSGlobalObject* globalObject = vm.vmEntryGlobalObject(exec);
auto sourceURLString = sourceURL ? sourceURL->string() : String();
SourceCode source = makeSource(script->string(), SourceOrigin { sourceURLString }, sourceURLString, TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
......@@ -105,14 +106,14 @@ bool JSCheckScriptSyntax(JSContextRef ctx, JSStringRef script, JSStringRef sourc
SourceCode source = makeSource(script->string(), SourceOrigin { sourceURLString }, sourceURLString, TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber()));
JSValue syntaxException;
bool isValidSyntax = checkSyntax(exec->vmEntryGlobalObject()->globalExec(), source, &syntaxException);
bool isValidSyntax = checkSyntax(vm.vmEntryGlobalObject(exec)->globalExec(), source, &syntaxException);
if (!isValidSyntax) {
if (exception)
*exception = toRef(exec, syntaxException);
#if ENABLE(REMOTE_INSPECTOR)
Exception* exception = Exception::create(vm, syntaxException);
exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exception);
vm.vmEntryGlobalObject(exec)->inspectorController().reportAPIException(exec, exception);
#endif
return false;
}
......
......@@ -162,10 +162,10 @@ JSGlobalContextRef JSGlobalContextCreateInGroup(JSContextGroupRef group, JSClass
JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx)
{
ExecState* exec = toJS(ctx);
JSLockHolder locker(exec);
VM& vm = exec->vm();
gcProtect(exec->vmEntryGlobalObject());
JSLockHolder locker(vm);
gcProtect(vm.vmEntryGlobalObject(exec));
vm.ref();
return ctx;
}
......@@ -173,10 +173,10 @@ JSGlobalContextRef JSGlobalContextRetain(JSGlobalContextRef ctx)
void JSGlobalContextRelease(JSGlobalContextRef ctx)
{
ExecState* exec = toJS(ctx);
JSLockHolder locker(exec);
VM& vm = exec->vm();
bool protectCountIsZero = Heap::heap(exec->vmEntryGlobalObject())->unprotect(exec->vmEntryGlobalObject());
JSLockHolder locker(vm);
bool protectCountIsZero = vm.heap.unprotect(vm.vmEntryGlobalObject(exec));
if (protectCountIsZero)
vm.heap.reportAbandonedObjectGraph();
vm.deref();
......@@ -225,9 +225,10 @@ JSStringRef JSGlobalContextCopyName(JSGlobalContextRef ctx)
}
ExecState* exec = toJS(ctx);
JSLockHolder locker(exec);
VM& vm = exec->vm();
JSLockHolder locker(vm);
String name = exec->vmEntryGlobalObject()->name();
String name = vm.vmEntryGlobalObject(exec)->name();
if (name.isNull())
return 0;
......@@ -242,9 +243,10 @@ void JSGlobalContextSetName(JSGlobalContextRef ctx, JSStringRef name)
}
ExecState* exec = toJS(ctx);
JSLockHolder locker(exec);
VM& vm = exec->vm();
JSLockHolder locker(vm);
exec->vmEntryGlobalObject()->setName(name ? name->string() : String());
vm.vmEntryGlobalObject(exec)->setName(name ? name->string() : String());
}
......@@ -325,9 +327,10 @@ bool JSGlobalContextGetRemoteInspectionEnabled(JSGlobalContextRef ctx)
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
return exec->vmEntryGlobalObject()->remoteDebuggingEnabled();
return vm.vmEntryGlobalObject(exec)->remoteDebuggingEnabled();
}
void JSGlobalContextSetRemoteInspectionEnabled(JSGlobalContextRef ctx, bool enabled)
......@@ -338,9 +341,10 @@ void JSGlobalContextSetRemoteInspectionEnabled(JSGlobalContextRef ctx, bool enab
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
exec->vmEntryGlobalObject()->setRemoteDebuggingEnabled(enabled);
vm.vmEntryGlobalObject(exec)->setRemoteDebuggingEnabled(enabled);
}
bool JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions(JSGlobalContextRef ctx)
......@@ -352,9 +356,10 @@ bool JSGlobalContextGetIncludesNativeCallStackWhenReportingExceptions(JSGlobalCo
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
JSGlobalObject* globalObject = exec->vmEntryGlobalObject();
JSGlobalObject* globalObject = vm.vmEntryGlobalObject(exec);
return globalObject->inspectorController().includesNativeCallStackWhenReportingExceptions();
#else
UNUSED_PARAM(ctx);
......@@ -371,9 +376,10 @@ void JSGlobalContextSetIncludesNativeCallStackWhenReportingExceptions(JSGlobalCo
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
JSGlobalObject* globalObject = exec->vmEntryGlobalObject();
JSGlobalObject* globalObject = vm.vmEntryGlobalObject(exec);
globalObject->inspectorController().setIncludesNativeCallStackWhenReportingExceptions(includesNativeCallStack);
#else
UNUSED_PARAM(ctx);
......@@ -391,9 +397,10 @@ CFRunLoopRef JSGlobalContextGetDebuggerRunLoop(JSGlobalContextRef ctx)
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
return exec->vmEntryGlobalObject()->inspectorDebuggable().targetRunLoop();
return vm.vmEntryGlobalObject(exec)->inspectorDebuggable().targetRunLoop();
#else
UNUSED_PARAM(ctx);
return nullptr;
......@@ -409,9 +416,10 @@ void JSGlobalContextSetDebuggerRunLoop(JSGlobalContextRef ctx, CFRunLoopRef runL
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
exec->vmEntryGlobalObject()->inspectorDebuggable().setTargetRunLoop(runLoop);
vm.vmEntryGlobalObject(exec)->inspectorDebuggable().setTargetRunLoop(runLoop);
#else
UNUSED_PARAM(ctx);
UNUSED_PARAM(runLoop);
......@@ -428,8 +436,9 @@ Inspector::AugmentableInspectorController* JSGlobalContextGetAugmentableInspecto
}
ExecState* exec = toJS(ctx);
JSLockHolder lock(exec);
VM& vm = exec->vm();
JSLockHolder lock(vm);
return &exec->vmEntryGlobalObject()->inspectorController();
return &vm.vmEntryGlobalObject(exec)->inspectorController();
}
#endif
......@@ -128,9 +128,11 @@ static JSClassRef wrappedObjectClass(JSC::JSObject* jsObject)
static GRefPtr<JSCContext> jscContextForObject(JSC::JSObject* jsObject)
{
ASSERT(isWrappedObject(jsObject));
JSC::ExecState* exec = jsObject->globalObject()->globalExec();
JSC::JSGlobalObject* globalObject = jsObject->globalObject();
JSC::ExecState* exec = globalObject->globalExec();
if (jsObject->isGlobalObject()) {
if (auto* globalScopeExtension = exec->vmEntryGlobalObject()->globalScopeExtension())
JSC::VM& vm = globalObject->vm();
if (auto* globalScopeExtension = vm.vmEntryGlobalObject(exec)->globalScopeExtension())
exec = JSC::JSScope::objectAtScope(globalScopeExtension)->globalObject()->globalExec();
}
return jscContextGetOrCreate(toGlobalRef(exec));
......
......@@ -880,8 +880,9 @@ JSCValue* jsc_context_evaluate_in_object(JSCContext* context, const char* code,
JSRetainPtr<JSGlobalContextRef> objectContext(Adopt,
instance ? jscClassCreateContextWithJSWrapper(objectClass, instance) : JSGlobalContextCreateInGroup(jscVirtualMachineGetContextGroup(context->priv->vm.get()), nullptr));
JSC::ExecState* exec = toJS(objectContext.get());
auto* jsObject = exec->vmEntryGlobalObject();
jsObject->setGlobalScopeExtension(JSC::JSWithScope::create(exec->vm(), jsObject, jsObject->globalScope(), toJS(JSContextGetGlobalObject(context->priv->jsContext.get()))));
JSC::VM& vm = exec->vm();
auto* jsObject = vm.vmEntryGlobalObject(exec);
jsObject->setGlobalScopeExtension(JSC::JSWithScope::create(vm, jsObject, jsObject->globalScope(), toJS(JSContextGetGlobalObject(context->priv->jsContext.get()))));
JSValueRef exception = nullptr;
JSValueRef result = evaluateScriptInContext(objectContext.get(), String::fromUTF8(code, length < 0 ? strlen(code) : length), uri, lineNumber, &exception);
if (jscContextHandleExceptionIfNeeded(context, exception))
......
......@@ -135,14 +135,14 @@ jsc_context_get_current (void);
JSC_API JSCValue *
jsc_context_evaluate (JSCContext *context,
const char *code,
gssize length);
gssize length) G_GNUC_WARN_UNUSED_RESULT;
JSC_API JSCValue *
jsc_context_evaluate_with_source_uri (JSCContext *context,
const char *code,
gssize length,
const char *uri,
guint line_number);
guint line_number) G_GNUC_WARN_UNUSED_RESULT;
JSC_API JSCValue *
jsc_context_evaluate_in_object (JSCContext *context,
......@@ -152,7 +152,7 @@ jsc_context_evaluate_in_object (JSCContext *context,
JSCClass *object_class,
const char *uri,
guint line_number,
JSCValue **object);
JSCValue **object) G_GNUC_WARN_UNUSED_RESULT;
JSC_API JSCCheckSyntaxResult
jsc_context_check_syntax (JSCContext *context,
......
......@@ -450,6 +450,11 @@ public:
return PatchableJump(branch32(cond, reg, imm));
}
PatchableJump patchableBranch8(RelationalCondition cond, Address address, TrustedImm32 imm)
{
return PatchableJump(branch8(cond, address, imm));
}
PatchableJump patchableBranch32(RelationalCondition cond, Address address, TrustedImm32 imm)
{
return PatchableJump(branch32(cond, address, imm));
......
......@@ -3388,6 +3388,14 @@ public:
return PatchableJump(result);
}
PatchableJump patchableBranch8(RelationalCondition cond, Address left, TrustedImm32 imm)
{
m_makeJumpPatchable = true;
Jump result = branch8(cond, left, imm);
m_makeJumpPatchable = false;
return PatchableJump(result);
}
PatchableJump patchableBranchTest32(ResultCondition cond, RegisterID reg, TrustedImm32 mask = TrustedImm32(-1))
{
m_makeJumpPatchable = true;
......
......@@ -1942,6 +1942,14 @@ public:
return PatchableJump(result);
}
PatchableJump patchableBranch8(RelationalCondition cond, Address left, TrustedImm32 imm)
{
m_makeJumpPatchable = true;
Jump result = branch8(cond, left, imm);
m_makeJumpPatchable = false;
return PatchableJump(result);
}
PatchableJump patchableBranch32(RelationalCondition cond, RegisterID reg, TrustedImm32 imm)
{
m_makeJumpPatchable = true;
......
......@@ -121,6 +121,12 @@ std::unique_ptr<AccessCase> AccessCase::fromStructureStubInfo(
case CacheType::InByIdSelf:
return AccessCase::create(vm, owner, InHit, stubInfo.u.byIdSelf.offset, stubInfo.u.byIdSelf.baseObjectStructure.get());
case CacheType::ArrayLength:
return AccessCase::create(vm, owner, AccessCase::ArrayLength);
case CacheType::StringLength:
return AccessCase::create(vm, owner, AccessCase::StringLength);
default:
return nullptr;
}
......@@ -1060,7 +1066,7 @@ void AccessCase::generateImpl(AccessGenerationState& state)
ScratchRegisterAllocator allocator(stubInfo.patch.usedRegisters);
allocator.lock(baseGPR);
#if USE(JSVALUE32_64)
allocator.lock(static_cast<GPRReg>(stubInfo.patch.baseTagGPR));
allocator.lock(stubInfo.patch.baseTagGPR);
#endif
allocator.lock(valueRegs);
allocator.lock(scratchGPR);
......
/*
* Copyright (C) 2012, 2013 Apple Inc. All rights reserved.
* Copyright (C) 2012-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -33,6 +33,10 @@
namespace JSC {
#if !ASSERT_DISABLED
const char* const ArrayProfile::s_typeName = "ArrayProfile";
#endif
void dumpArrayModes(PrintStream& out, ArrayModes arrayModes)
{
if (!arrayModes) {
......
/*
* Copyright (C) 2012-2017 Apple Inc. All rights reserved.
* Copyright (C) 2012-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -255,6 +255,10 @@ public:
CString briefDescription(const ConcurrentJSLocker&, CodeBlock*);
CString briefDescriptionWithoutUpdating(const ConcurrentJSLocker&);
#if !ASSERT_DISABLED
inline bool isValid() const { return m_typeName == s_typeName; }
#endif
private:
friend class LLIntOffsetsExtractor;
......@@ -268,6 +272,11 @@ private:
bool m_usesOriginalArrayStructures : 1;
bool m_didPerformFirstRunPruning : 1;
ArrayModes m_observedArrayModes { 0 };
#if !ASSERT_DISABLED
static const char* const s_typeName;
const char* m_typeName { s_typeName };
#endif
};
typedef SegmentedVector<ArrayProfile, 4> ArrayProfileVector;
......
......@@ -447,6 +447,9 @@ void BytecodeDumper<Block>::printGetByIdCacheStatus(PrintStream& out, int locati
case CacheType::ArrayLength:
out.printf("ArrayLength");
break;
case CacheType::StringLength:
out.printf("StringLength");
break;
default:
RELEASE_ASSERT_NOT_REACHED();
break;
......
/*
* Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
* Copyright (C) 2013-2018 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
......@@ -65,6 +65,7 @@ void DeferredCompilationCallback::dumpCompiledSourcesIfNeeded()
dataLog("[", ++index, "] ");
info.dump();
}
dataLog("\n");
}
} // JSC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment