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 27 matching lines...) Expand all Loading... | |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 class ScriptValue; | 40 class ScriptValue; |
41 | 41 |
42 class ScriptCallArgumentHandler { | 42 class ScriptCallArgumentHandler { |
43 public: | 43 public: |
44 ScriptCallArgumentHandler(ScriptState* scriptState) : m_scriptState(scriptSt ate) { } | 44 ScriptCallArgumentHandler(ScriptState* scriptState) : m_scriptState(scriptSt ate) { } |
45 | 45 |
46 void appendArgument(const ScriptValue&); | 46 void appendArgument(const ScriptValue&); |
47 void appendArgument(const String&); | 47 void appendArgument(const String&); |
48 void appendArgument(const char*); | |
Yuki
2015/03/28 12:19:27
Are you sure that you're not using implicit conver
| |
49 void appendArgument(long); | |
50 void appendArgument(long long); | |
51 void appendArgument(unsigned); | |
52 void appendArgument(unsigned long); | |
53 void appendArgument(int); | 48 void appendArgument(int); |
54 void appendArgument(bool); | 49 void appendArgument(bool); |
55 void appendArgument(const Vector<ScriptValue>&); | 50 void appendArgument(const Vector<ScriptValue>&); |
56 void appendUndefinedArgument(); | 51 void appendUndefinedArgument(); |
57 | 52 |
58 protected: | 53 protected: |
59 RefPtr<ScriptState> m_scriptState; | 54 RefPtr<ScriptState> m_scriptState; |
60 Vector<ScriptValue> m_arguments; | 55 Vector<ScriptValue> m_arguments; |
61 }; | 56 }; |
62 | 57 |
63 class ScriptFunctionCall : public ScriptCallArgumentHandler { | 58 class ScriptFunctionCall : public ScriptCallArgumentHandler { |
64 public: | 59 public: |
65 ScriptFunctionCall(const ScriptValue& thisObject, const String& name); | 60 ScriptFunctionCall(const ScriptValue& thisObject, const String& name); |
66 ScriptValue call(bool& hadException, bool reportExceptions = true); | 61 ScriptValue call(bool& hadException, bool reportExceptions = true); |
67 ScriptValue call(); | 62 ScriptValue call(); |
68 ScriptValue construct(bool& hadException, bool reportExceptions = true); | 63 ScriptValue construct(bool& hadException, bool reportExceptions = true); |
69 | 64 |
70 protected: | 65 protected: |
71 ScriptValue m_thisObject; | 66 ScriptValue m_thisObject; |
72 String m_name; | 67 String m_name; |
73 }; | 68 }; |
74 | 69 |
75 } // namespace blink | 70 } // namespace blink |
76 | 71 |
77 #endif // ScriptFunctionCall | 72 #endif // ScriptFunctionCall |
OLD | NEW |