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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 ASSERT(m_function.v8Value()->IsFunction()); | 190 ASSERT(m_function.v8Value()->IsFunction()); |
191 | 191 |
192 v8::TryCatch exceptionCatcher; | 192 v8::TryCatch exceptionCatcher; |
193 v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global(); | 193 v8::Handle<v8::Object> object = v8::Context::GetCurrent()->Global(); |
194 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(m_functio
n.v8Value()); | 194 v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(m_functio
n.v8Value()); |
195 | 195 |
196 OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8::
Value>[m_arguments.size()]); | 196 OwnArrayPtr<v8::Handle<v8::Value> > args = adoptArrayPtr(new v8::Handle<v8::
Value>[m_arguments.size()]); |
197 for (size_t i = 0; i < m_arguments.size(); ++i) | 197 for (size_t i = 0; i < m_arguments.size(); ++i) |
198 args[i] = m_arguments[i].v8Value(); | 198 args[i] = m_arguments[i].v8Value(); |
199 | 199 |
200 v8::Handle<v8::Value> result = V8Proxy::instrumentedCallFunction(0 /* page *
/, function, object, m_arguments.size(), args.get()); | 200 v8::Handle<v8::Value> result = V8Proxy::instrumentedCallFunction(0 /* frame
*/, function, object, m_arguments.size(), args.get()); |
201 | 201 |
202 if (exceptionCatcher.HasCaught()) { | 202 if (exceptionCatcher.HasCaught()) { |
203 hadException = true; | 203 hadException = true; |
204 m_scriptState->setException(exceptionCatcher.Exception()); | 204 m_scriptState->setException(exceptionCatcher.Exception()); |
205 return ScriptValue(); | 205 return ScriptValue(); |
206 } | 206 } |
207 | 207 |
208 return ScriptValue(result); | 208 return ScriptValue(result); |
209 } | 209 } |
210 | 210 |
211 } // namespace WebCore | 211 } // namespace WebCore |
OLD | NEW |