| Index: Source/bindings/core/v8/ScriptFunctionCall.cpp
|
| diff --git a/Source/bindings/core/v8/ScriptFunctionCall.cpp b/Source/bindings/core/v8/ScriptFunctionCall.cpp
|
| index 4f4af8f0f0f174e5af1483b8de97f91eab205e2e..030494b23c1d765d259a2acb68b41bfe1227d8aa 100644
|
| --- a/Source/bindings/core/v8/ScriptFunctionCall.cpp
|
| +++ b/Source/bindings/core/v8/ScriptFunctionCall.cpp
|
| @@ -45,7 +45,7 @@ namespace blink {
|
| void ScriptCallArgumentHandler::appendArgument(const ScriptValue& argument)
|
| {
|
| if (argument.scriptState() != m_scriptState) {
|
| - ASSERT_NOT_REACHED();
|
| + appendUndefinedArgument();
|
| return;
|
| }
|
| m_arguments.append(argument);
|
| @@ -111,11 +111,21 @@ void ScriptCallArgumentHandler::appendArgument(const Vector<ScriptValue>& argume
|
| v8::Isolate* isolate = m_scriptState->isolate();
|
| ScriptState::Scope scope(m_scriptState.get());
|
| v8::Handle<v8::Array> result = v8::Array::New(isolate, argument.size());
|
| - for (size_t i = 0; i < argument.size(); ++i)
|
| - result->Set(v8::Integer::New(isolate, i), argument[i].v8Value());
|
| + for (size_t i = 0; i < argument.size(); ++i) {
|
| + if (argument[i].scriptState() != m_scriptState)
|
| + result->Set(v8::Integer::New(isolate, i), v8::Undefined(isolate));
|
| + else
|
| + result->Set(v8::Integer::New(isolate, i), argument[i].v8Value());
|
| + }
|
| m_arguments.append(ScriptValue(m_scriptState.get(), result));
|
| }
|
|
|
| +void ScriptCallArgumentHandler::appendUndefinedArgument()
|
| +{
|
| + v8::Isolate* isolate = m_scriptState->isolate();
|
| + m_arguments.append(ScriptValue(m_scriptState.get(), v8::Undefined(isolate)));
|
| +}
|
| +
|
| ScriptFunctionCall::ScriptFunctionCall(const ScriptValue& thisObject, const String& name)
|
| : ScriptCallArgumentHandler(thisObject.scriptState())
|
| , m_thisObject(thisObject)
|
|
|