summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/scripts/test
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/scripts/test')
-rw-r--r--WebCore/bindings/scripts/test/JS/JSTestObj.cpp8
-rw-r--r--WebCore/bindings/scripts/test/V8/V8TestObj.cpp8
2 files changed, 12 insertions, 4 deletions
diff --git a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
index 5236267..7e06068 100644
--- a/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
+++ b/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
@@ -31,7 +31,9 @@
#include "JSTestObj.h"
#include "JSlog.h"
#include "KURL.h"
+#include "ScriptArguments.h"
#include "ScriptCallStack.h"
+#include "ScriptCallStackFactory.h"
#include "SerializedScriptValue.h"
#include "TestObj.h"
#include <runtime/Error.h>
@@ -994,12 +996,14 @@ EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionCustomArgsAndException(Ex
JSTestObj* castedThis = static_cast<JSTestObj*>(asObject(thisValue));
TestObj* imp = static_cast<TestObj*>(castedThis->impl());
ExceptionCode ec = 0;
- ScriptCallStack callStack(exec, 1);
+ OwnPtr<ScriptArguments> scriptArguments(createScriptArguments(exec, 1));
+ size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
+ OwnPtr<ScriptCallStack> callStack(createScriptCallStack(exec, maxStackSize));
log* intArg = tolog(exec->argument(0));
if (exec->hadException())
return JSValue::encode(jsUndefined());
- imp->customArgsAndException(intArg, &callStack, ec);
+ imp->customArgsAndException(intArg, scriptArguments.release(), callStack.release(), ec);
setDOMException(exec, ec);
return JSValue::encode(jsUndefined());
}
diff --git a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
index 4be1177..4c921bb 100644
--- a/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
+++ b/WebCore/bindings/scripts/test/V8/V8TestObj.cpp
@@ -26,7 +26,9 @@
#include "IDBBindingUtilities.h"
#include "IDBKey.h"
#include "RuntimeEnabledFeatures.h"
+#include "ScriptArguments.h"
#include "ScriptCallStack.h"
+#include "ScriptCallStackFactory.h"
#include "SerializedScriptValue.h"
#include "V8Binding.h"
#include "V8BindingMacros.h"
@@ -715,11 +717,13 @@ static v8::Handle<v8::Value> customArgsAndExceptionCallback(const v8::Arguments&
TestObj* imp = V8TestObj::toNative(args.Holder());
ExceptionCode ec = 0;
{
- OwnPtr<ScriptCallStack> callStack(ScriptCallStack::create(args, 1));
+ OwnPtr<ScriptArguments> scriptArguments(createScriptArguments(args, 1));
+ size_t maxStackSize = imp->shouldCaptureFullStackTrace() ? ScriptCallStack::maxCallStackSizeToCapture : 1;
+ OwnPtr<ScriptCallStack> callStack(createScriptCallStack(maxStackSize));
if (!callStack)
return v8::Undefined();
EXCEPTION_BLOCK(log*, intArg, V8log::HasInstance(args[0]) ? V8log::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
- imp->customArgsAndException(intArg, callStack.get(), ec);
+ imp->customArgsAndException(intArg, scriptArguments.release(), callStack.release(), ec);
if (UNLIKELY(ec))
goto fail;
return v8::Handle<v8::Value>();