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 20 matching lines...) Expand all Loading... |
31 #include "config.h" | 31 #include "config.h" |
32 #include "bindings/v8/ScriptFunctionCall.h" | 32 #include "bindings/v8/ScriptFunctionCall.h" |
33 | 33 |
34 #include "bindings/v8/ScriptController.h" | 34 #include "bindings/v8/ScriptController.h" |
35 #include "bindings/v8/ScriptScope.h" | 35 #include "bindings/v8/ScriptScope.h" |
36 #include "bindings/v8/ScriptState.h" | 36 #include "bindings/v8/ScriptState.h" |
37 #include "bindings/v8/ScriptValue.h" | 37 #include "bindings/v8/ScriptValue.h" |
38 #include "bindings/v8/V8Binding.h" | 38 #include "bindings/v8/V8Binding.h" |
39 #include "bindings/v8/V8ObjectConstructor.h" | 39 #include "bindings/v8/V8ObjectConstructor.h" |
40 #include "bindings/v8/V8ScriptRunner.h" | 40 #include "bindings/v8/V8ScriptRunner.h" |
41 #include "bindings/v8/V8Utilities.h" | |
42 | 41 |
43 #include <v8.h> | 42 #include <v8.h> |
44 | 43 |
45 namespace WebCore { | 44 namespace WebCore { |
46 | 45 |
47 void ScriptCallArgumentHandler::appendArgument(const ScriptObject& argument) | 46 void ScriptCallArgumentHandler::appendArgument(const ScriptObject& argument) |
48 { | 47 { |
49 if (argument.scriptState() != m_scriptState) { | 48 if (argument.scriptState() != m_scriptState) { |
50 ASSERT_NOT_REACHED(); | 49 ASSERT_NOT_REACHED(); |
51 return; | 50 return; |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 | 211 |
213 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()]); |
214 for (size_t i = 0; i < m_arguments.size(); ++i) | 213 for (size_t i = 0; i < m_arguments.size(); ++i) |
215 info[i] = m_arguments[i].v8Value(); | 214 info[i] = m_arguments[i].v8Value(); |
216 | 215 |
217 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()); |
218 return ScriptValue(result, m_scriptState->isolate()); | 217 return ScriptValue(result, m_scriptState->isolate()); |
219 } | 218 } |
220 | 219 |
221 } // namespace WebCore | 220 } // namespace WebCore |
OLD | NEW |