diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-10 15:31:59 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2010-11-17 13:35:59 -0800 |
commit | 28040489d744e0c5d475a88663056c9040ed5320 (patch) | |
tree | c463676791e4a63e452a95f0a12b2a8519730693 /WebCore/bindings/scripts/test | |
parent | eff9be92c41913c92fb1d3b7983c071f3e718678 (diff) | |
download | external_webkit-28040489d744e0c5d475a88663056c9040ed5320.zip external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.gz external_webkit-28040489d744e0c5d475a88663056c9040ed5320.tar.bz2 |
Merge WebKit at r71558: Initial merge by git.
Change-Id: Ib345578fa29df7e4bc72b4f00e4a6fddcb754c4c
Diffstat (limited to 'WebCore/bindings/scripts/test')
-rw-r--r-- | WebCore/bindings/scripts/test/JS/JSTestObj.cpp | 8 | ||||
-rw-r--r-- | WebCore/bindings/scripts/test/V8/V8TestObj.cpp | 8 |
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>(); |