| Index: Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
|
| diff --git a/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
|
| index 24dd7ba466baecd4f333a263c779a8bda801851d..9dcac6862150fb2b248b48c7bbb5bd3546203e3a 100644
|
| --- a/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
|
| +++ b/Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "bindings/core/v8/V8InjectedScriptHost.h"
|
|
|
| #include "bindings/core/v8/BindingSecurity.h"
|
| +#include "bindings/core/v8/EvaluateExceptionDetailsFactory.h"
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "bindings/core/v8/ScriptDebugServer.h"
|
| #include "bindings/core/v8/ScriptValue.h"
|
| @@ -330,11 +331,16 @@ void V8InjectedScriptHost::evaluateMethodCustom(const v8::FunctionCallbackInfo<v
|
| ASSERT(isolate->InContext());
|
| v8::TryCatch tryCatch;
|
| v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(expression, info.GetIsolate());
|
| +
|
| + v8::Local<v8::Object> wrappedResult = v8::Object::New(isolate);
|
| if (tryCatch.HasCaught()) {
|
| - v8SetReturnValue(info, tryCatch.ReThrow());
|
| - return;
|
| + wrappedResult->Set(v8::String::NewFromUtf8(isolate, "result"), tryCatch.Exception());
|
| + wrappedResult->Set(v8::String::NewFromUtf8(isolate, "exceptionDetails"), createEvaluateExceptionDetails(tryCatch.Message(), isolate));
|
| + } else {
|
| + wrappedResult->Set(v8::String::NewFromUtf8(isolate, "result"), result);
|
| + wrappedResult->Set(v8::String::NewFromUtf8(isolate, "exceptionDetails"), v8::Undefined(isolate));
|
| }
|
| - v8SetReturnValue(info, result);
|
| + v8SetReturnValue(info, wrappedResult);
|
| }
|
|
|
| void V8InjectedScriptHost::setFunctionVariableValueMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
|
|
|