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 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2305 * Checks whether a callback is set by the | 2305 * Checks whether a callback is set by the |
2306 * ObjectTemplate::SetCallAsFunctionHandler method. | 2306 * ObjectTemplate::SetCallAsFunctionHandler method. |
2307 * When an Object is callable this method returns true. | 2307 * When an Object is callable this method returns true. |
2308 */ | 2308 */ |
2309 bool IsCallable(); | 2309 bool IsCallable(); |
2310 | 2310 |
2311 /** | 2311 /** |
2312 * Call an Object as a function if a callback is set by the | 2312 * Call an Object as a function if a callback is set by the |
2313 * ObjectTemplate::SetCallAsFunctionHandler method. | 2313 * ObjectTemplate::SetCallAsFunctionHandler method. |
2314 */ | 2314 */ |
2315 Local<Value> CallAsFunction(Handle<Object> recv, | 2315 Local<Value> CallAsFunction(Handle<Value> recv, |
2316 int argc, | 2316 int argc, |
2317 Handle<Value> argv[]); | 2317 Handle<Value> argv[]); |
2318 | 2318 |
2319 /** | 2319 /** |
2320 * Call an Object as a constructor if a callback is set by the | 2320 * Call an Object as a constructor if a callback is set by the |
2321 * ObjectTemplate::SetCallAsFunctionHandler method. | 2321 * ObjectTemplate::SetCallAsFunctionHandler method. |
2322 * Note: This method behaves like the Function::NewInstance method. | 2322 * Note: This method behaves like the Function::NewInstance method. |
2323 */ | 2323 */ |
2324 Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]); | 2324 Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]); |
2325 | 2325 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2478 * Create a function in the current execution context | 2478 * Create a function in the current execution context |
2479 * for a given FunctionCallback. | 2479 * for a given FunctionCallback. |
2480 */ | 2480 */ |
2481 static Local<Function> New(Isolate* isolate, | 2481 static Local<Function> New(Isolate* isolate, |
2482 FunctionCallback callback, | 2482 FunctionCallback callback, |
2483 Local<Value> data = Local<Value>(), | 2483 Local<Value> data = Local<Value>(), |
2484 int length = 0); | 2484 int length = 0); |
2485 | 2485 |
2486 Local<Object> NewInstance() const; | 2486 Local<Object> NewInstance() const; |
2487 Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; | 2487 Local<Object> NewInstance(int argc, Handle<Value> argv[]) const; |
2488 Local<Value> Call(Handle<Object> recv, int argc, Handle<Value> argv[]); | 2488 Local<Value> Call(Handle<Value> recv, int argc, Handle<Value> argv[]); |
2489 void SetName(Handle<String> name); | 2489 void SetName(Handle<String> name); |
2490 Handle<Value> GetName() const; | 2490 Handle<Value> GetName() const; |
2491 | 2491 |
2492 /** | 2492 /** |
2493 * Name inferred from variable or property assignment of this function. | 2493 * Name inferred from variable or property assignment of this function. |
2494 * Used to facilitate debugging and profiling of JavaScript code written | 2494 * Used to facilitate debugging and profiling of JavaScript code written |
2495 * in an OO style, where many functions are anonymous but are assigned | 2495 * in an OO style, where many functions are anonymous but are assigned |
2496 * to object properties. | 2496 * to object properties. |
2497 */ | 2497 */ |
2498 Handle<Value> GetInferredName() const; | 2498 Handle<Value> GetInferredName() const; |
(...skipping 4008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6507 */ | 6507 */ |
6508 | 6508 |
6509 | 6509 |
6510 } // namespace v8 | 6510 } // namespace v8 |
6511 | 6511 |
6512 | 6512 |
6513 #undef TYPE_CHECK | 6513 #undef TYPE_CHECK |
6514 | 6514 |
6515 | 6515 |
6516 #endif // V8_H_ | 6516 #endif // V8_H_ |
OLD | NEW |