summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/js/JSMutationCallback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/js/JSMutationCallback.cpp')
-rw-r--r--Source/WebCore/bindings/js/JSMutationCallback.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebCore/bindings/js/JSMutationCallback.cpp b/Source/WebCore/bindings/js/JSMutationCallback.cpp
index adabc7eb7..afc422f36 100644
--- a/Source/WebCore/bindings/js/JSMutationCallback.cpp
+++ b/Source/WebCore/bindings/js/JSMutationCallback.cpp
@@ -51,12 +51,12 @@ JSMutationCallback::~JSMutationCallback()
{
}
-void JSMutationCallback::call(const Vector<RefPtr<MutationRecord>>& mutations, MutationObserver* observer)
+void JSMutationCallback::call(const Vector<Ref<MutationRecord>>& mutations, MutationObserver* observer)
{
if (!canInvokeCallback())
return;
- Ref<JSMutationCallback> protect(*this);
+ Ref<JSMutationCallback> protectedThis(*this);
JSLockHolder lock(m_isolatedWorld->vm());
@@ -66,7 +66,7 @@ void JSMutationCallback::call(const Vector<RefPtr<MutationRecord>>& mutations, M
JSValue callback = m_callback.get();
CallData callData;
CallType callType = getCallData(callback, callData);
- if (callType == CallTypeNone) {
+ if (callType == CallType::None) {
ASSERT_NOT_REACHED();
return;
}
@@ -82,17 +82,18 @@ void JSMutationCallback::call(const Vector<RefPtr<MutationRecord>>& mutations, M
JSValue jsObserver = toJS(exec, globalObject, observer);
MarkedArgumentBuffer args;
- args.append(jsArray(exec, globalObject, mutations));
+ args.append(toJS<IDLSequence<IDLInterface<MutationRecord>>>(*exec, *globalObject, mutations));
args.append(jsObserver);
InspectorInstrumentationCookie cookie = JSMainThreadExecState::instrumentFunctionCall(context, callType, callData);
- JSMainThreadExecState::call(exec, callback, callType, callData, jsObserver, args);
+ NakedPtr<JSC::Exception> exception;
+ JSMainThreadExecState::profiledCall(exec, JSC::ProfilingReason::Other, callback, callType, callData, jsObserver, args, exception);
- InspectorInstrumentation::didCallFunction(cookie);
+ InspectorInstrumentation::didCallFunction(cookie, context);
- if (exec->hadException())
- reportCurrentException(exec);
+ if (exception)
+ reportException(exec, exception);
}
} // namespace WebCore