OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 info[i] = m_arguments[i].v8Value(); | 131 info[i] = m_arguments[i].v8Value(); |
132 ASSERT(!info[i].IsEmpty()); | 132 ASSERT(!info[i].IsEmpty()); |
133 } | 133 } |
134 | 134 |
135 v8::Local<v8::Value> result; | 135 v8::Local<v8::Value> result; |
136 if (!V8ScriptRunner::callFunction(function, m_scriptState->executionContext(
), thisObject, m_arguments.size(), info.get(), m_scriptState->isolate()).ToLocal
(&result)) | 136 if (!V8ScriptRunner::callFunction(function, m_scriptState->executionContext(
), thisObject, m_arguments.size(), info.get(), m_scriptState->isolate()).ToLocal
(&result)) |
137 return ScriptValue(); | 137 return ScriptValue(); |
138 return ScriptValue(m_scriptState.get(), result); | 138 return ScriptValue(m_scriptState.get(), result); |
139 } | 139 } |
140 | 140 |
141 v8::Handle<v8::Function> ScriptFunctionCall::function() | 141 v8::Local<v8::Function> ScriptFunctionCall::function() |
142 { | 142 { |
143 v8::TryCatch tryCatch; | 143 v8::TryCatch tryCatch; |
144 v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_thisObject.
v8Value()); | 144 v8::Local<v8::Object> thisObject = v8::Local<v8::Object>::Cast(m_thisObject.
v8Value()); |
145 v8::Local<v8::Value> value; | 145 v8::Local<v8::Value> value; |
146 if (!thisObject->Get(m_scriptState->context(), v8String(m_scriptState->isola
te(), m_name)).ToLocal(&value)) | 146 if (!thisObject->Get(m_scriptState->context(), v8String(m_scriptState->isola
te(), m_name)).ToLocal(&value)) |
147 return v8::Handle<v8::Function>(); | 147 return v8::Local<v8::Function>(); |
148 | 148 |
149 ASSERT(value->IsFunction()); | 149 ASSERT(value->IsFunction()); |
150 return v8::Local<v8::Function>::Cast(value); | 150 return v8::Local<v8::Function>::Cast(value); |
151 } | 151 } |
152 | 152 |
153 | 153 |
154 } // namespace blink | 154 } // namespace blink |
OLD | NEW |