Merge remote-tracking branch 'origin/tracking' into custom

This commit is contained in:
roytam1 2024-06-04 10:16:58 +08:00
commit 5f2d0b3c95
3 changed files with 14 additions and 10 deletions

View file

@ -9,11 +9,13 @@ interface XPathEvaluator {
// Based on nsIDOMXPathEvaluator
[NewObject, Throws]
XPathExpression createExpression(DOMString expression,
XPathNSResolver? resolver);
optional XPathNSResolver? resolver = null);
[Pure]
Node createNSResolver(Node nodeResolver);
[Throws]
XPathResult evaluate(DOMString expression, Node contextNode,
XPathNSResolver? resolver, unsigned short type,
object? result);
XPathResult evaluate(DOMString expression,
Node contextNode,
optional XPathNSResolver? resolver = null,
optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
optional object? result = null);
};

View file

@ -6,17 +6,20 @@
interface XPathExpression {
// The result specifies a specific result object which may be reused and
// returned by this method. If this is specified as null or it's not an
// returned by this method. If this is omitted, specified as null, or it's not an
// XPathResult object, a new result object will be constructed and returned.
[Throws]
XPathResult evaluate(Node contextNode, unsigned short type, object? result);
XPathResult evaluate(Node contextNode,
optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
optional object? result = null);
// The result specifies a specific result object which may be reused and
// returned by this method. If this is specified as null or it's not an
// returned by this method. If this is omitted, specified as null, or it's not an
// XPathResult object, a new result object will be constructed and returned.
[Throws, ChromeOnly]
XPathResult evaluateWithContext(Node contextNode,
unsigned long contextPosition,
unsigned long contextSize,
unsigned short type, object? result);
optional unsigned short type = 0 /* XPathResult.ANY_TYPE */,
optional object? result = null);
};

View file

@ -2288,8 +2288,7 @@ Parser<FullParseHandler>::moduleBody(ModuleSharedContext* modulesc)
if (!str.encodeLatin1(context, name))
return null();
JS_ReportErrorNumberLatin1(context->asJSContext(), GetErrorMessage, nullptr,
JSMSG_MISSING_EXPORT, str.ptr());
error(JSMSG_MISSING_EXPORT, str.ptr());
return null();
}