OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2315 * Checks whether a callback is set by the | 2315 * Checks whether a callback is set by the |
2316 * ObjectTemplate::SetCallAsFunctionHandler method. | 2316 * ObjectTemplate::SetCallAsFunctionHandler method. |
2317 * When an Object is callable this method returns true. | 2317 * When an Object is callable this method returns true. |
2318 */ | 2318 */ |
2319 bool IsCallable(); | 2319 bool IsCallable(); |
2320 | 2320 |
2321 /** | 2321 /** |
2322 * Call an Object as a function if a callback is set by the | 2322 * Call an Object as a function if a callback is set by the |
2323 * ObjectTemplate::SetCallAsFunctionHandler method. | 2323 * ObjectTemplate::SetCallAsFunctionHandler method. |
2324 */ | 2324 */ |
2325 Local<Value> CallAsFunction(Handle<Object> recv, | 2325 Local<Value> CallAsFunction(Handle<Value> recv, |
2326 int argc, | 2326 int argc, |
2327 Handle<Value> argv[]); | 2327 Handle<Value> argv[]); |
2328 | 2328 |
2329 /** | 2329 /** |
2330 * Call an Object as a constructor if a callback is set by the | 2330 * Call an Object as a constructor if a callback is set by the |
2331 * ObjectTemplate::SetCallAsFunctionHandler method. | 2331 * ObjectTemplate::SetCallAsFunctionHandler method. |
2332 * Note: This method behaves like the Function::NewInstance method. | 2332 * Note: This method behaves like the Function::NewInstance method. |
2333 */ | 2333 */ |
2334 Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]); | 2334 Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]); |
2335 | 2335 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 * Create a function in the current execution context | 2488 * Create a function in the current execution context |
2489 * for a given FunctionCallback. | 2489 * for a given FunctionCallback. |
2490 */ | 2490 */ |
2491 static Local<Function> New(Isolate* isolate, | 2491 static Local<Function> New(Isolate* isolate, |
2492 FunctionCallback callback, | 2492 FunctionCallback callback, |
2493 Local<Value> data = Local<Value>(), | 2493 Local<Value> data = Local<Value>(), |
2494 int length = 0); | 2494 int length = 0); |
2495 | 2495 |
2496 Local<Object> NewInstance() const; | 2496 Local<Object> NewInstance() const; |
2497 Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; | 2497 Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; |
2498 Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]); | 2498 Local<Value> Call(Handle<Value> recv, int argc, Handle<Value> argv[]); |
2499 void SetName(Handle<String> name); | 2499 void SetName(Handle<String> name); |
2500 Handle<Value> GetName() const; | 2500 Handle<Value> GetName() const; |
2501 | 2501 |
2502 /** | 2502 /** |
2503 * Name inferred from variable or property assignment of this function. | 2503 * Name inferred from variable or property assignment of this function. |
2504 * Used to facilitate debugging and profiling of JavaScript code written | 2504 * Used to facilitate debugging and profiling of JavaScript code written |
2505 * in an OO style, where many functions are anonymous but are assigned | 2505 * in an OO style, where many functions are anonymous but are assigned |
2506 * to object properties. | 2506 * to object properties. |
2507 */ | 2507 */ |
2508 Handle<Value> GetInferredName() const; | 2508 Handle<Value> GetInferredName() const; |
(...skipping 3989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6498 */ | 6498 */ |
6499 | 6499 |
6500 | 6500 |
6501 } // namespace v8 | 6501 } // namespace v8 |
6502 | 6502 |
6503 | 6503 |
6504 #undef TYPE_CHECK | 6504 #undef TYPE_CHECK |
6505 | 6505 |
6506 | 6506 |
6507 #endif // V8_H_ | 6507 #endif // V8_H_ |
OLD | NEW |