| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 m_arguments.append(ScriptValue(v8::Number::New(isolate, argument), isolate))
; | 78 m_arguments.append(ScriptValue(v8::Number::New(isolate, argument), isolate))
; |
| 79 } | 79 } |
| 80 | 80 |
| 81 void ScriptCallArgumentHandler::appendArgument(long long argument) | 81 void ScriptCallArgumentHandler::appendArgument(long long argument) |
| 82 { | 82 { |
| 83 v8::Isolate* isolate = m_scriptState->isolate(); | 83 v8::Isolate* isolate = m_scriptState->isolate(); |
| 84 ScriptScope scope(m_scriptState); | 84 ScriptScope scope(m_scriptState); |
| 85 m_arguments.append(ScriptValue(v8::Number::New(isolate, argument), isolate))
; | 85 m_arguments.append(ScriptValue(v8::Number::New(isolate, argument), isolate))
; |
| 86 } | 86 } |
| 87 | 87 |
| 88 void ScriptCallArgumentHandler::appendArgument(unsigned int argument) | 88 void ScriptCallArgumentHandler::appendArgument(unsigned argument) |
| 89 { | 89 { |
| 90 v8::Isolate* isolate = m_scriptState->isolate(); | 90 v8::Isolate* isolate = m_scriptState->isolate(); |
| 91 ScriptScope scope(m_scriptState); | 91 ScriptScope scope(m_scriptState); |
| 92 m_arguments.append(ScriptValue(v8::Number::New(isolate, argument), isolate))
; | 92 m_arguments.append(ScriptValue(v8::Number::New(isolate, argument), isolate))
; |
| 93 } | 93 } |
| 94 | 94 |
| 95 void ScriptCallArgumentHandler::appendArgument(unsigned long argument) | 95 void ScriptCallArgumentHandler::appendArgument(unsigned long argument) |
| 96 { | 96 { |
| 97 v8::Isolate* isolate = m_scriptState->isolate(); | 97 v8::Isolate* isolate = m_scriptState->isolate(); |
| 98 ScriptScope scope(m_scriptState); | 98 ScriptScope scope(m_scriptState); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 | 211 |
| 212 OwnPtr<v8::Handle<v8::Value>[]> info = adoptArrayPtr(new v8::Handle<v8::Valu
e>[m_arguments.size()]); | 212 OwnPtr<v8::Handle<v8::Value>[]> info = adoptArrayPtr(new v8::Handle<v8::Valu
e>[m_arguments.size()]); |
| 213 for (size_t i = 0; i < m_arguments.size(); ++i) | 213 for (size_t i = 0; i < m_arguments.size(); ++i) |
| 214 info[i] = m_arguments[i].v8Value(); | 214 info[i] = m_arguments[i].v8Value(); |
| 215 | 215 |
| 216 v8::Handle<v8::Value> result = ScriptController::callFunction(m_scriptState-
>executionContext(), function, object, m_arguments.size(), info.get(), m_scriptS
tate->isolate()); | 216 v8::Handle<v8::Value> result = ScriptController::callFunction(m_scriptState-
>executionContext(), function, object, m_arguments.size(), info.get(), m_scriptS
tate->isolate()); |
| 217 return ScriptValue(result, m_scriptState->isolate()); | 217 return ScriptValue(result, m_scriptState->isolate()); |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace WebCore | 220 } // namespace WebCore |
| OLD | NEW |