Skip to content
Permalink
Browse files
Streamline DOMImplementation, and move it to our new DOM exception sy…
…stem

https://bugs.webkit.org/show_bug.cgi?id=161295

Reviewed by Ryosuke Niwa.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Added new headers to project.

* bindings/js/JSDOMBinding.h:
(WebCore::toJS): Added an overload for ExceptionOr<>; this handles the
exception case here so it doesn't need to be handled in generated code
for the binding. Implemented here so that ExceptionOr.h does not know
about bindings. But since this is a template, it will only compile when
instantiated and there is no need to include ExceptionOr.h and indirectly
the Variant.h header in this header.
(WebCore::toJSNewlyCreated): Ditto.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation): Refer to JSC::Exception with explicit
namespace to avoid ambiguity with WebCore::Exception.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocumentType): Changed to return
ExceptionOr.
(WebCore::createXMLDocument): Added. Helper used in createDocument.
(WebCore::DOMImplementation::getInterface): Deleted. This was unused.
(WebCore::DOMImplementation::createDocument): Changed to return
ExceptionOr.
(WebCore::DOMImplementation::createCSSStyleSheet): Removed the unused
ExceptionCode out argument.
(WebCore::isValidXMLMIMETypeChar): Deleted. Moved to MIMETypeRegistry.
(WebCore::DOMImplementation::isXMLMIMEType): Ditto.
(WebCore::DOMImplementation::isTextMIMEType): Ditto.

* dom/DOMImplementation.h: Changed functions as described above to
return ExceptionOr values. Also removed unused getInterface function,
and isXMLMIMEType and isTextMIMEType, which both moved to the
MIMETypeRegistry class alongside all the other similar MIME type
functions.

* dom/DOMImplementation.idl: Reorganized this to match the IDL files
in the specifications a little better. Also removed [RaisesException]
since that is only needed for the old legacy ExceptionCode& style.

* dom/Document.cpp:
(WebCore::Document::setXMLVersion): Removed call to the
DOMImplementation::hasFeature function since the values passed in
unconditionally result in the return value "true". This is left over
either from specification language, or from an ancient version of this
code that worked in a "no XML supported" mode.
(WebCore::Document::setXMLStandalone): Ditto.

* dom/Document.h: Removed the ExceptionCode& out argument from setXMLStandalone.
* dom/Document.idl: Removed [SetterRaisesException] from xmlStandalone.

* dom/Exception.h: Added.
* dom/ExceptionOr.h: Added.

* html/HTMLTemplateElement.cpp: Removed unneeded include of DOMImplementation.h.

* inspector/InspectorPageAgent.cpp:
(WebCore::createXHRTextDecoder): Use isXMLMIMEType in its new location in
MIMETypeRegistry.
* inspector/NetworkResourcesData.cpp:
(WebCore::createOtherResourceTextDecoder): Ditto.

* loader/FrameLoader.cpp: Removed unneeded include of DOMImplementation.h.

* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::determineContentType): Use isXMLMIMEType in its
new location in MIMETypeRegistry.

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isTextMIMEType): Added. Moved here from
DOMImplementation.
(WebCore::isValidXMLMIMETypeChar): Ditto.
(WebCore::MIMETypeRegistry::isXMLMIMEType): Ditto.

* platform/MIMETypeRegistry.h: Added isXMLMIMEType and isTextMIMEType.
Made isUnsupportedTextMIMEType private.

* svg/SVGElement.cpp:
(WebCore::SVGElement::isSupported): Deleted. This function was never called.
* svg/SVGElement.h: Updated for the above change.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseIsXML): Use isXMLMIMEType in its new
location in MIMETypeRegistry.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startDocument): Updated since setXMLStandalone
no longer can raise an exception.

Source/WebKit/mac:

* DOM/DOMDOMImplementation.mm:
(unwrap): Added. Use this instead of the IMPL macro.
(-[DOMImplementation dealloc]): Updated to use unwrap.
(-[DOMImplementation hasFeature:version:]): Ditto.
(-[DOMImplementation createDocumentType:publicId:systemId:]): Updated to work with
ExceptionOr.
(-[DOMImplementation createDocument:qualifiedName:doctype:]): Ditto.
(-[DOMImplementation createCSSStyleSheet:media:]): Removed exception logic since
this function can no longer raise an exception.
(-[DOMImplementation createHTMLDocument:]): Updated to use unwrap.
(-[DOMImplementation hasFeature::]): Changed to call the non-deprecated version
rather than duplicating its implementation. Also moved into the category as defined
in the header.
(-[DOMImplementation createDocumentType:::]): Ditto.
(-[DOMImplementation createDocument:::]): Ditto.
(-[DOMImplementation createCSSStyleSheet::]): Ditto.

* DOM/DOMDocument.mm: Removed unneeded include of DOMImplementation.h.
(-[DOMDocument setXmlStandalone:]): Updated since setXMLStandalone no longer can
raise an exception.

* WebView/WebFrame.mm:
(-[WebFrame _canProvideDocumentSource]): Updated to use isTextMIMEType in its new
location in MIMETypeRegistry instead of in DOMImplementation.

Source/WebKit/win:

* WebFrame.cpp:
(WebFrame::canProvideDocumentSource): Updated to use isXMLMIMEType in its new
location in MIMETypeRegistry instead of in DOMImplementation.

Source/WebKit2:

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::isDisplayingMarkupDocument): Use isXMLMIMEType in its
new location in MIMETypeRegistry rather than in DOMImplementation.
(WebKit::WebFrameProxy::isDisplayingPDFDocument): Removed unneeded redundant
check for empty string, already done by MIMETypeRegistry.

Canonical link: https://commits.webkit.org/179743@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
darinadler committed Sep 3, 2016
1 parent d495d31 commit fec37263db621a4a9b0b80a5457b213e36fb3c7c
Showing 35 changed files with 533 additions and 290 deletions.
@@ -1,3 +1,97 @@
2016-09-03 Darin Adler <darin@apple.com>

Streamline DOMImplementation, and move it to our new DOM exception system
https://bugs.webkit.org/show_bug.cgi?id=161295

Reviewed by Ryosuke Niwa.

* WebCore.xcodeproj/project.pbxproj: Added new headers to project.

* bindings/js/JSDOMBinding.h:
(WebCore::toJS): Added an overload for ExceptionOr<>; this handles the
exception case here so it doesn't need to be handled in generated code
for the binding. Implemented here so that ExceptionOr.h does not know
about bindings. But since this is a template, it will only compile when
instantiated and there is no need to include ExceptionOr.h and indirectly
the Variant.h header in this header.
(WebCore::toJSNewlyCreated): Ditto.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation): Refer to JSC::Exception with explicit
namespace to avoid ambiguity with WebCore::Exception.

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocumentType): Changed to return
ExceptionOr.
(WebCore::createXMLDocument): Added. Helper used in createDocument.
(WebCore::DOMImplementation::getInterface): Deleted. This was unused.
(WebCore::DOMImplementation::createDocument): Changed to return
ExceptionOr.
(WebCore::DOMImplementation::createCSSStyleSheet): Removed the unused
ExceptionCode out argument.
(WebCore::isValidXMLMIMETypeChar): Deleted. Moved to MIMETypeRegistry.
(WebCore::DOMImplementation::isXMLMIMEType): Ditto.
(WebCore::DOMImplementation::isTextMIMEType): Ditto.

* dom/DOMImplementation.h: Changed functions as described above to
return ExceptionOr values. Also removed unused getInterface function,
and isXMLMIMEType and isTextMIMEType, which both moved to the
MIMETypeRegistry class alongside all the other similar MIME type
functions.

* dom/DOMImplementation.idl: Reorganized this to match the IDL files
in the specifications a little better. Also removed [RaisesException]
since that is only needed for the old legacy ExceptionCode& style.

* dom/Document.cpp:
(WebCore::Document::setXMLVersion): Removed call to the
DOMImplementation::hasFeature function since the values passed in
unconditionally result in the return value "true". This is left over
either from specification language, or from an ancient version of this
code that worked in a "no XML supported" mode.
(WebCore::Document::setXMLStandalone): Ditto.

* dom/Document.h: Removed the ExceptionCode& out argument from setXMLStandalone.
* dom/Document.idl: Removed [SetterRaisesException] from xmlStandalone.

* dom/Exception.h: Added.
* dom/ExceptionOr.h: Added.

* html/HTMLTemplateElement.cpp: Removed unneeded include of DOMImplementation.h.

* inspector/InspectorPageAgent.cpp:
(WebCore::createXHRTextDecoder): Use isXMLMIMEType in its new location in
MIMETypeRegistry.
* inspector/NetworkResourcesData.cpp:
(WebCore::createOtherResourceTextDecoder): Ditto.

* loader/FrameLoader.cpp: Removed unneeded include of DOMImplementation.h.

* loader/TextResourceDecoder.cpp:
(WebCore::TextResourceDecoder::determineContentType): Use isXMLMIMEType in its
new location in MIMETypeRegistry.

* platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isTextMIMEType): Added. Moved here from
DOMImplementation.
(WebCore::isValidXMLMIMETypeChar): Ditto.
(WebCore::MIMETypeRegistry::isXMLMIMEType): Ditto.

* platform/MIMETypeRegistry.h: Added isXMLMIMEType and isTextMIMEType.
Made isUnsupportedTextMIMEType private.

* svg/SVGElement.cpp:
(WebCore::SVGElement::isSupported): Deleted. This function was never called.
* svg/SVGElement.h: Updated for the above change.

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::responseIsXML): Use isXMLMIMEType in its new
location in MIMETypeRegistry.

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startDocument): Updated since setXMLStandalone
no longer can raise an exception.

2016-09-03 Ryosuke Niwa <rniwa@webkit.org>

Unbreak customElements.whenDefined after r205383 with a crash fix
@@ -3275,6 +3275,8 @@
93C4F6EB1108F9A50099D0DB /* AccessibilityScrollbar.h in Headers */ = {isa = PBXBuildFile; fileRef = 93C4F6E91108F9A50099D0DB /* AccessibilityScrollbar.h */; };
93CCF0270AF6C52900018E89 /* NavigationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CCF0260AF6C52900018E89 /* NavigationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
93CCF0600AF6CA7600018E89 /* NavigationAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */; };
93D196311D6CAB7600FC7E47 /* ExceptionOr.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D196301D6CAB7600FC7E47 /* ExceptionOr.h */; settings = {ATTRIBUTES = (Private, ); }; };
93D196331D6CAB8200FC7E47 /* Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = 93D196321D6CAB8200FC7E47 /* Exception.h */; settings = {ATTRIBUTES = (Private, ); }; };
93D4379F1D57B15300AB85EA /* JSMainThreadExecState.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F934D831189F1EE00508D5D /* JSMainThreadExecState.h */; settings = {ATTRIBUTES = (Private, ); }; };
93D437A01D57B19A00AB85EA /* CustomElementReactionQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9B56C9A81C89312800C456DF /* CustomElementReactionQueue.h */; settings = {ATTRIBUTES = (Private, ); }; };
93D437A11D57B3F400AB85EA /* ElementDescendantIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = ADE11F4A18D8311B0078983B /* ElementDescendantIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -10437,6 +10439,8 @@
93CA4CA209DF93FA00DF8677 /* svg.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = svg.css; sourceTree = "<group>"; };
93CCF0260AF6C52900018E89 /* NavigationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationAction.h; sourceTree = "<group>"; };
93CCF05F0AF6CA7600018E89 /* NavigationAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NavigationAction.cpp; sourceTree = "<group>"; };
93D196301D6CAB7600FC7E47 /* ExceptionOr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionOr.h; sourceTree = "<group>"; };
93D196321D6CAB8200FC7E47 /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Exception.h; sourceTree = "<group>"; };
93D9D53B0DA27E180077216C /* RangeBoundaryPoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RangeBoundaryPoint.h; sourceTree = "<group>"; };
93E227DB0AF589AD00D48324 /* DocumentLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DocumentLoader.cpp; sourceTree = "<group>"; };
93E227DD0AF589AD00D48324 /* NetscapePlugInStreamLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePlugInStreamLoader.cpp; sourceTree = "<group>"; };
@@ -22996,11 +23000,13 @@
E12EDB7A0B308A78002704B6 /* EventTarget.h */,
85AFA7420AAF298400E84305 /* EventTarget.idl */,
CDCE5CD014633BC900D47CCA /* EventTargetFactory.in */,
93D196321D6CAB8200FC7E47 /* Exception.h */,
BC60D8F00D2A11E000B9918F /* ExceptionBase.cpp */,
BC60D8F10D2A11E000B9918F /* ExceptionBase.h */,
935FBCF109BA143B00E230B1 /* ExceptionCode.h */,
A7CACDB013CE875B00BBBE3F /* ExceptionCodePlaceholder.cpp */,
A74BB76A13BDA86300FF7BF0 /* ExceptionCodePlaceholder.h */,
93D196301D6CAB7600FC7E47 /* ExceptionOr.h */,
E47E276716036EDC00EE2AFB /* ExtensionStyleSheets.cpp */,
E47E276416036ED200EE2AFB /* ExtensionStyleSheets.h */,
B6D9D23414EABD260090D75E /* FocusEvent.cpp */,
@@ -25598,6 +25604,7 @@
078E093917D16B2C00420AA1 /* MediaStreamCreationClient.h in Headers */,
078E091617D14D1C00420AA1 /* MediaStreamEvent.h in Headers */,
078E093717D16B2C00420AA1 /* MediaStreamPrivate.h in Headers */,
93D196331D6CAB8200FC7E47 /* Exception.h in Headers */,
078E091717D14D1C00420AA1 /* MediaStreamRegistry.h in Headers */,
078E091817D14D1C00420AA1 /* MediaStreamTrack.h in Headers */,
078E091917D14D1C00420AA1 /* MediaStreamTrackEvent.h in Headers */,
@@ -26668,6 +26675,7 @@
B2227AD70D00BF220071B782 /* SVGTransform.h in Headers */,
B2227ADA0D00BF220071B782 /* SVGTransformable.h in Headers */,
B2227ADD0D00BF220071B782 /* SVGTransformDistance.h in Headers */,
93D196311D6CAB7600FC7E47 /* ExceptionOr.h in Headers */,
B2227ADF0D00BF220071B782 /* SVGTransformList.h in Headers */,
08C7136E128956A3001B107E /* SVGTransformListPropertyTearOff.h in Headers */,
B2227AE20D00BF220071B782 /* SVGTRefElement.h in Headers */,
@@ -23,9 +23,9 @@

#pragma once

#include "DOMWrapperWorld.h"
#include "JSDOMGlobalObject.h"
#include "JSDOMWrapper.h"
#include "DOMWrapperWorld.h"
#include "ScriptWrappable.h"
#include "ScriptWrappableInlines.h"
#include "WebCoreTypedArrayController.h"
@@ -69,7 +69,9 @@ class Node;

struct ExceptionCodeWithMessage;

typedef int ExceptionCode;
template<typename> class ExceptionOr;

using ExceptionCode = int;

struct ExceptionDetails {
String message;
@@ -186,6 +188,9 @@ JSC::JSValue createDOMException(JSC::ExecState*, ExceptionCode, const String&);
WEBCORE_EXPORT void setDOMException(JSC::ExecState*, ExceptionCode);
void setDOMException(JSC::ExecState*, const ExceptionCodeWithMessage&);

template<typename T> inline JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, ExceptionOr<T>&&);
template<typename T> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject*, ExceptionOr<T>&&);

JSC::JSValue jsString(JSC::ExecState*, const URL&); // empty if the URL is null

JSC::JSValue jsStringOrNull(JSC::ExecState*, const String&); // null if the string is null
@@ -808,4 +813,23 @@ template<typename T> inline JSC::JSValue toNullableJSNumber(Optional<T> optional
return optionalNumber ? JSC::jsNumber(optionalNumber.value()) : JSC::jsNull();
}

template<typename T> inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, ExceptionOr<T>&& value)
{
if (UNLIKELY(value.hasException())) {
setDOMException(state, value.exceptionCode());
return JSC::jsUndefined();
}
return toJS(state, globalObject, value.takeReturnValue());
}

template<typename T> inline JSC::JSValue toJSNewlyCreated(JSC::ExecState* state, JSDOMGlobalObject* globalObject, ExceptionOr<T>&& value)
{
// FIXME: It's really annoying to have two of these functions. Should find a way to combine toJS and toJSNewlyCreated.
if (UNLIKELY(value.hasException())) {
setDOMException(state, value.exceptionCode());
return JSC::jsUndefined();
}
return toJSNewlyCreated(state, globalObject, value.takeReturnValue());
}

} // namespace WebCore
@@ -4341,7 +4341,7 @@ sub GenerateCallbackImplementation
push(@implContent, " args.append(" . NativeToJSValue($param, 1, $interface, $paramName, "m_data") . ");\n");
}

push(@implContent, "\n NakedPtr<Exception> returnedException;\n");
push(@implContent, "\n NakedPtr<JSC::Exception> returnedException;\n");

my $propertyToLookup = "Identifier::fromString(state, \"${functionName}\")";
my $invokeMethod = "JSCallbackData::CallbackType::FunctionOrObject";
@@ -108,7 +108,7 @@ bool JSTestCallback::callbackWithNoParam()
ExecState* state = m_data->globalObject()->globalExec();
MarkedArgumentBuffer args;

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, "callbackWithNoParam"), returnedException);
if (returnedException)
reportException(state, returnedException);
@@ -128,7 +128,7 @@ bool JSTestCallback::callbackWithArrayParam(RefPtr<Float32Array> arrayParam)
MarkedArgumentBuffer args;
args.append(toJS(state, m_data->globalObject(), arrayParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, "callbackWithArrayParam"), returnedException);
if (returnedException)
reportException(state, returnedException);
@@ -149,7 +149,7 @@ bool JSTestCallback::callbackWithSerializedScriptValueParam(RefPtr<SerializedScr
args.append(srzParam ? srzParam->deserialize(state, m_data->globalObject(), 0) : jsNull());
args.append(jsStringWithCache(state, strArg));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, "callbackWithSerializedScriptValueParam"), returnedException);
if (returnedException)
reportException(state, returnedException);
@@ -169,7 +169,7 @@ bool JSTestCallback::callbackWithStringList(DOMStringList* listParam)
MarkedArgumentBuffer args;
args.append(toJS(state, m_data->globalObject(), listParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, "callbackWithStringList"), returnedException);
if (returnedException)
reportException(state, returnedException);
@@ -189,7 +189,7 @@ bool JSTestCallback::callbackWithBoolean(bool boolParam)
MarkedArgumentBuffer args;
args.append(jsBoolean(boolParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, "callbackWithBoolean"), returnedException);
if (returnedException)
reportException(state, returnedException);
@@ -210,7 +210,7 @@ bool JSTestCallback::callbackRequiresThisToPass(int32_t longParam, TestNode* tes
args.append(jsNumber(longParam));
args.append(toJS(state, m_data->globalObject(), testNodeParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
m_data->invokeCallback(args, JSCallbackData::CallbackType::Object, Identifier::fromString(state, "callbackRequiresThisToPass"), returnedException);
if (returnedException)
reportException(state, returnedException);
@@ -72,7 +72,7 @@ bool JSTestCallbackFunction::callbackWithNoParam()
ExecState* state = m_data->globalObject()->globalExec();
MarkedArgumentBuffer args;

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
UNUSED_PARAM(state);
m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
if (returnedException)
@@ -93,7 +93,7 @@ bool JSTestCallbackFunction::callbackWithArrayParam(RefPtr<Float32Array> arrayPa
MarkedArgumentBuffer args;
args.append(toJS(state, m_data->globalObject(), arrayParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
UNUSED_PARAM(state);
m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
if (returnedException)
@@ -115,7 +115,7 @@ bool JSTestCallbackFunction::callbackWithSerializedScriptValueParam(RefPtr<Seria
args.append(srzParam ? srzParam->deserialize(state, m_data->globalObject(), 0) : jsNull());
args.append(jsStringWithCache(state, strArg));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
UNUSED_PARAM(state);
m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
if (returnedException)
@@ -136,7 +136,7 @@ bool JSTestCallbackFunction::callbackWithStringList(DOMStringList* listParam)
MarkedArgumentBuffer args;
args.append(toJS(state, m_data->globalObject(), listParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
UNUSED_PARAM(state);
m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
if (returnedException)
@@ -157,7 +157,7 @@ bool JSTestCallbackFunction::callbackWithBoolean(bool boolParam)
MarkedArgumentBuffer args;
args.append(jsBoolean(boolParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
UNUSED_PARAM(state);
m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
if (returnedException)
@@ -179,7 +179,7 @@ bool JSTestCallbackFunction::callbackRequiresThisToPass(int32_t longParam, TestN
args.append(jsNumber(longParam));
args.append(toJS(state, m_data->globalObject(), testNodeParam));

NakedPtr<Exception> returnedException;
NakedPtr<JSC::Exception> returnedException;
UNUSED_PARAM(state);
m_data->invokeCallback(args, JSCallbackData::CallbackType::Function, Identifier(), returnedException);
if (returnedException)

0 comments on commit fec3726

Please sign in to comment.