Commit 164497e6 authored by Alberto Garcia's avatar Alberto Garcia
Browse files

New upstream version 2.23.3

parent 13ea651f
......@@ -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.23.2</p></div>
<div><p class="releaseinfo">for JavaScriptCore 2.23.3</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 (2)
<pre class="programlisting">#define JSC_MICRO_VERSION (3)
</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.23.2</p></div>
<div><p class="releaseinfo">for WebKit2GTK+ 2.23.3</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 (2)
<pre class="programlisting">#define WEBKIT_MICRO_VERSION (3)
</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.23.2</p></div>
<div><p class="releaseinfo">for WebKitDOMGTK+ 2.23.3</p></div>
</div>
<hr>
</div>
......
=================
WebKitGTK+ 2.23.3
=================
What's new in WebKitGTK+ 2.23.3?
- Fix rendering of emoji sequences containing zero with joiner.
- Fallback to a colored font when rendering emojis.
- Fix rendering artifacts on Youtube while scrolling under X11.
- Remove DConf permissions from sandbox.
- Fix build from release tarball with gtkdoc enabled.
- Fix several crashes and rendering issues.
- Translation updates: Swedish
=================
WebKitGTK+ 2.23.2
=================
......
......@@ -130,6 +130,15 @@ JS_EXPORT void JSObjectSetPropertyForKey(JSContextRef ctx, JSObjectRef object, J
*/
JS_EXPORT bool JSObjectDeletePropertyForKey(JSContextRef ctx, JSObjectRef object, JSValueRef propertyKey, JSValueRef* exception) JSC_API_AVAILABLE(macosx(JSC_MAC_TBA), ios(JSC_IOS_TBA));
/*!
@function
@abstract Creates a JavaScript value of the symbol type.
@param ctx The execution context to use.
@param description A description of the newly created symbol value.
@result A unique JSValue of the symbol type, whose description matches the one provided.
*/
JS_EXPORT JSValueRef JSValueMakeSymbol(JSContextRef ctx, JSStringRef description) JSC_API_AVAILABLE(macosx(JSC_MAC_TBA), ios(JSC_IOS_TBA));
/*!
@function
@abstract Tests whether a JavaScript value's type is the symbol type.
......
......@@ -260,15 +260,6 @@ JS_EXPORT JSValueRef JSValueMakeBoolean(JSContextRef ctx, bool boolean);
*/
JS_EXPORT JSValueRef JSValueMakeNumber(JSContextRef ctx, double number);
/*!
@function
@abstract Creates a JavaScript value of the symbol type.
@param ctx The execution context to use.
@param description A description of the newly created symbol value.
@result A unique JSValue of the symbol type, whose description matches the one provided.
*/
JS_EXPORT JSValueRef JSValueMakeSymbol(JSContextRef ctx, JSStringRef description) JSC_API_AVAILABLE(macosx(JSC_MAC_TBA), ios(JSC_IOS_TBA));
/*!
@function
@abstract Creates a JavaScript value of the string type.
......
......@@ -114,7 +114,11 @@ class BuiltinsGenerator:
def generate_embedded_code_string_section_for_function(self, function):
text = function.function_source
# Wrap it in parens to avoid adding to global scope.
text = "(function " + text[text.index("("):] + ")"
function_type_string = "function "
if function.is_async:
function_type_string = "async " + function_type_string
text = "(" + function_type_string + text[text.index("("):] + ")"
embeddedSourceLength = len(text) + 1 # For extra \n.
# Lazy way to escape quotes, I think?
textLines = json.dumps(text)[1:-1].split("\\n")
......
......@@ -42,14 +42,15 @@ _FRAMEWORK_CONFIG_MAP = {
},
}
functionHeadRegExp = re.compile(r"(?:@[\w|=\[\] \"\.]+\s*\n)*function\s+\w+\s*\(.*?\)", re.MULTILINE | re.DOTALL)
functionHeadRegExp = re.compile(r"(?:@[\w|=\[\] \"\.]+\s*\n)*(?:async\s+)?function\s+\w+\s*\(.*?\)", re.MULTILINE | re.DOTALL)
functionGlobalPrivateRegExp = re.compile(r".*^@globalPrivate", re.MULTILINE | re.DOTALL)
functionIntrinsicRegExp = re.compile(r".*^@intrinsic=(\w+)", re.MULTILINE | re.DOTALL)
functionIsConstructorRegExp = re.compile(r".*^@constructor", re.MULTILINE | re.DOTALL)
functionIsGetterRegExp = re.compile(r".*^@getter", re.MULTILINE | re.DOTALL)
functionIsAsyncRegExp = re.compile(r"(async)?\s*function", re.MULTILINE | re.DOTALL)
functionNameRegExp = re.compile(r"function\s+(\w+)\s*\(", re.MULTILINE | re.DOTALL)
functionOverriddenNameRegExp = re.compile(r".*^@overriddenName=(\".+\")$", re.MULTILINE | re.DOTALL)
functionParameterFinder = re.compile(r"^function\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)", re.MULTILINE | re.DOTALL)
functionParameterFinder = re.compile(r"^(?:async\s+)?function\s+(?:\w+)\s*\(((?:\s*\w+)?\s*(?:\s*,\s*\w+)*)?\s*\)", re.MULTILINE | re.DOTALL)
multilineCommentRegExp = re.compile(r"\/\*.*?\*\/", re.MULTILINE | re.DOTALL)
singleLineCommentRegExp = re.compile(r"\/\/.*?\n", re.MULTILINE | re.DOTALL)
......@@ -100,10 +101,11 @@ class BuiltinObject:
class BuiltinFunction:
def __init__(self, function_name, function_source, parameters, is_constructor, is_global_private, intrinsic, overridden_name):
def __init__(self, function_name, function_source, parameters, is_async, is_constructor, is_global_private, intrinsic, overridden_name):
self.function_name = function_name
self.function_source = function_source
self.parameters = parameters
self.is_async = is_async
self.is_constructor = is_constructor
self.is_global_private = is_global_private
self.intrinsic = intrinsic
......@@ -133,6 +135,8 @@ class BuiltinFunction:
function_source = multipleEmptyLinesRegExp.sub("\n", function_source)
function_name = functionNameRegExp.findall(function_source)[0]
async_match = functionIsAsyncRegExp.match(function_source)
is_async = async_match != None and async_match.group(1) == "async"
is_constructor = functionIsConstructorRegExp.match(function_source) != None
is_getter = functionIsGetterRegExp.match(function_source) != None
is_global_private = functionGlobalPrivateRegExp.match(function_source) != None
......@@ -146,13 +150,16 @@ class BuiltinFunction:
if not overridden_name:
overridden_name = "static_cast<const char*>(nullptr)"
return BuiltinFunction(function_name, function_source, parameters, is_constructor, is_global_private, intrinsic, overridden_name)
return BuiltinFunction(function_name, function_source, parameters, is_async, is_constructor, is_global_private, intrinsic, overridden_name)
def __str__(self):
interface = "%s(%s)" % (self.function_name, ', '.join(self.parameters))
if self.is_constructor:
interface = interface + " [Constructor]"
if self.is_async:
interface = "async " + interface
return interface
def __lt__(self, other):
......
......@@ -321,6 +321,7 @@ dfg/DFGConstantFoldingPhase.cpp
dfg/DFGConstantHoistingPhase.cpp
dfg/DFGCriticalEdgeBreakingPhase.cpp
dfg/DFGDCEPhase.cpp
dfg/DFGDesiredGlobalProperties.cpp
dfg/DFGDesiredIdentifiers.cpp
dfg/DFGDesiredTransitions.cpp
dfg/DFGDesiredWatchpoints.cpp
......
......@@ -749,7 +749,7 @@ public:
m_jumps.append(other.m_jumps.begin(), other.m_jumps.size());
}
bool empty()
bool empty() const
{
return !m_jumps.size();
}
......
......@@ -28,7 +28,7 @@ function next()
{
"use strict";
if (this == null)
if (@isUndefinedOrNull(this))
@throwTypeError("%ArrayIteratorPrototype%.next requires that |this| not be null or undefined");
let next = @getByIdDirectPrivate(this, "arrayIteratorNext");
......
......@@ -761,7 +761,7 @@ function arraySpeciesCreate(array, length)
if (@isObject(constructor)) {
constructor = constructor.@speciesSymbol;
if (constructor == null)
if (@isUndefinedOrNull(constructor))
return @newArrayWithSize(length);
}
......
......@@ -85,47 +85,43 @@ UnlinkedFunctionExecutable* createBuiltinExecutable(VM& vm, const SourceCode& co
UnlinkedFunctionExecutable* BuiltinExecutables::createExecutable(VM& vm, const SourceCode& source, const Identifier& name, ConstructorKind constructorKind, ConstructAbility constructAbility)
{
// FIXME: Can we just make MetaData computation be constexpr and have the compiler do this for us?
// https://bugs.webkit.org/show_bug.cgi?id=193272
// Someone should get mad at me for writing this code. But, it prevents us from recursing into
// the parser, and hence, from throwing stack overflow when parsing a builtin.
StringView view = source.view();
RELEASE_ASSERT(!view.isNull());
RELEASE_ASSERT(view.is8Bit());
auto* characters = view.characters8();
RELEASE_ASSERT(view.length() >= 15); // strlen("(function (){})") == 15
RELEASE_ASSERT(characters[0] == '(');
RELEASE_ASSERT(characters[1] == 'f');
RELEASE_ASSERT(characters[2] == 'u');
RELEASE_ASSERT(characters[3] == 'n');
RELEASE_ASSERT(characters[4] == 'c');
RELEASE_ASSERT(characters[5] == 't');
RELEASE_ASSERT(characters[6] == 'i');
RELEASE_ASSERT(characters[7] == 'o');
RELEASE_ASSERT(characters[8] == 'n');
RELEASE_ASSERT(characters[9] == ' ');
RELEASE_ASSERT(characters[10] == '(');
const char* regularFunctionBegin = "(function (";
const char* asyncFunctionBegin = "(async function (";
RELEASE_ASSERT(view.length() >= strlen("(function (){})"));
bool isAsyncFunction = view.length() >= strlen("(async function (){})") && !memcmp(characters, asyncFunctionBegin, strlen(asyncFunctionBegin));
RELEASE_ASSERT(isAsyncFunction || !memcmp(characters, regularFunctionBegin, strlen(regularFunctionBegin)));
unsigned asyncOffset = isAsyncFunction ? strlen("async ") : 0;
unsigned parametersStart = strlen("function (") + asyncOffset;
JSTokenLocation start;
start.line = -1;
start.lineStartOffset = std::numeric_limits<unsigned>::max();
start.startOffset = 10;
start.startOffset = parametersStart;
start.endOffset = std::numeric_limits<unsigned>::max();
JSTokenLocation end;
end.line = 1;
end.lineStartOffset = 0;
end.startOffset = 1;
end.startOffset = strlen("(") + asyncOffset;
end.endOffset = std::numeric_limits<unsigned>::max();
unsigned startColumn = 10; // strlen("function (") == 10
int functionKeywordStart = 1; // (f
int functionNameStart = 10;
int parametersStart = 10;
unsigned startColumn = parametersStart;
int functionKeywordStart = strlen("(") + asyncOffset;
int functionNameStart = parametersStart;
bool isInStrictContext = false;
bool isArrowFunctionBodyExpression = false;
unsigned parameterCount;
{
unsigned i = 11;
unsigned i = parametersStart + 1;
unsigned commas = 0;
bool sawOneParam = false;
bool hasRestParam = false;
......@@ -199,14 +195,15 @@ UnlinkedFunctionExecutable* BuiltinExecutables::createExecutable(VM& vm, const S
positionBeforeLastNewline.offset = offsetOfLastNewline;
positionBeforeLastNewline.lineStartOffset = positionBeforeLastNewlineLineStartOffset;
SourceCode newSource = source.subExpression(10, view.length() - closeBraceOffsetFromEnd, 0, 10);
SourceCode newSource = source.subExpression(parametersStart, view.length() - closeBraceOffsetFromEnd, 0, parametersStart);
bool isBuiltinDefaultClassConstructor = constructorKind != ConstructorKind::None;
UnlinkedFunctionKind kind = isBuiltinDefaultClassConstructor ? UnlinkedNormalFunction : UnlinkedBuiltinFunction;
SourceParseMode parseMode = isAsyncFunction ? SourceParseMode::AsyncFunctionMode : SourceParseMode::NormalFunctionMode;
FunctionMetadataNode metadata(
start, end, startColumn, endColumn, functionKeywordStart, functionNameStart, parametersStart,
isInStrictContext, constructorKind, constructorKind == ConstructorKind::Extends ? SuperBinding::Needed : SuperBinding::NotNeeded,
parameterCount, SourceParseMode::NormalFunctionMode, isArrowFunctionBodyExpression);
parameterCount, parseMode, isArrowFunctionBodyExpression);
metadata.finishParsing(newSource, Identifier(), FunctionMode::FunctionExpression);
metadata.overrideName(name);
......@@ -242,6 +239,14 @@ UnlinkedFunctionExecutable* BuiltinExecutables::createExecutable(VM& vm, const S
metadataFromParser->setEndPosition(positionBeforeLastNewlineFromParser);
if (metadata != *metadataFromParser || positionBeforeLastNewlineFromParser != positionBeforeLastNewline) {
dataLogLn("Expected Metadata:\n", metadata);
dataLogLn("Metadata from parser:\n", *metadataFromParser);
dataLogLn("positionBeforeLastNewlineFromParser.line ", positionBeforeLastNewlineFromParser.line);
dataLogLn("positionBeforeLastNewlineFromParser.offset ", positionBeforeLastNewlineFromParser.offset);
dataLogLn("positionBeforeLastNewlineFromParser.lineStartOffset ", positionBeforeLastNewlineFromParser.lineStartOffset);
dataLogLn("positionBeforeLastNewline.line ", positionBeforeLastNewline.line);
dataLogLn("positionBeforeLastNewline.offset ", positionBeforeLastNewline.offset);
dataLogLn("positionBeforeLastNewline.lineStartOffset ", positionBeforeLastNewline.lineStartOffset);
WTFLogAlways("Metadata of parser and hand rolled parser don't match\n");
CRASH();
}
......
......@@ -77,7 +77,7 @@ function speciesConstructor(obj, defaultConstructor)
if (!@isObject(constructor))
@throwTypeError("|this|.constructor is not an Object or undefined");
constructor = constructor.@speciesSymbol;
if (constructor == null)
if (@isUndefinedOrNull(constructor))
return defaultConstructor;
if (@isConstructor(constructor))
return constructor;
......@@ -92,7 +92,7 @@ function copyDataProperties(target, source, excludedSet)
if (!@isObject(target))
@throwTypeError("target needs to be an object");
if (source == null)
if (@isUndefinedOrNull(source))
return target;
let from = @toObject(source);
......@@ -119,7 +119,7 @@ function copyDataPropertiesNoExclusions(target, source)
if (!@isObject(target))
@throwTypeError("target needs to be an object");
if (source == null)
if (@isUndefinedOrNull(source))
return target;
let from = @toObject(source);
......
......@@ -48,7 +48,7 @@ function next()
{
"use strict";
if (this == null)
if (@isUndefinedOrNull(this))
@throwTypeError("%MapIteratorPrototype%.next requires that |this| not be null or undefined");
var bucket = @getByIdDirectPrivate(this, "mapBucket");
......
......@@ -187,32 +187,32 @@ function requestInstantiate(entry, parameters, fetcher)
if (entry.instantiate)
return entry.instantiate;
var instantiatePromise = this.requestFetch(entry, parameters, fetcher).then((source) => {
var instantiatePromise = (async () => {
var source = await this.requestFetch(entry, parameters, fetcher);
// https://html.spec.whatwg.org/#fetch-a-single-module-script
// Now fetching request succeeds. Then even if instantiation fails, we should cache it.
// Instantiation won't be retried.
if (entry.instantiate)
return entry.instantiate;
return await entry.instantiate;
entry.instantiate = instantiatePromise;
var key = entry.key;
return this.parseModule(key, source).then((moduleRecord) => {
var dependenciesMap = moduleRecord.dependenciesMap;
var requestedModules = this.requestedModules(moduleRecord);
var dependencies = @newArrayWithSize(requestedModules.length);
for (var i = 0, length = requestedModules.length; i < length; ++i) {
var depName = requestedModules[i];
var depKey = this.resolveSync(depName, key, fetcher);
var depEntry = this.ensureRegistered(depKey);
@putByValDirect(dependencies, i, depEntry);
dependenciesMap.@set(depName, depEntry);
}
entry.dependencies = dependencies;
entry.module = moduleRecord;
@setStateToMax(entry, @ModuleSatisfy);
return entry;
});
});
var moduleRecord = await this.parseModule(key, source);
var dependenciesMap = moduleRecord.dependenciesMap;
var requestedModules = this.requestedModules(moduleRecord);
var dependencies = @newArrayWithSize(requestedModules.length);
for (var i = 0, length = requestedModules.length; i < length; ++i) {
var depName = requestedModules[i];
var depKey = this.resolveSync(depName, key, fetcher);
var depEntry = this.ensureRegistered(depKey);
@putByValDirect(dependencies, i, depEntry);
dependenciesMap.@set(depName, depEntry);
}
entry.dependencies = dependencies;
entry.module = moduleRecord;
@setStateToMax(entry, @ModuleSatisfy);
return entry;
})();
return instantiatePromise;
}
......@@ -328,7 +328,7 @@ function provideFetch(key, value)
this.fulfillFetch(entry, value);
}
function loadModule(moduleName, parameters, fetcher)
async function loadModule(moduleName, parameters, fetcher)
{
"use strict";
......@@ -336,11 +336,9 @@ function loadModule(moduleName, parameters, fetcher)
// resolve: moduleName => Promise(moduleKey)
// Take the name and resolve it to the unique identifier for the resource location.
// For example, take the "jquery" and return the URL for the resource.
return this.resolve(moduleName, @undefined, fetcher).then((key) => {
return this.requestSatisfy(this.ensureRegistered(key), parameters, fetcher, new @Set);
}).then((entry) => {
return entry.key;
});
let key = await this.resolve(moduleName, @undefined, fetcher);
let entry = await this.requestSatisfy(this.ensureRegistered(key), parameters, fetcher, new @Set);
return entry.key;
}
function linkAndEvaluateModule(key, fetcher)
......@@ -355,21 +353,19 @@ function linkAndEvaluateModule(key, fetcher)
return this.moduleEvaluation(entry, fetcher);
}
function loadAndEvaluateModule(moduleName, parameters, fetcher)
async function loadAndEvaluateModule(moduleName, parameters, fetcher)
{
"use strict";
return this.loadModule(moduleName, parameters, fetcher).then((key) => {
return this.linkAndEvaluateModule(key, fetcher);
});
let key = await this.loadModule(moduleName, parameters, fetcher);
return await this.linkAndEvaluateModule(key, fetcher);
}
function requestImportModule(key, parameters, fetcher)
async function requestImportModule(key, parameters, fetcher)
{
"use strict";
return this.requestSatisfy(this.ensureRegistered(key), parameters, fetcher, new @Set).then((entry) => {
this.linkAndEvaluateModule(entry.key, fetcher);
return this.getModuleNamespaceObject(entry.module);
});
let entry = await this.requestSatisfy(this.ensureRegistered(key), parameters, fetcher, new @Set);
this.linkAndEvaluateModule(entry.key, fetcher);
return this.getModuleNamespaceObject(entry.module);
}
......@@ -45,7 +45,7 @@ function next()
{
"use strict";
if (this == null)
if (@isUndefinedOrNull(this))
@throwTypeError("%SetIteratorPrototype%.next requires that |this| not be null or undefined");
var bucket = @getByIdDirectPrivate(this, "setBucket");
......
......@@ -27,7 +27,7 @@ function next()
{
"use strict";
if (this == null)
if (@isUndefinedOrNull(this))
@throwTypeError("%StringIteratorPrototype%.next requires that |this| not be null or undefined");
var position = @getByIdDirectPrivate(this, "stringIteratorNextIndex");
......
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